Skip to content
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

[IMP] mail: improve document chat window #30957

Closed

Conversation

Projects
None yet
5 participants

@robodoo robodoo added the seen 🙂 label Feb 8, 2019

@ppr-odoo ppr-odoo force-pushed the odoo-dev:master-doc-chat-window-imp-ppr branch Feb 8, 2019

@C3POdoo C3POdoo added the RD label Feb 8, 2019

Show resolved Hide resolved addons/mail/static/src/js/models/messages/message.js Outdated
Show resolved Hide resolved addons/mail/static/tests/systray/systray_messaging_menu_tests.js
Show resolved Hide resolved addons/mail/static/src/xml/discuss.xml Outdated
Show resolved Hide resolved addons/mail/static/src/js/systray/systray_messaging_menu.js Outdated

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

@ppr-odoo ppr-odoo force-pushed the odoo-dev:master-doc-chat-window-imp-ppr branch Feb 11, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Feb 11, 2019

@ppr-odoo ppr-odoo force-pushed the odoo-dev:master-doc-chat-window-imp-ppr branch Feb 21, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Feb 21, 2019

@mba-odoo mba-odoo force-pushed the odoo-dev:master-doc-chat-window-imp-ppr branch Feb 22, 2019

@alexkuhn
Copy link
Contributor

alexkuhn left a comment

This is not the correct way to do it. In the model Message, the document name never changes, so it makes no sense to provide empty string in the model.

The correct way would be to keep the true information in the Message model (so no diff at all in this file) and to put rendering options to not show the document link. In fact, there's already an option for that if you look at the template:
https://github.com/odoo/odoo/blob/master/addons/mail/static/src/xml/thread.xml#L310

This is used by the field widget mail_thread in order to not not display document links on each message:
https://github.com/odoo/odoo/blob/master/addons/mail/static/src/js/thread_field.js#L44

So if you want to do the same with document chat window, this options displayDocumentLink should be set for document threads. Something like here:
https://github.com/odoo/odoo/blob/master/addons/mail/static/src/js/thread_windows/abstract_thread_window.js#L81

And it should look like this:

var options = {
   displayMarkAsRead: false,
   displayStars: this.options.displayStars,
};
if (this._thread && this._thread.getType() === 'document_thread') {
   options.displayDocumentLinks = false;
}
this._threadWidget = new ThreadWidget(this, options);
Show resolved Hide resolved addons/mail/static/tests/systray/systray_messaging_menu_tests.js Outdated

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

@ppr-odoo ppr-odoo force-pushed the odoo-dev:master-doc-chat-window-imp-ppr branch Feb 22, 2019

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

@mba-odoo mba-odoo force-pushed the odoo-dev:master-doc-chat-window-imp-ppr branch Feb 22, 2019

@mba-odoo mba-odoo force-pushed the odoo-dev:master-doc-chat-window-imp-ppr branch to 9c939c7 Feb 22, 2019

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

[IMP] mail: Improve the document chat window
On Hover the systray, add 'expand' icon, it directly open the form view.

Delete the name of the task on all messages: only keep it in the header of the chat window.
For messages on praticular document do not diplay the Document Links in chatter window.

Task:1929169

closes odoo#30957

@ppr-odoo ppr-odoo force-pushed the odoo-dev:master-doc-chat-window-imp-ppr branch from f80e878 to 969e1f1 Mar 28, 2019

ppr-odoo added a commit to odoo-dev/odoo that referenced this pull request Mar 28, 2019

[IMP] mail: Improve the document chat window
On Hover the systray, add 'expand' icon, it directly open the form view.

Delete the name of the task on all messages: only keep it in the header of the chat window.
For messages on praticular document do not diplay the Document Links in chatter window.

when user click on the expand button icon, it will open the task.

fix the font size in chatter. (on,from)

Task:1929169

closes odoo#30957

