summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/components/composer
AgeCommit message (Collapse)Author
2021-03-26[FIX] mail: command suggestion should only show if '/' is first charPriyanka Kakadiya
PURPOSE: command suggestion should only open if command is the first char. SPECIFICATION: command suggestion should only open if command is the first char. Task-2487518 closes odoo/odoo#68376 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-03-26[FIX] mail: do not show typing when using a / commandPriyanka Kakadiya
PURPOSE: Currently typing status is sent when typing a command. SPECIFICATION: Typing status should not be sent when typing a command. Task-2363267 closes odoo/odoo#66821 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-03-10[FIX] mail; hr: restore faster and more accurate mention suggestionsXavier Dubuc
The code from v13 used to look for partners in JS before making the RPC, which was much faster, and also gave better results by returning partners that were already known and therefore more likely to be selected. The same logic is reintroduced here, and further improved to take into account all known partners and sort them according to the likeliness they will be selected based on various criteria. task-2413776 closes odoo/odoo#64161 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com> Co-authored-by: Sébastien Theys <seb@odoo.com>
2021-01-21[FIX] mail, *: significantly reduce number of useless rendersSébastien Theys
* = hr_holidays, im_livechat, website_livechat A huge amount of components where rendered for no reason, notably when typing a new message (at every key press), which significantly slowed down the interface. There were 2 causes to this number of renders: - OWL rendering all children automatically, even if their props didn't change, unless `shouldUpdate` is overridden, which is now done. - `useStore` selectors being way too generous in what they observed task-2399731 closes odoo/odoo#62703 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-01-18[FIX] mail, im_livechat, snailmail: use findFromIdentifyingDataSébastien Theys
find is O(n) and findFromIdentifyingData is O(1) task-2440693 closes odoo/odoo#64712 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-12-10[FIX] mail: prevents traceback on attachment delete during uploadThanh Dodeur
Before this commit, removing attachments that are being uploaded could lead to a traceback if the removed attachment was still awaiting for the upload of another attachment. part of task-2363522 closes odoo/odoo#61376 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-12-04[FIX] mail: split attachments list to improve styleXavier Dubuc
There is now two lists of attachments : first one with images and second one with non-images. Attachment viewer allows to navigate through previews of all viewable attachments in the order they're shown. task-2272587 task-2401325 closes odoo/odoo#62866 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-24[FIX] mail: avoid adding non-members on mention in channelsSébastien Theys
task-2392010 closes odoo/odoo#62230 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-23[FIX] mail: focus should be on composer after post messagePriyanka Kakadiya
PURPOSE When sending a message by clicking on the "send" button manually, the focus should stay on the text input (and the mobile keyboard should stay open), so that it is possible to quickly send another message afterward without having to re-click manually on the text input SPECIFICATION the focus should be set to composer automatically after sending a message LINKS closes odoo/odoo#61226 Taskid: 2372546 Pr: https://github.com/odoo/odoo/pull/61226 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-20[FIX] mail: prevent multiple send of message by spamming send buttonXavier Dubuc
task-2388702 closes odoo/odoo#61993 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-16[FIX] mail: fix race conditions, especially with scrollSébastien Theys
The `_update` of some components must take place before the `_update` of other (usually sibling) components that might directly influence their layout. This is in particular the case for `_update` that are relying on height. Prevent force save of scroll position if there are pending hints to adjust it, and prevent pending hints from overriding new scroll value. Prevent flicker with message date. This should fix all known issues related to incorrectly saving or restoring scroll position. task-2344226 task-2358066 task-2369332 task-2372339 task-2373741 closes odoo/odoo#61054 Related: odoo/enterprise#14736 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-30[FIX] mail: remove chat window auto-focus on clickSébastien Theys
This causes more trouble than it's worth, especially with mobile keyboards. It also prevents from selecting any text in chat window threads. task-2372553 Part of task-2277543 closes odoo/odoo#61031 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-30[FIX] mail: make only composer as fixed in chatterXavier Dubuc
task-2282325 closes odoo/odoo#60524 Related: odoo/enterprise#14481 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-10-29[FIX] mail: fix handling of lastVisibleMessage in channel seen conditionXavier Dubuc
also fix a problem with composer.hasFocus field not always correctly updated (e.g. when switching from a channel to another in discuss) task-2278915 closes odoo/odoo#60079 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-23[FIX] mail: filter commands used in composer based on channel typeJulien Giannone
closes odoo/odoo#60052 Task-id: 2343850 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-23[FIX] mail: add test to the suggested recipient featureDidier (did)
task-2343795 closes odoo/odoo#59989 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-09[FIX] mail: ask for confirmation before attachment deletionXavier Dubuc
also hide all messages with empty body and no attachments task-2282322 closes odoo/odoo#59672 X-original-commit: 60ae42dcda777cd66e4e421dbc02f9ef12a430ef Related: odoo/enterprise#13971 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com> Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-09-29[FIX] mail: guard the thread name and test the fallbackDidier (did)
task-2343800 closes odoo/odoo#58842 X-original-commit: 13d78eda1243a5a625473adbae981b2891221ffc Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-09-21[IMP] mail: reintroduce channel mentions, canned responses, commandsJulien Giannone
task-2280308 closes odoo/odoo#58166 X-original-commit: b63d0d2ee5f3bff24a5e1e1cd962d59bebef082d Related: odoo/enterprise#13392 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-09-21[FIX] mail: restore the "to followers" featureDidier (did)
Before this commit, the "to followers" message inside the chatter composer was missing. Fix also some padding issue. This also restore the form dialog when you try to send a message to a suggested recipient that doesn't have a partner (someone in CC email for eg). But now, suggested recipient without partner are unchecked by default and the form open when the user try to check them. If the user discard the form dialog, the suggested recipient isn't checked. This is better since only a partner will receive a notification. task-2280157 closes odoo/odoo#58160 X-original-commit: 67d151cc36871d87b92676357a31a70de5a92fce Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-09-14[FIX] mail: allow temporary attachment to be canceledXavier Dubuc
task-2324065 closes odoo/odoo#57618 X-original-commit: 9f774d4fb512017ab5f99981255afc8d2c35113c Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-09-11[FIX] mail: fix image ratio on composer and thread previewDidier (did)
task-2318662 closes odoo/odoo#57518 X-original-commit: 1cd5712ff7f04b2fdb185f4fe78dbd3f4f75b801 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com> Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-09-03[FIX] mail: allow composer text input to send message with ctrl+enterXavier Dubuc
Also allow meta+enter task-2296863 closes odoo/odoo#57045 X-original-commit: 6bad3666be3d3631eaadae409d0cabcdd02661a8 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-08-28[FIX] mail, *: fix opens and redirects, adapt messaging menu closeSébastien Theys
task-2244279 task-2262862 task-2274993 task-2277537 task-2282238 closes odoo/odoo#56745 X-original-commit: 109f202 Related: odoo/enterprise#12761 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com> Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-08-21[FIX] mail: prevent composer to send message if pending uploadsXavier Dubuc
task-2317862 closes odoo/odoo#56303 X-original-commit: 3b5cd048f1dfa18869e95b173b4232b4bb189025 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-08-21[FIX] mail: fix some CSS in chat window and attachmentsXavier Dubuc
Also make rounded style for composer tool buttons. task-2282342 closes odoo/odoo#56282 X-original-commit: 307fa6877ad72fe0afb10f1b4e67ec573422b732 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-08-13[IMP] web, *: improve mock server and replace most mail mockRPCSébastien Theys
Improve mock server: - add support for mocked `fetch` - add support for `active_test` - add support for x2m `in` in domains - add support for default values computed from a function - implement a more natural "next id" compute - allow initial data without ids - ensure write and x2m commands integrity - improve bad data/bad commands error messages - always warn for failing RPC, not only in debug mode - fix all existing tests that had inconsistency data Other changes done in mail (or dependents) that are not just related to tests: - remove `direct_partner` from formatter result ->`correspondent` can be computed from other keys, especially `members` - fix `livechat_visitor` convertData -> only process if there is value - add `current_partner` and `current_user_id` as `init_messaging` result -> easier to mock than session - remove usage of `need_moderation` -> that was just a search indirection to `moderation_status` - adapt `partner_id` -> `res_partner_id` key in `_notification_format` -> to be consistent with field name - add name in result of `mail_partner_format` -> sometimes display_name is not the same - remove usage of `is_moderator` -> that was just an indirection to `moderation_channel_ids` Enterprise counterpart: https://github.com/odoo/enterprise/pull/11523 task-2287171 closes odoo/odoo#55854 X-original-commit: 7ba3fecb3377a720d1eb70e7515a0c45da73836d Related: odoo/enterprise#12391 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-08-13[FIX] mail: fix full composer opening with attachmentsXavier Dubuc
task-2307201 closes odoo/odoo#55678 X-original-commit: 9c47bb0b0034a3419a0c6e3267d90cb520a59535 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com> Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-07-15[FIX] mail: set full composer subject and recipientsXavier Dubuc
task-2291887 task-2291893 task-2291898 closes odoo/odoo#54531 X-original-commit: 26170ad9ab09d75de2e0af98fb7daedc2ed57e50 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-07-08[FIX] mail: bring back extended composer for mailing channelXavier Dubuc
task-2171877 task-2282377 task-2282382 closes odoo/odoo#54249 X-original-commit: acf8eb3e2e49c1ade638ff1f2fed4969f9944053 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-06-26[FIX] mail: fix (inbox reply) composer event handlers (and discard)Sébastien Theys
task-2092950 closes odoo/odoo#53731 X-original-commit: c29f5776594c4d2278ce163a78d8eb917fb672c0 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com> Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-06-26[IMP] mail: MockServer: add get_mention_suggestions on res.partnerSébastien Theys
Pr: #53449 X-original-commit: 4f21a77703985d085037dc3d0e472970573810ec
2020-06-26[FIX] mail: fix composer buttons styleXavier Dubuc
- emoji button was shifting right on click - log/send button color was not correct task-2274349 closes odoo/odoo#53724 X-original-commit: 41a7bb6e9b0c674ca3db5638d17e85f1b3b33f79 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-06-26[FIX] mail: discuss: unpin channel fixesLucas Perais (lpe)
FIX: use the correct API of mail.channel.py to unfollow a channel i.e.: `execute_command_leave` FIX: unpinning a channel has immediate effect on the interface chatWindows are closed, and the inbox is displayed FIX: unpinning a channel destroys corresponding chatWindows across tabs It also unpins the channel in other tabs FIX: python sends is_pinned as part of the channel_info both at init messaging and in the main bus notification That way, we can keep track of the synchronization of the pin status between JS and python task-2275000 task-2267941 closes odoo/odoo#53703 X-original-commit: d4fcc64acb2fc0c6fd9df505380f665abd8b39c4 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-06-25[FIX] mail: clarify composer placeholderXavier Dubuc
Also moved isLog from composer component prop to composer model field. task-2280159 & task-2250887 closes odoo/odoo#53645 X-original-commit: ba41b1de5edc2b3153a5b20a4f11778a3f724ade Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-06-16[FIX] mail: add focus to composer when showing it from chatterSébastien Theys
task-2224442 closes odoo/odoo#53096 X-original-commit: 7f571e490204d71882baf5a45b0b40cbada8d8da Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-06-16[FIX] mail: mark message as seen only when thread composer is focusedXavier Dubuc
task-2272510 closes odoo/odoo#53088 X-original-commit: edf356c2022b3039e53e82a092fc64533f59df27 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-06-15[REF] mail, *: refactor messaging with OWLSébastien Theys
This commit is a significant rewriting of client-side discuss, chatter, chat window, and messaging menu using OWL. The behavior should be broadly the same, with some slight functional changes here and there. From a technical standpoint, the code of messaging is mainly organized in 2 main groups of modules: - models, which are logical entities that depict the client-side state of messaging as a whole. - components, which are in charge of displaying information from models. This refactoring also introduces new JS guidelines regarding folder structure (/static) and naming rules for JS modules. Community PR: https://github.com/odoo/odoo/pull/39023 Enterprise PR: https://github.com/odoo/enterprise/pull/6249 Task-1914207 This PR is a collaborative work by Alexandre, Julien, Sébastien and Xavier, with the precious help of Lucas to speed it up towards the end. closes odoo/odoo#39023 Related: odoo/enterprise#6249 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com> Co-authored-by: Alexandre Kühn <aku@odoo.com> Co-authored-by: Julien Giannone <jgi@odoo.com> Co-authored-by: Lucas Perais <lpe@odoo.com> Co-authored-by: Sébastien Theys <seb@odoo.com> Co-authored-by: Xavier Dubuc <xdu@odoo.com>