summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/components/thread_view/thread_view_tests.js
AgeCommit message (Collapse)Author
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>
2020-12-08[FIX] mail: turn tagged name with special characters into linksIvan Yelizariev
STEPS: * Created partner with following name: Putin's spokesman * Tag the partner in a message: @Putin's spokesman BEFORE: tag is not converted into a link AFTER: the link is created WHY: _generateMentionsLinks uses ``owl.utils.escape`` which is different from ``_.escape`` https://github.com/odoo/odoo/blob/880555b38dee0c3e3b364c19bb6b0db983bf8aa0/addons/mail/static/src/models/composer/composer.js#L659 So following replace didn't work: https://github.com/odoo/odoo/blob/880555b38dee0c3e3b364c19bb6b0db983bf8aa0/addons/mail/static/src/models/composer/composer.js#L667 --- opw-2408863 closes odoo/odoo#62893 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-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-11-06[FIX] mail: remove regex from mentionsSébastien Theys
That should fix all detection issues once and for all. task-2366680 closes odoo/odoo#60593 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-02[IMP] mail: add test for channel mention and channel linkDidier (did)
task-2366680 PR https://github.com/odoo/odoo/pull/60593
2020-11-02[FIX] mail: handle transient messages with (un)seen notionsXavier Dubuc
task-2343887 closes odoo/odoo#60906 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-28[FIX] mail: do not consider message with subtype as emptyXavier Dubuc
task-2362022 closes odoo/odoo#60088 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-10-15[FIX] mail: mail not sent because partner not find in chatter + unit testNasreddin (bon)
Issue - Install "Project" module - Go to the chatter of any Task - Log the following message (by selecting the partner) then send: "test@test.com @marc Demo " Message is not sent. Cause When parsing the content, the match result is "@test.com\n@Marc Demo" due to no space between the two mentions Solution Add space after line break (only when parsing selection). In this case, it will match with 2 mentions instead: "@test.com\n" and "@marc Demo " For _generateMentionsLinks step, add a space after '</br>', it will match 2 mentions but we remove the ones that end with '</br>'. This last fix is to avoid having a non-mention string containing '</br>' (for example), and therefore not having them escaped in final message content. opw-2322577 closes odoo/odoo#59648 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-10-09[FIX] mail: fix discuss search filters and related issuesSébastien Theys
- don't reset `stringifiedDomain` when changing thread (this led to the control panel displaying obsolete filters) - refresh non-main cache that are currently displayed when there is a known change of messages in the same thread's main cache - refresh non-main-cache on displaying them, to fetch potentially new messages - fix discuss "select all" conditions task-2171873 task-2282374 closes odoo/odoo#59631 X-original-commit: b89dc5f949b3ad062fc4197a4152066c207e1bf9 Related: odoo/enterprise#13958 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-06[IMP] mail: test new message separator in some edge casesXavier Dubuc
task-2348620 closes odoo/odoo#59279 X-original-commit: 53ed641a60e6d572a12d96406b64af5b55fe177e Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-09-29[FIX] mail: reintroduce auto scroll on receiving messageSébastien Theys
task-2336251 closes odoo/odoo#58867 X-original-commit: f732980b2e5e83bcf2fdc8d3ce756f256cacbd4f Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-09-23[FIX] mail: prevent unnecessary fold state RPCSébastien Theys
When the pending value is the same as the current server value, the pending value should be ignored and no RPC should be done. In particular this prevents a non-main tab from calling the RPC when receiving a bus notification that would lead to closing a chat window, which in turn used to call the close RPC again before this commit. This led to inconsistencies especially on the main tab, if the chat window was requested to be open again after the initial close, but before the "secondary" close, it would end up closing instead of opening. The current commit reduces the issue and prevents as many unnecessary RPC as there are tabs open, which is a good improvement. But it does not negate it completely. Indeed, when quickly closing then opening the same chat window, it might still happen for network reasons that the RPC or the corresponding bus notifications are received in the wrong order. This is less frequent both functionally (to click so fast) and technically (to have the network that slow) at the same time, so it is considering acceptable / out of scope. The opportunity is taken to clean up the code by removing unnecessary fields and making use of compute and flux specific RPC instead of `_updateAfter`. task-2273658 task-2329521 closes odoo/odoo#58367 X-original-commit: cbb1d855c7af5f78819db3cd476dbe0f985bc214 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com> Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-09-18[FIX] mail: fix notification partners display in popoverXavier Dubuc
Handle notification creation in convertData correctly. task-2324260 closes odoo/odoo#57970 X-original-commit: 7305bcf4edcbaa31b86bdc7b4ece460f30515c27 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-09-17[FIX] mail: fix "New messages" separator and channel_seen behaviourXavier Dubuc
- channel_seen is now called even for own message and only when needed - channel_seen is now called with a message_id which transfer the decision of what is seen to the client which makes more sense task-2282235 task-2282248 closes odoo/odoo#57950 X-original-commit: 04edfa50ccea305050d017c4a1996e561bc7bd57 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-09-04[FIX] mail, sms, snailmail: prevent message_fetch for hidden threadsXavier Dubuc
Automatically load messages from a thread cache only if the thread cache is used in at least one thread view. Ensure thread viewer don't keep thread view records alive when they are not displayed. This change is particularly important for performance, to avoid spamming RPC at init if many threads are opened in chat windows. task-2310623 closes odoo/odoo#57061 X-original-commit: dd6981c7812134e0588f80a157eaba45512cd68e Related: odoo/enterprise#12936 Signed-off-by: Alexandre Kühn (aku) <aku@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-28[FIX] mail, *: rename thread viewer to thread viewSébastien Theys
The "viewer" should be the "parent" not the view itself. This distinction will become important in a future commit to allow viewers to not display the view in some situations. Rename done as a standalone commit to ease diff readability. Part of task-2310623 closes odoo/odoo#56737 X-original-commit: 1b811e6a972d72de02965adda67c5b039bee023f Related: odoo/enterprise#12756 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com> Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>