We refactor the ModelFieldSelector and ModelFieldSelectorPopover
components.
We also improve a bit ModelFieldSelectorPopover:
- on first page, the button to go back is no longer available
(so that it is now more difficult to produce an invalid path)
- we always start with a page presenting the model where the last
selected field name belongs to
- the keyboard navigation is improved
- click on model field selector opens the popover with the focus in
the search input (if any)
- for relational fields in popover: the user can either click on the
relational field (and select it) or a special button that make him
follow the relation to the field comodel
We also refactor the hook useDynamicPlaceholder to make it use a new
component DynamicPlaceholderPopover that uses ModelFieldSelectorPopover.
Task ID: 3272798
closesodoo/odoo#117951
Related: odoo/enterprise#39673
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Michaël Mattiello <mcm@odoo.com>
This PR hide the message body when the link preview is an image and the message
only contains the link to the image.
closesodoo/odoo#117772
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, chat window take at most 95% of global
height. This is ok in desktop, 5% room allow clicking on
systray menu. In mobile, however, the intend is for chat window
to take whole height.
This commit makes chat window take whole height in mobile, while
preserving the max-height 95% of global height in desktop.
Also fix an issue where chat window were foldable in mobile, when
this feature is desktop-only.
closesodoo/odoo#119058
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this PR, a link preview image would overflow out of the chat window. This
because the max-width on the image is bigger than the space dedicated to the
image inside the chat window.
This PR set the max-width to 100% inside a chat window, so the image cover the
space nicely.
closesodoo/odoo#119019
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Replaced _.each() functions (average 235 occurences)
Description of the refactoring this PR addresses:
Current behavior before PR:
There are underscore.js function enumerated above used in odoo.
Desired behavior after PR is merged:
These functions has been replaced by native javascript
prototypes/methods/functions.
TaskId : 3246238
closesodoo/odoo#118565
Signed-off-by: Georis François (fge) <fge@odoo.com>
This PR fixes a bug where the author avatar of the parent message of
a reply had the wrong avatar (the one of the of the reply
author instead of the one of the parent message author).
closesodoo/odoo#118878
Signed-off-by: Debondt Didier (did) <did@odoo.com>
This PR adds a banner on archived channels in detailed view
It also adds a banner on archived channels in kaban view, and
reduces the space available for description in case of banner.
Task-2494469
closesodoo/odoo#117619
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, im status in community was blue instead
of green.
This commit makes im status green in all version, as it should.
closesodoo/odoo#118744
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This notification makes sense when we know this message. If we don't
know it yet, then we should just ignore and receive data of link
preview when fetching the message.
closesodoo/odoo#118647
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
1. specify the Position for the usePosition();
2. fix chatter navigable list position;
3. usePosition() change;
closesodoo/odoo#118438
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
**Before this commit**
Almost all of the use cases of the `usePopover` hook are dealing
with an abnormal amount of complexity:
- they have to store the closing function of the popover, and sometimes
keep track to its opening state,
- you can find a duplication of a useUniquePopover hook, which is
anyway the behavior that is always wanted for popover users.
This is due to the fact that usePopover is just some kind of wrapper
to the lower level popover service.
**After the commit**
- The usePopover now has a new API, which simplifies its usage.
- The useUniquePopover hook implementations have been removed and
this "unique" behavior is now merged into usePopover
and has become the standard one (not configurable).
- All of the use cases have been adapted, even the cases where
components used directly the popover service (through `useService()`).
See the adapted jsDoc around the hook in popover_hook.js
closesodoo/odoo#118066
Related: odoo/enterprise#39654
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
**Before this commit**
The popovers will close on click away.
This makes impossible to start selecting text within a popover
using the mouse and finishing the move outside of the popover
(as it will get closed).
**After this commit**
Popovers will close on mousedown away instead, which is a general
standard for user interfaces anyway.
Part-of: odoo/odoo#118066
This commit adds call icons to the channel member list and
sorts this list as well as the call participant cards of the call view
based on call state (in call, raising hand, invited).
task-3251025
closesodoo/odoo#117995
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Since [1], a unique id is used for fieldNodes, therefore, the code to
keep track of last update images on the activity view needs to change
also.
Before this commit, we search the write_date on the fieldModes using the
id, and if it's not present, a new one is created using as id
"write_date".
Now, as a unique id is needed, we search using the name, and if it's not
present, a new one is created using as id "write_date_0".
Note that this is already the behavior on kanbanParse.
[1]: https://github.com/odoo/odoo/commit/baebb6a5b05ac8d59501a6071a5513e31a4ca047closesodoo/odoo#118320
Signed-off-by: Luca Vitali <luvi@odoo.com>
Prior to this commit, the separator used to separate the names of the
members of a group DM could not be translated. This is because the
string being translated is too short to be considered by the translation
system.
This commit fixes the problem by no longer relying on the Odoo
translation system and instead using the ECMAScript Internationalization
API.
closesodoo/odoo#118306
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
`useRef()` hook should only be used in `setup()` of component.
The `add()` function of emoji picker can be used anywhere.
This commit fixes the issue by limiting use of `add()` to pass
Object whose `el` is an element. We should pass the ref immediately
rather than the refName.
closesodoo/odoo#118293
Related: odoo/enterprise#39626
Signed-off-by: Debondt Didier (did) <did@odoo.com>
With this commit, messages can be pinned on a channel and
chat conversation. There's a new menu listing all pinned
messages on a conversation, and we can jump to these messages
in the current conversation.
As this feature incentives to see older messages, this commit
also adds a "Jump to Present" button when looking at old messages.
closesodoo/odoo#116666
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Adapt code of message fetch so that fetching of
(needaction) messages are controlled in a way to
keep continuous sequence of messages at all time.
This code design solves the "holes" problem in a message
list by not allowing holes. This fixes many scenario that
generated these holes, resulting in unfetchable messages.
Example of such a scenario:
- post 40 messages
- post a new message that is reply of the oldest message
- page reload and scroll up until load more
=> 10 messages are missing in-between replied message and
following message (that should have been 11 messages apart)
This code also prepares for allowing jumps in a conversation.
Part-of: odoo/odoo#116666
m2o avater user widget
This commit's purpose is to prevent a traceback when the user click on
an empty avatar user icon.
task-3254564
closesodoo/odoo#117374
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, in white theme, chat window rounded borders
had some white color leak.
This comes from background color of chat window, which is white,
while the header background color is purple.
This commit fixes the issue by setting the chat window background
color to purple. The content now defines its own color, and the
header just inherit from the chat window background color.
This commit also fixes a bug where the chat window hidden menu
items were below visible chat windows.
closesodoo/odoo#118242
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, when global height was below height
of a chat window, the chat window was overflowing.
This commit fixes the issue by ceiling the height of chat
window to the global height.
closesodoo/odoo#118229
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, the field node id (`field_id`) uses the field name
for the first occurrence on the arch, and add an underscore and a number
for the rest of the occurrences. This can create inconsistencies when
sombody assumes that the field_id is equal to the name, and don't take
into account the possibility of multiple occurrences.
Now, a unique id is created since the first occurrence, this remove all
ambiguity between the id and the name.
Part-of task-id 3179751
closesodoo/odoo#117799
Related: odoo/enterprise#39511
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
1. always show the name of the assignee.
2. replace the icon with avatar
3. bold the time info.
task-3142628
closesodoo/odoo#116349
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit adds a menu to see reaction on a message.
It can be accessed from message options or from long press in mobile.
Task-2641441
closesodoo/odoo#116022
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This PR fixes the `19916` issue on the `test_mail_channel_public_page_as_guest`
test.
The messaging service subscribes to bus notifications before it is fully
initialized. This test is composed of two tours. In the first one, the guest joins
the channel and receives the "guest has joined the channel" message. Then, the second
tour starts and the local storage is cleared. Since the local storage has been cleared,
the guest receives this message again, potentially before messaging has been initialized
which leads to a `channel_pin` rpc. This RPC fails with `SessionExpired` error and the tour
is stuck and eventually, fails.
closesodoo/odoo#118000
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit improves the overlay icon that appears on call participant
cards when an error in the media players occur. The icon is now
clickable, which restarts an attempt to play all the `HTMLMediaElement`s
of the call as a recoverable error can occur when the browser does not
allow `HTMLMediaElement`s being played outside a user interaction.
other related changes:
* removing the `pointer-event:none` from the overlay as it was preventing
hover events, and the title tooltip from appearing.
* removing the try/catch around the `srcObject` assignment, as it should
only crash on old browsers without support for `srcObject` for which the
support of using the alternative (`URL.createObjectUrl` with
`src`) is being dropped.
closesodoo/odoo#117446
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit adds a new prop to the Dropdown component: autoOpen.
It is true by default and follows the current behavior of all
current dropdowns (automatically open the dropdown when it is
hovered and a sibling is already opened) when set to true and
disable this feature for the dropdown when set to false.
The commit also applies this new property and set it to false on
all small icon dropdowns that are present by default in the
enterprise navbar to facilitate navigation with these (debug,
messaging and activity)
opw-3259473
closesodoo/odoo#117622
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Some code in handle notification wrongly assumes `store.user`
is set, as it reads `user.id`. This is correct when the user
is authenticated as an internal user, but for guests this is
incorrect.
This commit adapt code of handling notifications so that
`store.user` can be undefined for guests.
Fix runbot issue 19978
closesodoo/odoo#117647
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This happens intentionally on tours that finishes successfully
before the emojis are fully loaded. Notably short tours like
public discuss page show this case.
The console.warn still trigger unhappy runbot. Functionally
the emoji picker shows "Failed to load emoji", so this warning
becomes useless.
Fix runbot issue 20081
closesodoo/odoo#117642
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
This may happen when receiving a new message without setting
the self persona yet.
Fix runbot issue 19975
closesodoo/odoo#117633
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit converts almost all odoo module by native module.
The goal is to deprecate odoo.define in favor of native module and then
simplify boot.js by removing the regexp that finds module dependencies.
task id: 3162300
closesodoo/odoo#117305
Related: odoo/enterprise#39118
Signed-off-by: Géry Debongnie <ged@odoo.com>
Since this component is imported and used in many places, it is more
convenient to move this component a core component instead of a
component made exclusively for the Many2ManyTagsField component.
This change makes the usage of TagsList possible by SelectMenu, which
would create issues as the fields folder should not be imported in
other modules.
Part-of: odoo/odoo#115799
This commit exports the function responsible for setting up the mail registries in tests.
This is usefull if one doesn't want to instanciate a full webClient in tests and still have mail features.
Part-of: odoo/odoo#115799