odoo
odoo copied to clipboard
[IMP] mail: added `@everyone` mention
Added the @everyone
mention functionality on the composer.
To do so I added a new list in the suggestion service called "special suggestions" that holds suggestions from a specific type (partner, channel or command) but doesn't use the corresponding data structure.
This is because the @everyone
option does not have a corresponding partner
object, as it will mention all of the users in the channel/group chat.
As per specifications the @everyone
option is displayed in a different category from the normal options.
Furthermore having a dedicated list will make it easier to implement other related features such as @here
(mentioning every online user) or @admins.
task-2366705
There's a special_mentions
passed to post message param, some tests need to be adapted (see red ci/runbot logs)
generateMentionsLinks
should decorate the "everyone" mention too, so that it is styled similarly.Currently we use classnames
o_mail_redirect
ando_channel_redirect
. I suggest we introduceo-discuss-mention
, so that we can target it in SCSS to share most style as the other two (minus the hover and clickable style).By the way, the style of mention is incorrect in master, this should look like this:
![]()
This regression was introduced by Bootstrap migration. This is hardly fixable due to how bootstrap forces its way to style... but it's not conceivable to make migration scripts on all messages to re-style the mentions whenever we migrate Bootstrap (hint: this takes hours to migrate!) I'm in talk to find solution for that. Nevertheless,
@everyone
should styled like a non-clickable mention.
I am not sure I understand the value of the o-discuss-mention
class. Could we not just use the existing o_mail_redirect
?
I am not sure I understand the value of the
o-discuss-mention
class. Could we not just use the existingo_mail_redirect
?
o_mail_redirect
has the static style and the dynamic hover + clickable style. If we want to distinguish both the static and dynamic part (so that @everyone
only has the static), then we need to introduce another classname