Commit Graph
870 Commits
Author SHA1 Message Date
Sébastien Theys d5221153f3 [IMP] mail: read thread from state rather than event
Part of task-2871070

Part-of: odoo/odoo#95218
2022-07-04 18:53:20 +02:00
Sébastien Theys 779175fd42 [IMP] mail: move hasAttachmentViewer in community
This reduces the need for overrides in enterprise.

Part of task-2871070

Part-of: odoo/odoo#95085
2022-07-01 20:41:40 +02:00
Sébastien Theys d5ed1069f0 [IMP] mail: introduce ComposerSuggestable model
This will allow to remove AND/OR mix in identifying fields of composer
suggestion view.

Part of task-2741982

closes odoo/odoo#94999

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-07-01 16:35:59 +02:00
Sébastien Theys 7b464a992b [IMP] mail: introduce MessageListViewMessageViewItem
This allows to remove the AND/OR mix from message view identifying fields.

Part of task-2741982

closes odoo/odoo#94948

Related: odoo/enterprise#28988
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-07-01 16:35:49 +02:00
Sébastien Theys 723cfddf38 [IMP] mail: move messageViews from ThreadView to MessageListView
Part of task-2741982

Part-of: odoo/odoo#94948
2022-07-01 16:35:49 +02:00
Nemael 68bb383852 [IMP] mail: improve EmojiPicker (step 1)
Emoji picker now has a bar to filter
emojis per category.

Task-2898475

closes odoo/odoo#94646

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-07-01 16:35:28 +02:00
Alexandre Kühn 8cce4e3694 [MOV] mail: rename EmojiList to EmojiPickerView
Part-of: odoo/odoo#94646
2022-07-01 16:35:28 +02:00
Alexandre Kühn 1e67f46544 [IMP] mail: rename EmojiList to EmojiPickerView
Part-of: odoo/odoo#94646
2022-07-01 16:35:27 +02:00
Rahul Prajapati dfb122b960 [IMP] mail: add message backlink on replyingto in composer
Before this commit:

There is no backlink to message on 'Replying To' in header of Composer

After this commit:

There is a backlink to message

Task-2664839

closes odoo/odoo#94873

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-30 14:14:45 +02:00
Aaron Bohy 0196c052f1 [FIX] mail: check existence of record in FollowerListMenu
This commit fixes a race condition that makes several tours crash.
The reason is that the underlying record is removed from the model
which produces a re-rendering. At the end of that re-rendering,
a component is unmounted. At that point, we remove an handler
relying on the existence of the record. As a consequence, there
was a short time window during which the handler would crash if it
was called.

Part-of: odoo/odoo#92475
2022-06-30 09:29:48 +02:00
Thanh Dodeur b52c966ff3 [REF] mail: move CallView's main display to its own model/component
part of task-2692836

closes odoo/odoo#94541

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-29 14:44:26 +02:00
Thanh Dodeur 321fc728de [FIX] mail: add cursor pointer to the call participant card
Part-of: odoo/odoo#94541
2022-06-29 14:44:25 +02:00
Thanh Dodeur 2fdda743a8 [FIX] mail: fix the offset of the sidebar button of the callView
Part-of: odoo/odoo#94541
2022-06-29 14:44:25 +02:00
xlu-odoo 2453eda926 [REF] mail: callOptionMenu, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2855813

closes odoo/odoo#91563

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-28 16:03:14 +02:00
Alexandre Kühn 634eb85a97 [IMP] mail, knowledge: mark Emoji(List) component as Legacy
This commit duplicates the components Emoji and EmojiList into
other components called "LegacyEmoji" "LegacyEmojiList".

We do this so that we can implement the new EmojiPicker in Discuss
code, without affecting the code of `knowledge` during development.

When the Emoji Picker is in a good state with just the scope of
feature of Discuss, then we can integrate this new Emoji Picker
in other modules, like `knowledge`.

Task-2890268

closes odoo/odoo#94254

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-23 11:15:54 +02:00
Thanh Dodeur 259cb3a9bd [REF] mail: cleanup the CallView template
part of task-2692836

closes odoo/odoo#94035

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-21 15:41:50 +02:00
Thanh Dodeur 8805558f0b [IMP] mail: reposition the CallActionList of the CallView
This commit moves the `CallActionList` of the `CallView` so that it sits
below the main card view but not below the sideBar.

part of task-2692836

