New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MERGE] mail, hr_holidays, *: add out of office status #29974

Closed
wants to merge 8 commits into
base: master
from

Conversation

Projects
None yet
4 participants
@Xavier-Do
Copy link
Contributor

Xavier-Do commented Jan 7, 2019

*: base, bus, mail_bot, test_mail

Before this task, it was not easy to tell when a user is not available (or is on holiday)
from conversations, such as from chat windows.

With this task, a user can now tell that he is out-of-office from the user menu preferences,
by defining an an out-of-office message. This information will be displayed to other users from
chat conversations and mention suggestions (i.e. with @).

Also, the computation of the user im_status has been changed when he has an active leave:
an out-of-office message can be set on the leave, and this will be displayed on conversations
instead of the user's out-of-office message from the user menu preferences.

Task: 1856205

@robodoo robodoo added the seen 🙂 label Jan 7, 2019

@C3POdoo C3POdoo added the RD label Jan 7, 2019

@Xavier-Do Xavier-Do force-pushed the odoo-dev:master-out-of-office-xdo branch 8 times, most recently Jan 7, 2019

Show resolved Hide resolved addons/mail/static/src/js/services/mail_status_manager.js Outdated
Show resolved Hide resolved addons/mail/static/src/js/services/mail_status_manager.js Outdated
Show resolved Hide resolved addons/mail/static/src/js/services/mail_status_manager.js Outdated
Show resolved Hide resolved addons/mail/static/src/js/services/mail_status_manager.js
Show resolved Hide resolved addons/mail/static/src/js/services/mail_status_manager.js Outdated
Show resolved Hide resolved addons/mail/static/src/js/services/mail_status_manager.js Outdated
Show resolved Hide resolved addons/mail/static/src/js/services/mail_status_manager.js Outdated
Show resolved Hide resolved addons/mail/static/src/js/services/mail_status_manager.js Outdated
Show resolved Hide resolved addons/mail/static/src/js/models/threads/dm_chat.js Outdated
Show resolved Hide resolved addons/mail/static/src/js/models/threads/dm_chat.js Outdated

@Xavier-Do Xavier-Do force-pushed the odoo-dev:master-out-of-office-xdo branch 4 times, most recently Jan 7, 2019

@robodoo robodoo added the CI 🤖 label Jan 8, 2019

@Xavier-Do Xavier-Do force-pushed the odoo-dev:master-out-of-office-xdo branch Jan 14, 2019

@robodoo robodoo removed the CI 🤖 label Jan 14, 2019

@Xavier-Do Xavier-Do force-pushed the odoo-dev:master-out-of-office-xdo branch 2 times, most recently to cb31854 Jan 14, 2019

@Xavier-Do Xavier-Do requested review from tde-banana-odoo and tivisse Jan 16, 2019

@Xavier-Do Xavier-Do changed the title Master out of office xdo [IMP] mail, hr_holidays: add out of office status Jan 16, 2019

@robodoo robodoo added the CI 🤖 label Jan 16, 2019

@Xavier-Do Xavier-Do force-pushed the odoo-dev:master-out-of-office-xdo branch from 1548a92 Jan 17, 2019

@robodoo robodoo removed the CI 🤖 label Jan 17, 2019

@Xavier-Do Xavier-Do force-pushed the odoo-dev:master-out-of-office-xdo branch Jan 17, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Jan 17, 2019

[IMP] mail: correctly patch mail status manager timers
We want to avoid that a `setTimeout` started in one test has an impact on other
tests. This is especially true with the status update loop. Since mail_service
is used in multiple tests, the safest solution is to patch timeouts everytime
we make a call to getMailServices.
There is no need for an unpatch, the patch become the default behaviour until
the page is refresh at the end of tests.

It is possible to manually add the patch after calling `getMailServices`
```
this.services = mailTestUtils.getMailServices(this);
this.timeoutMock = mailTestUtils.patchMailTimeouts();
```
This can be usefull if we want to get the timeoutMock to simulate time changes.

Task: 1856205

@Xavier-Do Xavier-Do force-pushed the odoo-dev:master-out-of-office-xdo branch Feb 7, 2019

@robodoo robodoo removed the CI 🤖 label Feb 7, 2019

@Xavier-Do Xavier-Do force-pushed the odoo-dev:master-out-of-office-xdo branch 4 times, most recently to 0da9d71 Feb 7, 2019

@robodoo robodoo added the CI 🤖 label Feb 7, 2019

