summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/xml/chat_window.xml
AgeCommit message (Collapse)Author
2018-07-02[REF] mail: JS mail refactoringAlexandre Kühn
---------------------- Summary ---------------------- The purpose of this commit is to improve the JS code of the `mail` module. It applies the new coding guidelines and makes some changes on the design of some modules, such as the old ChatManager module. Here is a short summary of the changes that have been made: 1. New coding guidelines - snake_case to camelCase - prefix private attributes and methods with '_' - jsdoc on most methods - one class per module 2. Rename/Merge some classes - 'chat manager' becomes 'mail manager' (internal) and 'mail service' (external) - 'chat window manager' is now included in mail manager - 'thread' widget now named 'thread widget' 3. New model abstraction for mail objects: - modules 'mail.model.*' - modeling: 0..1 0..1 * * ThreadWindow <------> Thread <-------> Message / \ / \ Thread With Cache Document Thread / | \ / | \ Mailbox Channel Support Channel | | DM - Thread: the superclass of threads. - ThreadWindow: the window component of a thread. - Message: mail objects representing messages. - Thread With Cache: threads that can be used with search view (Discuss app compatible). - Document Thread: represents the thread part of a chatter. - Mailbox: represents what was previously called 'static' channel, e.g. 'Inbox'. - Channel: mail objects representing channels, including livechat. - DM: special kind of Channel for 1:1 communication in the backend. - Support Channel: special channel for im_support module. This new modeling approach let us easily add features on all threads, such as the possibility to put any thread in a small window. ---------------------- Known issues ---------------------- [Already Present in Master] 1. When the Discuss app is in the background with 'Inbox' as the selected Thread, when clicking on a document thread preview in the messaging menu of the systray, the rainbow man appears. 2. When a document with the chatter is in the background, when receiving an inbox notification from this document thread, the document thread is automatically marked as read, which removes the notification right away. 3. Sometimes, opening a DM window from the "blank" thread window does not work. 4. Reply-to feature on Inbox is not working: no message is sent in the document thread. 5. On the first login of admin user with demo data, the inbox counter is wrong (it displays 6, instead of 3). Explanation after investigation: > On page load, it fetches the correct number of Inbox messages (3), but the server notifies of 3 needaction messages right away, so it wrongly assumes these are new needaction messages. > Not possible for web client to detect that these messages should not increment the Inbox counter while keeping same API. 6. Notifications for new document thread messages only work when the user sets 'handle with Odoo' for the Notification Management in the preferences. > due to notifications on the longpoll bus for document thread messages that come from needaction notifications. > requires server-side changes to send notification on the longpoll bus to mentionned user. [New] 7. When receiving a message on a unjoined channel, thread window flickers ('open' > 'close' > 'open') Explanation after investigation: > JS logic: a) On auto-join, ask server to join the channel and get channel infos. b) The info tells the channel is not detached, but JS code makes decision to detach it, and tells server the channel is now detached. c) From (a), server notifies on longpoll bus the state of channel, which is not detached. The web client thinks that the window state of the channel has been changed somewhere else, and the channel is now closed. d) From (b), server notifies on longpoll bus the state of channel, which is detached. The web client opens the thread window of this channel. > The flicker didn't occur before refactoring because the web client was only updating the model of channel when it receives the longpoll notification. > Server behaviour on 1st longpoll notification is necessary for cross-tab synchronization for channel window state. > New design implies that model and view should be synchronized, hence the issue now. > Solution: remove server-side thread window synchronization and replace with client-side synchronization. ---------------------- Hacks ---------------------- The module `im_livechat` now uses mail objects that are compatible with Message and Window objects: Modeling for messages: AbstractMessage / \ / \ LivechatMessage Message - AbstractMessage: message compatible with the thread widget. - LivechatMessage: message used by im_livechat. - Message: message used with the mail manager. Modeling for thread windows: AbstractThreadWindow / \ / \ LivechatWindow ThreadWindow - AbstractThreadWindow: behaviour share between all types of thread windows. - LivechatWindow: window used by im_livechat. - ThreadWindow: window used with mail_manager. The reason for these hacks are twofold: 1. Use the thread widget in the frontend and livechat external lib bundles. 2. Do not have a dependency with the mail manager in the frontend and external lib bundles.
2018-06-22[IMP] Improve compatibility with screen readers (accessibility) (#24574)kujiu
Today, Odoo is really tricky to use without seeing the screen, it must be improved to be usable. This PR forbid to use labels without a "for" attribute, add some title, rule and aria attributes in HTML. With that, Odoo will be fully usable with a screen reader. * [IMP] Labels must have a for attribute. Improve accessibility. * [IMP] Better error message when trying to read a missing cached value * [FIX] Add some aria-label and title attributes for screen readers. * [FIX] Template name is not included in the error message in case of SyntaxError in QWeb * [FIX] Improve the Tour failed at step error message to be more explicit. * [IMP] Add aria-labels * [FIX] Add missing aria-label on failing test * [IMP] aria-hidden means hidden. Fix all bad aria-hidden and hide aria-hidden for all. * [IMP] Color names on kanban views and many2many tags * [IMP] Add some checks on views for accessibility. * [IMP] Add `alt` attribute on `img` tags. * [IMP] Add aria-label and title on non-described icons * [IMP] Add button role to widgets with btn class * [IMP] Translate aria and formatted attributes. * [IMP] Remove wrong aria-labelledby * [IMP] Add menu role on dropdowns * [IMP] Buttons must be focusable * [IMP] Add aria attributes on progress bars * [IMP] Improve accessibility of basic widgets * [IMP] Change main layout to more semantic tags * [IMP] Add menuitem role when missing * [IMP] Remove wrong role='presentation' * [IMP] Improve accessibility of tab panels * [IMP] Add aria-invalid on invalid fields * [IMP] Add aria-sort on ordered columns * [IMP] Add role on alerts * [IMP] Use dialog role, header, main and footer tags for modals * [IMP] Add labels on o_status * [IMP] Improve accessibility of kanban view with feeds and articles * [IMP] Add alerts in case of new messages * [IMP] Add widget, navigation or img role to aria-labelled items
2017-11-17[REF] *: renaming AppSwitcher to HomeMenuAlexandre Kühn
Summary: AppSwitcher => HomeMenu AppSwitcherMenu => HomeStudioMenu Details: application_switcher => home_menu application-switcher => home-menu AppSwitcher => HomeMenu appswitcher => home_menu AppSwitcherMenu => HomeStudioMenu appswitcher_menu => home_studio_menu app_switcher => home_menu app-switcher => home-menu app_switcher_menu => home_studio_menu
2017-09-19[FIX] mail: fix due to the changes for the app switcher whitelistfwi-odoo
The app switcher in the enterprise branch introduces a new way to whitelist the element in the app switcher. This commit apply this mechanism to the mail windows.
2017-09-15[IMP] im_livechat, mail: Discuss UI in mobileAaron Bohy
- Extract mobile specific code for the client action to a specific file - Massive clean of less rules - Unify channels preview of the systray dropdown and the mobile UI of Discuss - Ensure to only load the last message of each channel in mobile, as this is not used in desktop (unless the user opens the systray menu) - Make livechat available in Discuss mobile UI
2017-09-15[IMP] mail: improve Discuss UI for mobile devicesDharmang Soni
- Brand new UI for Discuss client action (with tabs for Inbox, chats, channels...) - In mobile, conversations always open in Chat Windows - Chat window UI improved (both mobile and desktop) - Channels preview (used in the systray menu, and now in the mobile UI of Discuss) improved - Other minor less tweaks
2017-09-05[REF] mail: review new chatter designqsm-odoo
- Use classes instead of repeated mixins - Add real user avatar instead of fake one - Reorganize LESS rules
2017-07-10[FIX] mail: prevent chat window buttons to wrap on multiple linesMohammed Shekha
2016-05-03[IMP] im_livechat,mail: mention in backend chat windowsAaron Bohy
The BasicComposer widget is now used in chat windows, which enables the mention feature. This is only for the backend, as for the livechat windows in the frontend, the composer is still a simple input. Classname 'o_chat_input' has been renamed into 'o_chat_composer' (the root classname of the basic composer) for uniformity in the JS and LESS code of chat windows.
2016-03-02[REF] mail: code refactoringAaron Bohy
- extended_chat_window feature in its own files: as it is only available in the backend, we don't want it in the frontend assets (which contain the 'basic' chat_window) - move followers feature in its own files - creation of the 'mail.utils' module in utils.js - creation of systray.less to define the style of the mail item and dropdown in the navbar - use of chat_manager's search_partner function in PartnerInviteDialog - some code linting
2016-02-08[FIX] mail: display user status in chat windowsAaron Bohy
2016-02-01[FIX] mail: systray: move Inbox counter to its own itemAaron Bohy
Clicking on that item redirects to the Inbox in Discuss. The messaging menu's counter is now the number of conversations (public or private channels, dm and livechat) in which there is at least one unread message. Moreover, it is emphasized when one of those conversations is a chat. Also make mass-mailing channels available through the messaging menu (for consistency as its counter takes those channels into account) and allow to open them in chat windows without input.
2016-01-25[FIX] im_livechat,mail: various livechat fixesAaron Bohy
- prevent concurrent opening of the chat window - take into account the placeholder value of the livechat session record - don't send welcome message if empty
2016-01-14[IMP] mail: open dm shortcut from in navbar dropdownAaron Bohy
Allows to directly open a dm channel from a chat window, without coming back to Discuss.
2016-01-14[IMP] mail: put chat windows in a dropdown in case of overflowAaron Bohy
Former algorithm to display chat windows was pretty basic: each window was positionned 5 pixels to the left of the previous one, starting from the bottom right corner of the screen. Thus, when there were too many chat windows to fit in the screen, they overflowed to the left. This rev. handles this case by hidding overflowing chat windows and making them available in a dropdown positionned 5 pixels to the left of the last visible chat window.
2015-10-06[IMP] mail: prepare livechat integrationAaron Bohy
- Extract sub-templates for client action's sidebar to ease the livechat integration - Handle livechat's channel_type and messages in chat manager - Make scrollBottom work in the frontend
2015-10-01[REF] mail: second part of the chat refactoring (client side)Géry Debongnie
Joint work with aab