Part-of: odoo/odoo#94035
2022-06-21 15:41:50 +02:00
Thanh Dodeur 12326de30f [REF] mail: create CallSidebarView component and model
Move the sideBar part of the `CallView` to its new model and component.

part of task-2692836

Part-of: odoo/odoo#94035
2022-06-21 15:41:49 +02:00
Sébastien Theys a6d6a71fdf [IMP] mail: only send thread to chatter rendered
As a first step clean up, attachments can be read directly from thread instead.

Part of task-2886642

Part-of: odoo/odoo#93895
2022-06-20 18:56:18 +02:00
Sébastien Theys 4d41afd0ef [IMP] mail: rename PartnerImStatusIcon to PersonaImStatusIcon
Now that it potentially contains guests, the previous name is no longer correct.

Part of task-2883466

closes odoo/odoo#93731

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-17 14:14:33 +02:00
Sébastien Theys 0e8b1721b5 [IMP] mail: introduce Persona model for guest and partner
And use it on partner im status.
This will allow displaying the im status of guest without any other change to
components.

Part of task-2883466

Part-of: odoo/odoo#93731
2022-06-17 14:14:33 +02:00
Sébastien Theys e8023a1c89 [IMP] mail: introduce PartnerImStatusIconView model
In preparation to move common code of guest and user to dedicated model.

Part of task-2883466

Part-of: odoo/odoo#93731
2022-06-17 14:14:32 +02:00
Sébastien Theys c0d8ed8196 [IMP] mail, hr_holidays: adapt im_status test to use real code/data
In preparation of refactoring the component to include guest.

Part of task-2883466

Part-of: odoo/odoo#93731
2022-06-17 14:14:32 +02:00
Alexandre Kühn d75325014c [FIX] mail: apply SCSS of CallDemoView
Follow-up of https://github.com/odoo/odoo/pull/93330

Commit above renamed "MediaPreview" to "CallDemoView".
However, it mistakenly did not rename the SCSS rules that
referred to `o_MediaPreview`.

As a result, some styles were no longer applied, like buttons
being an overlay on top of camera stream.

closes odoo/odoo#93724

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-15 19:17:10 +02:00
Carlos Valverde ff471a252c [IMP] mail: discuss design revamp
Current design, especially related to views in small viewports, has
been revamped in order to increase readability and to be more coherent
with the one in large screens.

Task-2813949

closes odoo/odoo#87915

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-15 17:18:55 +02:00
Carlos Valverde 9cbbb02481 [REF] mail: discuss scss refactoring
Current SCSS is replaced with global Bootstrap classes, in
order to reduce code lines and to increase performance.

Task-2813949

Part-of: odoo/odoo#87915
2022-06-15 17:18:55 +02:00
Carlos Valverde 11182f3479 [IMP] mail: discuss dead code removal
This commit removes code which is no longer used in the current
component.

Task-2813949

Part-of: odoo/odoo#87915
2022-06-15 17:18:54 +02:00
Thanh Dodeur b7b4697a85 [FIX] mail: properly display the call systray menu
Before this commit, since the removal of the modelManager from the
scope of some components, the call systray menu would never show up
as messaging was never defined.

closes odoo/odoo#93616

X-original-commit: ab13e5a8649d82c985163cd82f0c43e4975afca7
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-14 18:26:39 +02:00
Alexandre Kühn d4bd8e7cc6 [FIX] mail: guard MessageSeenIndicatorView/messageSeenIndicator
Follow-up of https://github.com/odoo/odoo/pull/88950

Commit above introduced `MessageSeenIndicatorView`.

Conceptually, `MessageSeenIndicatorView/messageSeenIndicator`
is required. However, the current implementation make it
possible to have a view without the related pure logic record.

This commit simply guards the template to take this implementation
detail into account, as to not make it crash.

Note that future changes in modelling will enforce
`MessageSeenIndicatorView/messageSeenIndicator` being required, so
that we won't need to guard it in template. But this is a fix in
stable version, so it's safer to keep minimal code changes.

closes odoo/odoo#93599

X-original-commit: 495379b20c077ab27b91850673222893e0d14a8e
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-14 17:14:05 +02:00
Zelong Lin fac8cb5486 [FIX] discuss: issue with click on im_status
task-2882007

closes odoo/odoo#93588

X-original-commit: 8161d2588b091fb45f8d7af450bb6a0b1b2d4bfb
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-14 16:00:02 +02:00
Louis Wicket (wil) 0afb923e8e [FIX] mail: remove obsolete and invalid use of state
Change forgotten references to `state` to references to the record.