Show resolved Hide resolved addons/mail/models/mail_channel.py Outdated
Show resolved Hide resolved addons/mail/models/mail_channel.py Outdated
Show resolved Hide resolved addons/mail/models/mail_channel.py
Show resolved Hide resolved addons/mail/models/mail_channel.py Outdated
Show resolved Hide resolved addons/mail/models/mail_channel.py Outdated
Show resolved Hide resolved addons/mail/models/mail_channel.py Outdated
[IMP] mail, hr_holidays: improve channel_info
`channel_info` can be called on multiple channels especially during
the init_messaging. The current implementation will perform read and
other queries in the loop. This commits aims to refactor `channel_info`
in order to read all informations in database out of the loop.

Computation of members informations is now the same as for `direct_partner`
As a side effect direct partner will have an email adress and members will have
im_status and out_of_office message if the partner is in a
channel of type chat. It would be easier to compute im_status in all case but
this could create performances issues when calling channel info on channel with
hundreds of users.

channel_fetch_preview will make a query in database in any case but seems to work ok
in api multi. We can put it out of the loop.

44ac790 fix shouldn't be broken by this refactoring since we are no longer using the many2many to find direct_partners.

@Xavier-Do Xavier-Do force-pushed the odoo-dev:master-out-of-office-xdo branch from 0da9d71 to a38aa0a Feb 11, 2019

@robodoo robodoo removed the CI 🤖 label Feb 11, 2019

@alexkuhn

This comment has been minimized.

Copy link
Contributor

alexkuhn commented Feb 11, 2019

@robodoo

This comment has been minimized.

Copy link
Contributor

robodoo commented Feb 11, 2019

Because this PR has multiple commits, I need to know how to merge it:

  • merge to merge directly, using the PR as merge commit message
  • rebase-merge to rebase and merge, using the PR as merge commit message
  • rebase-ff to rebase and fast-forward
@alexkuhn

This comment has been minimized.

Copy link
Contributor

alexkuhn commented Feb 11, 2019

@robodoo rebase-merge

@robodoo

This comment has been minimized.

Copy link
Contributor

robodoo commented Feb 11, 2019

Merge method set to rebase and merge, using the PR as merge commit message

robodoo added a commit that referenced this pull request Feb 11, 2019

[MERGE] mail, hr_holidays, *: add out of office status
*: base, bus, mail_bot, test_mail

Before this task, it was not easy to tell when a user is not available (or is on holiday)
from conversations, such as from chat windows.

With this task, a user can now tell that he is out-of-office from the user menu preferences,
by defining an an out-of-office message. This information will be displayed to other users from
chat conversations and mention suggestions (i.e. with `@`).

Also, the computation of the user `im_status` has been changed when he has an active leave:
an out-of-office message can be set on the leave, and this will be displayed on conversations
instead of the user's out-of-office message from the user menu preferences.

Task: 1856205

closes #29974
@robodoo

This comment has been minimized.

Copy link
Contributor

robodoo commented Feb 11, 2019

Merged, thanks!

@robodoo robodoo closed this Feb 11, 2019

alexkuhn added a commit to odoo-dev/odoo that referenced this pull request Feb 11, 2019

wip
--- WIP (12) ---

Todo:
- restore disabled feature(s) from this PR: odoo#29974

--- WIP (11) ---

In progress:
- component-based architecture for messaging apps

Todo:
- be able to freeze re-ordering of ordered list
composite component, such as when renaming a conversation.

--- WIP (10) ---

Todo:
- discuss content redesign
	- messages (squashed/unsquashed versions) + date separator
	- load more messages on scroll
- discuss control panel redesign
- others:
   1. mass-mailing icon in the sidebar
   2. livechat in sidebar (to be done with readapt of messaging_manager_livechat)
   3. im_support channel in sidebar (to be done with readapt of messaging_manager_support)
   4. snailmail message (to be done with readapt of messaging_manager_snailmail)

Known issues:
- Some UI caused by brute-force re-rendering:
	1. input re-rendered (hack helps keep text + selection, but it cancels composition mode...)
	2. click on '+' of channel then '+' of dm_chat does not work due to re-render when blur on add channel input
	   (this is also the case with commands next to message)
	3. each re-render autoscroll on top
	4. Does not support CSS animations/transitions
  > Note that all the issues above could be solved with smart rendering

Done:
- rendering of mailboxes, channels, dm_chats in sidebar
- dm_chat and channel counters (unread & needaction) and commands (settings & leave)
- add channel/dm_chat/rename conversation inputs with save state on re-rendering
- basic

--- WIP (9) ---