@ppr-odoo ppr-odoo force-pushed the odoo-dev:master-doc-chat-window-imp-ppr branch from 969e1f1 to 1cc5c75 Mar 29, 2019

ppr-odoo added a commit to odoo-dev/odoo that referenced this pull request Mar 29, 2019

[IMP] mail: Improve the document chat window
On Hover the systray, add 'expand' icon, it directly open the form view.

Delete the name of the task on all messages: only keep it in the header of the chat window.
For messages on praticular document do not diplay the Document Links in chatter window.

when user click on the expand button icon, it will open the task.

fix the font size in chatter. (on,from)

Task:1929169

closes odoo#30957

@robodoo robodoo added the CI 🤖 label Mar 29, 2019

@mba-odoo mba-odoo force-pushed the odoo-dev:master-doc-chat-window-imp-ppr branch from 1cc5c75 to 108de14 Apr 8, 2019

mba-odoo added a commit to odoo-dev/odoo that referenced this pull request Apr 8, 2019

[IMP] mail: Improve the document chat window
On Hover the systray, add 'expand' icon, it directly open the form view.

Delete the name of the task on all messages: only keep it in the header of the chat window.
For messages on praticular document do not diplay the Document Links in chatter window.

when user click on the expand button icon, it will open the task.

fix the font size in chatter. (on,from)

Task:1929169

closes odoo#30957

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Apr 8, 2019

@alexkuhn alexkuhn force-pushed the odoo-dev:master-doc-chat-window-imp-ppr branch from 108de14 to 7c27704 Apr 15, 2019

@robodoo robodoo removed the CI 🤖 label Apr 15, 2019

@alexkuhn alexkuhn changed the title Master doc chat window imp ppr [IMP] mail: improve document chat window Apr 15, 2019

@alexkuhn

This comment has been minimized.

Copy link
Contributor

alexkuhn commented Apr 15, 2019

@robodoo robodoo added the r+ 👌 label Apr 15, 2019

@robodoo

This comment has been minimized.

Copy link
Contributor

robodoo commented Apr 15, 2019

'ci/runbot' failed on this reviewed PR.

1 similar comment
@robodoo

This comment has been minimized.

Copy link
Contributor

robodoo commented Apr 15, 2019

'ci/runbot' failed on this reviewed PR.

[IMP] mail: improve document chat window
1. In the systray messaging menu, when hovering on a notification
linked to a document chat, it now shows an "expand" icon. Clicking
on icon opens the corresponding form view with the chatter.

2. Messages in a document chat window no longer show linked document
in their header, as this is redundant with title of chat window.

3. Font size of words "on" and "from" in header of message in chat
windows have been reduced in order to closely match font size of
document link.

Task-ID 1929169

@alexkuhn alexkuhn force-pushed the odoo-dev:master-doc-chat-window-imp-ppr branch from 7c27704 to 8f57c22 Apr 15, 2019

@robodoo robodoo removed the r+ 👌 label Apr 15, 2019

@alexkuhn

This comment has been minimized.

Copy link
Contributor

alexkuhn commented Apr 15, 2019

robodoo pushed a commit that referenced this pull request Apr 15, 2019

[IMP] mail: improve document chat window
1. In the systray messaging menu, when hovering on a notification
linked to a document chat, it now shows an "expand" icon. Clicking
on icon opens the corresponding form view with the chatter.

2. Messages in a document chat window no longer show linked document
in their header, as this is redundant with title of chat window.

3. Font size of words "on" and "from" in header of message in chat
windows have been reduced in order to closely match font size of
document link.

Task-ID 1929169

closes #30957

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
@robodoo

This comment has been minimized.

Copy link
Contributor

robodoo commented Apr 15, 2019

Merged, thanks!

@robodoo robodoo closed this Apr 15, 2019

@alexkuhn alexkuhn deleted the odoo-dev:master-doc-chat-window-imp-ppr branch Apr 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.