Fix crash introduced in https://github.com/odoo/odoo/pull/93330/

closes odoo/odoo#93556

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-14 11:41:34 +02:00
Luis González ac8f6ad9d1 [FIX] mail: missing ARIA attributes after OWL
After the refactor performed on 3fea5b213 to start using OWL, a lot of
aria attributes were lost.

ARIA attributes are required to ensure good compatibility with asistive
technologies and keyboard users.

This commit reintroduces such attributes, which include:
- `aria-label`: used for elements with title but no text
- `role`: mainly used for elements that behaves as buttons or links
- `aria-expanded`: used on buttons that toggle menus or content, e.g.
  button to open attachments or followers
- And another ones like `aria-pressed`, `tabindex`, etc

closes odoo/odoo#93506

X-original-commit: 35442d9b4102b56421417fc03a686ff916e87bb1
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-13 22:51:55 +02:00
Alexandre Kühn 60f5c1ab3a [IMP] mail: remove shift left/right actions on chat window header
Task-2882557

closes odoo/odoo#93484

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-13 22:51:42 +02:00
Sébastien Theys d9c25be92f [IMP] mail: introduce Channel and ChannelMember model
task-2832456

closes odoo/odoo#91918

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-13 17:58:22 +02:00
Alexandre Kühn e73b89cdb0 [MOV] mail: rename 'MediaPreview' to 'CallDemoView'
Task-2871939

closes odoo/odoo#93330

Related: odoo/enterprise#28274
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-11 02:15:15 +02:00
Alexandre Kühn 751affdb8a [IMP] mail: rename 'MediaPreview' to 'CallDemoView'
Task-2871939

Part-of: odoo/odoo#93330
2022-06-11 02:15:15 +02:00
Alexandre Kühn dcfc8a91e8 [IMP] mail: Introduce view models
This commit moves code from components to models,
by introduce some models and fields.

It also cleans a few things in models, like:
- use Timer model instead of setTimeout
- replace local variables by model fields

Task-2881075

All changes:
- [IMP] mail: remove ChannelMemberListCategoryComponent/channelMemberListView
Task-2831082
- [IMP] mail: introduce ChannelMemberListCategoryView/members
Task-2864112
- [IMP] mail: introduce ChannelMemberListCategoryView/title
Task-2864115
- [IMP] mail: introduce ChannelMemberView
Task-2864119
- [IMP] mail: introduce 'Chatter/attachmentsLoaderTimer'
Task-2868781
- [IMP] mail: introduce 'MessageView/highlightTimer'
Task-2868794
- [IMP] mail: introduce 'CallView/showOverlayTimer'
Task-2868867
- [IMP] mail: introduce RtcSession/broadcastTimer
Task-2868929
- [IMP] mail: introduce CallView/tileContainerRef
Task-2871859
- [IMP] mail: introduce CallView/tileWidth
Task-2871869
- [IMP] mail: introduce CallView/tileHeight
Task-2871878
- [IMP] mail: introduce ChatWindowManager/endGapWidth
Task-2871960
- [IMP] mail: remove unused CallView/columnCount
Task-2871885
- [IMP] mail: introduce ChatWindowManager/hiddenMenuWidth
Task-2871963
- [IMP] mail: introduce CallView/calculateTessellation
Task-2871867
- [IMP] mail: replace model methods of MediaPreview by record methods
Task-2871934
- [IMP] mail: introduce ChatWindowManager/betweenGapWidth
Task-2871956
- [IMP] mail: introduce ChatWindowManager/chatWindowWidth
Task-2871957
- [IMP] mail: introduce ChatWindowManager/startGapWidth
Task-2871965
- [IMP] mail: introduce ChatWindowManager/availableVisibleSlots
Task-2871971
- [IMP] mail: introduce ChatWindowManager/visual/hiddenChatWindowLocalIds
Task-2871980
- [IMP] mail: introduce ChatWindowManager/visual/isHiddenMenuVisible
Task-2871981
- [IMP] mail: introduce ChatWindowManager/visual/hiddenMenuOffset
Task-2871984

Part-of: odoo/odoo#93330
2022-06-11 02:15:15 +02:00
Thanh Dodeur 663db10fe9 [IMP] mail: change the rtc layout system
This commit removes the layout menu, the layout is now automatically
adjusted based on the focused tile and uses a collapsable sidebar.