Todo:
- continue rendering of discuss sidebar
- restore all features of discuss (temporarily all removed)

Known issues:
- broken messaging menu item style
- broken chat window interactions (e.g. fold/close/server-sync)

--- WIP (8) ---

- <!!!> [TEMP] iap temporarily disabled auto-install

We should adapt snailmail to mail refactoring before re-enabling it.

--- WIP (7) ---

wip several improvements, should look at init/start model of component/sub-components...

--- WIP (6) ---

TODO:

- since thread.xml now uses `widget.` most of the time,
thread window and other parts are broken because they rely
on old template args (e.g. `thread`, `messages`, etc.)

- flatten thread windows, removed abstract widget
- thread window cleaning
- <!!!!!> removed scrolltop feature in discuss
- thread renderer cleaning

--- WIP (5) ---

todo:
 - fold state not updated on thread window
 (different thread object stored by thread window)
 => should use new thread object from updated messaging store

known issue:
 - discuss rendering is slow due to lots of update & render from messaging changes
 => future improvement with smart rendering relying on diff

--- WIP (4) ---

discuss refactoring

<!!!!!!> temporarily removed features:
	- disabled style of control panel buttons

--- WIP (3) ---

1. new messaging menu (incomplete)

- only multi-user-channel and dms are supported
- previews are not sorted correctly
- click on preview is not working
- click on mark as read preview is not working

2. reintroduced messaging models
- albeit simple objects

--- WIP (2) ---

done:
- reworked messaging `isReady`
- remove message from thread(s) handled by messaging manager
- threads and messages are stored in dictionnary with key as their ids
- messaging store in messaging service
- no longer multi_user_channel, dm_chat, mailbox, livechat, support_channel classes
- <!!!!!> [TEMP] removed fadeout effect of removed messages in discuss
- removed message classes
- messaging mixin

wip:
- manager makes immutable changes to the msg store
- make messaging-dependent component passive components (always render on any changes)

todo:
- isolate messaging window manager

--- WIP (1) ---

- clean bundles
- organize discuss structurally
- rename mail_service to messaging_service
- rename mail bus to messaging bus
- flatten thread models + remove abstract ones
- rename thread_widget to thread_renderer
- clean thread & message models
	- improve thread model instantiation parameters
	- thread name as public attribute
	- isFolded as public attribute
	- simplify autowitch logic
	- isDetached as public attribute
	- renamed detached to minimized js side
		- matches server-side definition of thread with open chat window
	- simplify fold state
	- isTwoUserThread as public attribute
- new messaging service includes: Thread, ThreadMessages and ThreadUnread
	- moved some model logic to messaging service (e.g. fetch, post messages)
- global messaging store, available to all messaging components
- rename MessagingService to MessagingManager
- [TEMP] command/event architecture with messaging_service
- [WIP] turn command/event with do_action/notify_changes and on_action/on_changes
- split systray xml
- unsubscribe handled by manager
- mark as read handled by manager
- toggle star status handled by manager
- compact some messaging manager LOCs for readability
- remove thread mixins
	- channel seen mixin
	- thread typing mixin
	- adapt tests with members already fetched
	- simplify members format (including seen and typing features)

alexkuhn added a commit to odoo-dev/odoo that referenced this pull request Feb 12, 2019

wip
--- WIP (13) ---

Todo:
- make (wip) versions of thread windows

==== OLD LOGS ====

--- WIP (12) ---

Todo:
- restore disabled feature(s) from this PR: odoo#29974

--- WIP (11) ---

In progress:
- component-based architecture for messaging apps

Todo:
- be able to freeze re-ordering of ordered list
composite component, such as when renaming a conversation.

--- WIP (10) ---

Todo:
- discuss content redesign
	- messages (squashed/unsquashed versions) + date separator
	- load more messages on scroll
- discuss control panel redesign
- others:
   1. mass-mailing icon in the sidebar
   2. livechat in sidebar (to be done with readapt of messaging_manager_livechat)
   3. im_support channel in sidebar (to be done with readapt of messaging_manager_support)
   4. snailmail message (to be done with readapt of messaging_manager_snailmail)

Known issues:
- Some UI caused by brute-force re-rendering:
	1. input re-rendered (hack helps keep text + selection, but it cancels composition mode...)
	2. click on '+' of channel then '+' of dm_chat does not work due to re-render when blur on add channel input
	   (this is also the case with commands next to message)
	3. each re-render autoscroll on top
	4. Does not support CSS animations/transitions
  > Note that all the issues above could be solved with smart rendering

