odoo icon indicating copy to clipboard operation
odoo copied to clipboard

[IMP] mail: added `@everyone` mention

Open Atovange opened this issue 10 months ago • 4 comments

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

Atovange avatar May 02 '24 13:05 Atovange

Pull request status dashboard.

robodoo avatar May 02 '24 13:05 robodoo

There's a special_mentions passed to post message param, some tests need to be adapted (see red ci/runbot logs)

alexkuhn avatar May 14 '24 15:05 alexkuhn

generateMentionsLinks should decorate the "everyone" mention too, so that it is styled similarly.

Currently we use classnames o_mail_redirect and o_channel_redirect. I suggest we introduce o-discuss-mention, so that we can target it in SCSS to share most style as the other two (minus the hover and clickable style).

Screenshot 2024-05-15 at 18 41 14 By the way, the style of mention is incorrect in master, this should look like this: Screenshot 2024-05-15 at 18 41 41

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?

Atovange avatar May 16 '24 10:05 Atovange

I am not sure I understand the value of the o-discuss-mention class. Could we not just use the existing o_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

alexkuhn avatar May 16 '24 11:05 alexkuhn