Layout variables are now located on the callView model instead of
messaging, which means that the presence of video tiles may depend on
multiple views with each their own layouts. It is therefore no longer
possible to rely on the previously global layout state to know if a
stream is viewed and should be downloaded.

closes odoo/odoo#82692

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-10 18:07:00 +02:00
Sébastien Theys 1bc57cd96e [IMP] mail: move hasParentReloadOnMessagePosted to models
Remove code from legacy form in preparation of Owl form.

Part of task-2871070

Part-of: odoo/odoo#93273
2022-06-10 14:58:12 +02:00
Sébastien Theys 87dc6a035d [IMP] mail: move hasParentReloadOnFollowersUpdate code to models
Remove code from legacy form in preparation of Owl form.

Part of task-2871070

Part-of: odoo/odoo#93273
2022-06-10 14:58:11 +02:00
Thanh Dodeur 307cec490a [REF] mail: move DOM function to view model
Since the addition of the CallParticipantVideoView model, it makes more
sense to have this view(DOM) related function in it.

closes odoo/odoo#93260

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-10 11:26:20 +02:00
Nam Dao 01ad802c0b [FIX] mail: dialog create res.partner is not translated
Before this commit:
After the user checked the checkbox in the mail thread, a dialog create res.partner will be shown, the content of this dialog is not translated.
After this commit:
The content of dialog will be translated

closes odoo/odoo#93104

X-original-commit: 759275b913b599bedb2380ec3200671488bfc298
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-08 16:50:50 +02:00
Alexandre Kühn 315a0d6b5b [IMP] mail: introduce PopoverManager, and some code cleaning
1. Remove useless props category on component `ChannelMemberListCategory`
2. Make fields of model `DiscussSidebarCategory` more declarative,
   i.e. by defining values from compute of field rather than imperative
   code somewhere in the code of discuss.
3. Introduce a new model `PopoverManager`, which eases use of `PopoverView`s
   as they are automatically added in the DOM in a similar way than `Dialog`s
   with `DialogManager` or `ChatWindow`s with `ChatWindowManager`.
   Doing so also make these popover view no longer deep child in component tree:
   this fixes an issue in which popover views could be cut due to DOM tree.

Task-2871688

closes odoo/odoo#92896

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-03 18:34:53 +02:00
Nemael 9830406020 [IMP] mail: introduce EmojiView model
Task-2365687

closes odoo/odoo#92485

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-02 18:58:36 +02:00
Nemael 03dc1bed08 [IMP] mail: introduce Emoji model
Task-2365687

Part-of: odoo/odoo#92485
2022-06-02 18:58:36 +02:00
Alexandre Kühn 299138350d [IMP] mail: introduce ChannelMemberListCategoryView
Task-2831082

closes odoo/odoo#91699

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-02 18:58:31 +02:00
Sébastien Theys 22f52f3700 [IMP] mail: avoid storing model manager in scope that are not cleaned
This will reduce memory leak size in tests. But the proper fix should be lower
level in the code (probably in Owl according to the stack) to ensure unnecessary
references aren't kept anymore.

Part of task-2850875

closes odoo/odoo#90934

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-02 18:58:27 +02:00
Zelong Lin ef573c692d [IMP] mail: tracking_val changed display on systray
Display the content of the tracked changes that generate a notification under the systray

task-2369610

closes odoo/odoo#86437

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-02 16:53:59 +02:00
Sébastien Theys d4ad6b9ec1 [IMP] mail: adapt message tests to use real parent (discuss/chatter)
closes odoo/odoo#92327

Related: odoo/enterprise#27976
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-02 14:43:52 +02:00
Hiral Bhavsar a35c71690a [IMP] mail: chatter file drag and drop
PURPOSE

The attachment icon in the chatter is too discrete, a lot of users easily miss
it.

SPECIFICATIONS

- Allow for file upload through drag and drop and the whole chatter.
  It doesn't matter whether the file tray is unfolded.
  Hence, removed DropZone on attachmentBox as now have DropZone on
  the whole chatter.
- On the file tray, rename "Attachments" to "Files" and
  "Add attachments" to "Attach files".
- When there are files attached to the record, display "X files".
- when there is no file yet, display 'Attach files'. Although clicking on it
  opens the file explorer, but doesn't unfold the tray yet. Once the file is
  submitted, the file tray unfolds to show confirmed upload to the user.

Task-2413814

closes odoo/odoo#91335

Related: odoo/enterprise#27763
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-01 14:16:01 +02:00