Done:
- rendering of mailboxes, channels, dm_chats in sidebar
- dm_chat and channel counters (unread & needaction) and commands (settings & leave)
- add channel/dm_chat/rename conversation inputs with save state on re-rendering
- basic

--- WIP (9) ---

Todo:
- continue rendering of discuss sidebar
- restore all features of discuss (temporarily all removed)

Known issues:
- broken messaging menu item style
- broken chat window interactions (e.g. fold/close/server-sync)

--- WIP (8) ---

- <!!!> [TEMP] iap temporarily disabled auto-install

We should adapt snailmail to mail refactoring before re-enabling it.

--- WIP (7) ---

wip several improvements, should look at init/start model of component/sub-components...

--- WIP (6) ---

TODO:

- since thread.xml now uses `widget.` most of the time,
thread window and other parts are broken because they rely
on old template args (e.g. `thread`, `messages`, etc.)

- flatten thread windows, removed abstract widget
- thread window cleaning
- <!!!!!> removed scrolltop feature in discuss
- thread renderer cleaning

--- WIP (5) ---

todo:
 - fold state not updated on thread window
 (different thread object stored by thread window)
 => should use new thread object from updated messaging store

known issue:
 - discuss rendering is slow due to lots of update & render from messaging changes
 => future improvement with smart rendering relying on diff

--- WIP (4) ---

discuss refactoring

<!!!!!!> temporarily removed features:
	- disabled style of control panel buttons

--- WIP (3) ---

1. new messaging menu (incomplete)

- only multi-user-channel and dms are supported
- previews are not sorted correctly
- click on preview is not working
- click on mark as read preview is not working

2. reintroduced messaging models
- albeit simple objects

--- WIP (2) ---

done:
- reworked messaging `isReady`
- remove message from thread(s) handled by messaging manager
- threads and messages are stored in dictionnary with key as their ids
- messaging store in messaging service
- no longer multi_user_channel, dm_chat, mailbox, livechat, support_channel classes
- <!!!!!> [TEMP] removed fadeout effect of removed messages in discuss
- removed message classes
- messaging mixin

wip:
- manager makes immutable changes to the msg store
- make messaging-dependent component passive components (always render on any changes)

todo:
- isolate messaging window manager

--- WIP (1) ---

- clean bundles
- organize discuss structurally
- rename mail_service to messaging_service
- rename mail bus to messaging bus
- flatten thread models + remove abstract ones
- rename thread_widget to thread_renderer
- clean thread & message models
	- improve thread model instantiation parameters
	- thread name as public attribute
	- isFolded as public attribute
	- simplify autowitch logic
	- isDetached as public attribute
	- renamed detached to minimized js side
		- matches server-side definition of thread with open chat window
	- simplify fold state
	- isTwoUserThread as public attribute
- new messaging service includes: Thread, ThreadMessages and ThreadUnread
	- moved some model logic to messaging service (e.g. fetch, post messages)
- global messaging store, available to all messaging components
- rename MessagingService to MessagingManager
- [TEMP] command/event architecture with messaging_service
- [WIP] turn command/event with do_action/notify_changes and on_action/on_changes
- split systray xml
- unsubscribe handled by manager
- mark as read handled by manager
- toggle star status handled by manager
- compact some messaging manager LOCs for readability
- remove thread mixins
	- channel seen mixin
	- thread typing mixin
	- adapt tests with members already fetched
	- simplify members format (including seen and typing features)

alexkuhn added a commit to odoo-dev/odoo that referenced this pull request Feb 13, 2019

wip
--- WIP (13) ---

Todo:
- make (wip) versions of thread windows

==== OLD LOGS ====

--- WIP (12) ---

Todo:
- restore disabled feature(s) from this PR: odoo#29974

--- WIP (11) ---

In progress:
- component-based architecture for messaging apps

Todo:
- be able to freeze re-ordering of ordered list
composite component, such as when renaming a conversation.

--- WIP (10) ---

Todo:
- discuss content redesign
	- messages (squashed/unsquashed versions) + date separator
	- load more messages on scroll
- discuss control panel redesign
- others:
   1. mass-mailing icon in the sidebar
   2. livechat in sidebar (to be done with readapt of messaging_manager_livechat)
   3. im_support channel in sidebar (to be done with readapt of messaging_manager_support)
   4. snailmail message (to be done with readapt of messaging_manager_snailmail)

Known issues:
- Some UI caused by brute-force re-rendering:
	1. input re-rendered (hack helps keep text + selection, but it cancels composition mode...)
	2. click on '+' of channel then '+' of dm_chat does not work due to re-render when blur on add channel input
	   (this is also the case with commands next to message)
	3. each re-render autoscroll on top
	4. Does not support CSS animations/transitions
  > Note that all the issues above could be solved with smart rendering

Done:
- rendering of mailboxes, channels, dm_chats in sidebar
- dm_chat and channel counters (unread & needaction) and commands (settings & leave)
- add channel/dm_chat/rename conversation inputs with save state on re-rendering
- basic

--- WIP (9) ---

Todo:
- continue rendering of discuss sidebar
- restore all features of discuss (temporarily all removed)

Known issues:
- broken messaging menu item style
- broken chat window interactions (e.g. fold/close/server-sync)

--- WIP (8) ---

- <!!!> [TEMP] iap temporarily disabled auto-install

We should adapt snailmail to mail refactoring before re-enabling it.

--- WIP (7) ---

wip several improvements, should look at init/start model of component/sub-components...

--- WIP (6) ---

TODO:

- since thread.xml now uses `widget.` most of the time,
thread window and other parts are broken because they rely
on old template args (e.g. `thread`, `messages`, etc.)

- flatten thread windows, removed abstract widget
- thread window cleaning
- <!!!!!> removed scrolltop feature in discuss
- thread renderer cleaning

--- WIP (5) ---

todo:
 - fold state not updated on thread window
 (different thread object stored by thread window)
 => should use new thread object from updated messaging store

known issue:
 - discuss rendering is slow due to lots of update & render from messaging changes
 => future improvement with smart rendering relying on diff

--- WIP (4) ---

discuss refactoring

<!!!!!!> temporarily removed features:
	- disabled style of control panel buttons

--- WIP (3) ---

1. new messaging menu (incomplete)

- only multi-user-channel and dms are supported
- previews are not sorted correctly
- click on preview is not working
- click on mark as read preview is not working

2. reintroduced messaging models
- albeit simple objects

--- WIP (2) ---

done:
- reworked messaging `isReady`
- remove message from thread(s) handled by messaging manager
- threads and messages are stored in dictionnary with key as their ids
- messaging store in messaging service
- no longer multi_user_channel, dm_chat, mailbox, livechat, support_channel classes
- <!!!!!> [TEMP] removed fadeout effect of removed messages in discuss
- removed message classes
- messaging mixin

wip:
- manager makes immutable changes to the msg store
- make messaging-dependent component passive components (always render on any changes)

todo:
- isolate messaging window manager

--- WIP (1) ---

- clean bundles
- organize discuss structurally
- rename mail_service to messaging_service
- rename mail bus to messaging bus
- flatten thread models + remove abstract ones
- rename thread_widget to thread_renderer
- clean thread & message models
	- improve thread model instantiation parameters
	- thread name as public attribute
	- isFolded as public attribute
	- simplify autowitch logic
	- isDetached as public attribute
	- renamed detached to minimized js side
		- matches server-side definition of thread with open chat window
	- simplify fold state
	- isTwoUserThread as public attribute
- new messaging service includes: Thread, ThreadMessages and ThreadUnread
	- moved some model logic to messaging service (e.g. fetch, post messages)
- global messaging store, available to all messaging components
- rename MessagingService to MessagingManager
- [TEMP] command/event architecture with messaging_service
- [WIP] turn command/event with do_action/notify_changes and on_action/on_changes
- split systray xml
- unsubscribe handled by manager
- mark as read handled by manager
- toggle star status handled by manager
- compact some messaging manager LOCs for readability
- remove thread mixins
	- channel seen mixin
	- thread typing mixin
	- adapt tests with members already fetched
	- simplify members format (including seen and typing features)

alexkuhn added a commit to odoo-dev/odoo that referenced this pull request Feb 14, 2019

wip
--- WIP (13) ---

Todo:
- make (wip) versions of thread windows

==== OLD LOGS ====

--- WIP (12) ---

Todo:
- restore disabled feature(s) from this PR: odoo#29974

--- WIP (11) ---

In progress:
- component-based architecture for messaging apps

Todo:
- be able to freeze re-ordering of ordered list
composite component, such as when renaming a conversation.

--- WIP (10) ---

Todo:
- discuss content redesign
	- messages (squashed/unsquashed versions) + date separator
	- load more messages on scroll
- discuss control panel redesign
- others:
   1. mass-mailing icon in the sidebar
   2. livechat in sidebar (to be done with readapt of messaging_manager_livechat)
   3. im_support channel in sidebar (to be done with readapt of messaging_manager_support)
   4. snailmail message (to be done with readapt of messaging_manager_snailmail)

Known issues:
- Some UI caused by brute-force re-rendering:
	1. input re-rendered (hack helps keep text + selection, but it cancels composition mode...)
	2. click on '+' of channel then '+' of dm_chat does not work due to re-render when blur on add channel input
	   (this is also the case with commands next to message)
	3. each re-render autoscroll on top
	4. Does not support CSS animations/transitions
  > Note that all the issues above could be solved with smart rendering

Done:
- rendering of mailboxes, channels, dm_chats in sidebar
- dm_chat and channel counters (unread & needaction) and commands (settings & leave)
- add channel/dm_chat/rename conversation inputs with save state on re-rendering
- basic

--- WIP (9) ---

Todo:
- continue rendering of discuss sidebar
- restore all features of discuss (temporarily all removed)

Known issues:
- broken messaging menu item style
- broken chat window interactions (e.g. fold/close/server-sync)

--- WIP (8) ---

- <!!!> [TEMP] iap temporarily disabled auto-install

We should adapt snailmail to mail refactoring before re-enabling it.

--- WIP (7) ---

wip several improvements, should look at init/start model of component/sub-components...

--- WIP (6) ---

TODO:

- since thread.xml now uses `widget.` most of the time,
thread window and other parts are broken because they rely
on old template args (e.g. `thread`, `messages`, etc.)

- flatten thread windows, removed abstract widget
- thread window cleaning
- <!!!!!> removed scrolltop feature in discuss
- thread renderer cleaning

--- WIP (5) ---

todo:
 - fold state not updated on thread window
 (different thread object stored by thread window)
 => should use new thread object from updated messaging store

known issue:
 - discuss rendering is slow due to lots of update & render from messaging changes
 => future improvement with smart rendering relying on diff

--- WIP (4) ---

discuss refactoring

<!!!!!!> temporarily removed features:
	- disabled style of control panel buttons

--- WIP (3) ---

1. new messaging menu (incomplete)

- only multi-user-channel and dms are supported
- previews are not sorted correctly
- click on preview is not working
- click on mark as read preview is not working

2. reintroduced messaging models
- albeit simple objects

--- WIP (2) ---

done:
- reworked messaging `isReady`
- remove message from thread(s) handled by messaging manager
- threads and messages are stored in dictionnary with key as their ids
- messaging store in messaging service
- no longer multi_user_channel, dm_chat, mailbox, livechat, support_channel classes
- <!!!!!> [TEMP] removed fadeout effect of removed messages in discuss
- removed message classes
- messaging mixin

wip:
- manager makes immutable changes to the msg store
- make messaging-dependent component passive components (always render on any changes)

todo:
- isolate messaging window manager

--- WIP (1) ---

- clean bundles
- organize discuss structurally
- rename mail_service to messaging_service
- rename mail bus to messaging bus
- flatten thread models + remove abstract ones
- rename thread_widget to thread_renderer
- clean thread & message models
	- improve thread model instantiation parameters
	- thread name as public attribute
	- isFolded as public attribute
	- simplify autowitch logic
	- isDetached as public attribute
	- renamed detached to minimized js side
		- matches server-side definition of thread with open chat window
	- simplify fold state
	- isTwoUserThread as public attribute
- new messaging service includes: Thread, ThreadMessages and ThreadUnread
	- moved some model logic to messaging service (e.g. fetch, post messages)
- global messaging store, available to all messaging components
- rename MessagingService to MessagingManager
- [TEMP] command/event architecture with messaging_service
- [WIP] turn command/event with do_action/notify_changes and on_action/on_changes
- split systray xml
- unsubscribe handled by manager
- mark as read handled by manager
- toggle star status handled by manager
- compact some messaging manager LOCs for readability
- remove thread mixins
	- channel seen mixin
	- thread typing mixin
	- adapt tests with members already fetched
	- simplify members format (including seen and typing features)

alexkuhn added a commit to odoo-dev/odoo that referenced this pull request Feb 15, 2019

wip
--- WIP (13) ---

Todo:
- make (wip) versions of thread windows

==== OLD LOGS ====

--- WIP (12) ---

Todo:
- restore disabled feature(s) from this PR: odoo#29974

--- WIP (11) ---

In progress:
- component-based architecture for messaging apps

Todo:
- be able to freeze re-ordering of ordered list
composite component, such as when renaming a conversation.

--- WIP (10) ---

Todo:
- discuss content redesign
	- messages (squashed/unsquashed versions) + date separator
	- load more messages on scroll
- discuss control panel redesign
- others:
   1. mass-mailing icon in the sidebar
   2. livechat in sidebar (to be done with readapt of messaging_manager_livechat)
   3. im_support channel in sidebar (to be done with readapt of messaging_manager_support)
   4. snailmail message (to be done with readapt of messaging_manager_snailmail)

Known issues:
- Some UI caused by brute-force re-rendering:
	1. input re-rendered (hack helps keep text + selection, but it cancels composition mode...)
	2. click on '+' of channel then '+' of dm_chat does not work due to re-render when blur on add channel input
	   (this is also the case with commands next to message)
	3. each re-render autoscroll on top
	4. Does not support CSS animations/transitions
  > Note that all the issues above could be solved with smart rendering

Done:
- rendering of mailboxes, channels, dm_chats in sidebar
- dm_chat and channel counters (unread & needaction) and commands (settings & leave)
- add channel/dm_chat/rename conversation inputs with save state on re-rendering
- basic

--- WIP (9) ---

Todo:
- continue rendering of discuss sidebar
- restore all features of discuss (temporarily all removed)

Known issues:
- broken messaging menu item style
- broken chat window interactions (e.g. fold/close/server-sync)

--- WIP (8) ---

- <!!!> [TEMP] iap temporarily disabled auto-install

We should adapt snailmail to mail refactoring before re-enabling it.

--- WIP (7) ---

wip several improvements, should look at init/start model of component/sub-components...

--- WIP (6) ---

TODO:

- since thread.xml now uses `widget.` most of the time,
thread window and other parts are broken because they rely
on old template args (e.g. `thread`, `messages`, etc.)

- flatten thread windows, removed abstract widget
- thread window cleaning
- <!!!!!> removed scrolltop feature in discuss
- thread renderer cleaning

--- WIP (5) ---

todo:
 - fold state not updated on thread window
 (different thread object stored by thread window)
 => should use new thread object from updated messaging store

known issue:
 - discuss rendering is slow due to lots of update & render from messaging changes
 => future improvement with smart rendering relying on diff

--- WIP (4) ---

discuss refactoring

<!!!!!!> temporarily removed features:
	- disabled style of control panel buttons

--- WIP (3) ---

1. new messaging menu (incomplete)

- only multi-user-channel and dms are supported
- previews are not sorted correctly
- click on preview is not working
- click on mark as read preview is not working

2. reintroduced messaging models
- albeit simple objects

--- WIP (2) ---

done:
- reworked messaging `isReady`
- remove message from thread(s) handled by messaging manager
- threads and messages are stored in dictionnary with key as their ids
- messaging store in messaging service
- no longer multi_user_channel, dm_chat, mailbox, livechat, support_channel classes
- <!!!!!> [TEMP] removed fadeout effect of removed messages in discuss
- removed message classes
- messaging mixin

wip:
- manager makes immutable changes to the msg store
- make messaging-dependent component passive components (always render on any changes)

todo:
- isolate messaging window manager

--- WIP (1) ---

- clean bundles
- organize discuss structurally
- rename mail_service to messaging_service
- rename mail bus to messaging bus
- flatten thread models + remove abstract ones
- rename thread_widget to thread_renderer
- clean thread & message models
	- improve thread model instantiation parameters
	- thread name as public attribute
	- isFolded as public attribute
	- simplify autowitch logic
	- isDetached as public attribute
	- renamed detached to minimized js side
		- matches server-side definition of thread with open chat window
	- simplify fold state
	- isTwoUserThread as public attribute
- new messaging service includes: Thread, ThreadMessages and ThreadUnread
	- moved some model logic to messaging service (e.g. fetch, post messages)
- global messaging store, available to all messaging components
- rename MessagingService to MessagingManager
- [TEMP] command/event architecture with messaging_service
- [WIP] turn command/event with do_action/notify_changes and on_action/on_changes
- split systray xml
- unsubscribe handled by manager
- mark as read handled by manager
- toggle star status handled by manager
- compact some messaging manager LOCs for readability
- remove thread mixins
	- channel seen mixin
	- thread typing mixin
	- adapt tests with members already fetched
	- simplify members format (including seen and typing features)

alexkuhn added a commit to odoo-dev/odoo that referenced this pull request Feb 19, 2019

wip
<!!> Todo:
- remove dumb reliance on jquery for messaging composite components
  => huge performance issue atm

--- WIP (13) ---

Todo:
- make (wip) versions of thread windows

==== OLD LOGS ====

--- WIP (12) ---

Todo:
- restore disabled feature(s) from this PR: odoo#29974

--- WIP (11) ---

In progress:
- component-based architecture for messaging apps

Todo:
- be able to freeze re-ordering of ordered list
composite component, such as when renaming a conversation.

--- WIP (10) ---

Todo:
- discuss content redesign
	- messages (squashed/unsquashed versions) + date separator
	- load more messages on scroll
- discuss control panel redesign
- others:
   1. mass-mailing icon in the sidebar
   2. livechat in sidebar (to be done with readapt of messaging_manager_livechat)
   3. im_support channel in sidebar (to be done with readapt of messaging_manager_support)
   4. snailmail message (to be done with readapt of messaging_manager_snailmail)

Known issues:
- Some UI caused by brute-force re-rendering:
	1. input re-rendered (hack helps keep text + selection, but it cancels composition mode...)
	2. click on '+' of channel then '+' of dm_chat does not work due to re-render when blur on add channel input
	   (this is also the case with commands next to message)
	3. each re-render autoscroll on top
	4. Does not support CSS animations/transitions
  > Note that all the issues above could be solved with smart rendering

Done:
- rendering of mailboxes, channels, dm_chats in sidebar
- dm_chat and channel counters (unread & needaction) and commands (settings & leave)
- add channel/dm_chat/rename conversation inputs with save state on re-rendering
- basic

--- WIP (9) ---

Todo:
- continue rendering of discuss sidebar
- restore all features of discuss (temporarily all removed)

Known issues:
- broken messaging menu item style
- broken chat window interactions (e.g. fold/close/server-sync)

--- WIP (8) ---

- <!!!> [TEMP] iap temporarily disabled auto-install

We should adapt snailmail to mail refactoring before re-enabling it.

--- WIP (7) ---

wip several improvements, should look at init/start model of component/sub-components...

--- WIP (6) ---

TODO:

- since thread.xml now uses `widget.` most of the time,
thread window and other parts are broken because they rely
on old template args (e.g. `thread`, `messages`, etc.)

- flatten thread windows, removed abstract widget
- thread window cleaning
- <!!!!!> removed scrolltop feature in discuss
- thread renderer cleaning

--- WIP (5) ---

todo:
 - fold state not updated on thread window
 (different thread object stored by thread window)
 => should use new thread object from updated messaging store

known issue:
 - discuss rendering is slow due to lots of update & render from messaging changes
 => future improvement with smart rendering relying on diff

--- WIP (4) ---

discuss refactoring

<!!!!!!> temporarily removed features:
	- disabled style of control panel buttons

--- WIP (3) ---

1. new messaging menu (incomplete)

- only multi-user-channel and dms are supported
- previews are not sorted correctly
- click on preview is not working
- click on mark as read preview is not working

2. reintroduced messaging models
- albeit simple objects

--- WIP (2) ---

done:
- reworked messaging `isReady`
- remove message from thread(s) handled by messaging manager
- threads and messages are stored in dictionnary with key as their ids
- messaging store in messaging service
- no longer multi_user_channel, dm_chat, mailbox, livechat, support_channel classes
- <!!!!!> [TEMP] removed fadeout effect of removed messages in discuss
- removed message classes
- messaging mixin

wip:
- manager makes immutable changes to the msg store
- make messaging-dependent component passive components (always render on any changes)

todo:
- isolate messaging window manager

--- WIP (1) ---

- clean bundles
- organize discuss structurally
- rename mail_service to messaging_service
- rename mail bus to messaging bus
- flatten thread models + remove abstract ones
- rename thread_widget to thread_renderer
- clean thread & message models
	- improve thread model instantiation parameters
	- thread name as public attribute
	- isFolded as public attribute
	- simplify autowitch logic
	- isDetached as public attribute
	- renamed detached to minimized js side
		- matches server-side definition of thread with open chat window
	- simplify fold state
	- isTwoUserThread as public attribute
- new messaging service includes: Thread, ThreadMessages and ThreadUnread
	- moved some model logic to messaging service (e.g. fetch, post messages)
- global messaging store, available to all messaging components
- rename MessagingService to MessagingManager
- [TEMP] command/event architecture with messaging_service
- [WIP] turn command/event with do_action/notify_changes and on_action/on_changes
- split systray xml
- unsubscribe handled by manager
- mark as read handled by manager
- toggle star status handled by manager
- compact some messaging manager LOCs for readability
- remove thread mixins
	- channel seen mixin
	- thread typing mixin
	- adapt tests with members already fetched
	- simplify members format (including seen and typing features)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment