In 75d3121c9 the bad rating was change from 0 to 1.
This commit update the javascript feedback part so the behavior is the
one expected.
related to opw-1863312
closes#26043
- 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
This commit introduce a full redesign of all JS views. We started
basically from scratch. The goal was to unify all the various views
under a common framework, to make them testable, to make then usable in
different conditions (in studio, or in the frontend), and to make our
lives easier.
Some important points are:
- we introduced new coding guidelines (camelCase, 80 chars width, ...)
- we have a brand new testing framework (still QUnit based)
- kanban view moved to the web addon
- calendar view (formerly web_calender) moved to web as well
- the tree view was removed
- all new code should be documented
We hope that this code is the start of a new era for the Odoo web
client, we want to have a high quality codebase, well documented, well
tested, well designed.
Work done by the framework team: mostly aab, ged, chm, dmo, qsm
Some things in the ecommerce have z-index 1, 4 (product images) or 5. So
this went over the live chat button "Have a question? Chat with us."
opw-707086
Proxy.load is required by the livechat when it is embedded in an
external page, so that it is able to get the static xml files
(with the correct base_url).
opw-706497
this commit introduces the '/history' command
for an operator during a livechat session.
When the visitor load a page, its url is added in
a cookie (kept only 1 day) in order to track his
visited web pages.
The '/history' command will ask the cookie content
and send it to the operator as a transient message
in the livechat channel.
Loading history can contains sensitive informations.
You can load the history of a public conversation if
you have its uuid.
This commit stops using unsecure controller when a
secure one for this case exists !
Change color #a24689 to #875A7B
Commit https://github.com/odoo/enterprise/commit/8ac1c19fac7615fecd51e670f798d13158a4e53c
changed the odoo interface violet by changing the main LESS variable
but forgot there was many direct occurences in XML/HTML/... (for
example for the mobile browser color).
Even if it's community the odoo interface violet is used at many places
(module description, XML demo data, ...).
add customer_email_data in the add_message function, otherwise he would crash
later trying to get this key's value's length and nothing would be displayed
for the website visitor.
Currently on mobile, the livechat window would take all the viewport of
a small screen mobile browser. This combined with the "auto open"
feature can be desorienting: users could have only seen the "hello, how
may I help you ?" window and not know what to do or what is happening.
So this commit remove the "auto open" feature if user is on a too small
device (the user would thus have to click on "Have a Question").
closes#12148
opw-678012
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.
- 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
sometimes, the web client receives unsubscribe notification and an extra
notification on that channel. This is then followed by an attempt to
rejoin the channel that we just left. This commit prevents that
situation to occur.
For that, it needs to know the notifications received by the bus in one
batch, not one at a time.
@navbar-height was used in chat_window.less since rev. 8397abd but wasn't
defined in the external_lib bundle (light bundle to embed im_livechat in
external pages).
This rev. also fixes some glitches of the chat window due to missing
font-awesome, and global rule 'box-sizing: border-box' on all elements.
The function scrollBottom has been removed at rev. 30c26d7 as the scroll logic
has been moved to the thread, to make it common for the client action and chat
windows.
Moreover, the o_chat_content div has been removed from the chat window layout
at the same commit, we thus now directly replace the thread's $el by the
feedback and fix less rules
Also adapt the behavior of the livechat's chat window as done for the backend
at 30c26d7:
- scroll to bottom on message sent
- increment unread messages counter if the chat window is folded or if the
thread is not scrolled to bottom
- reset the unread counter on scroll to bottom)
The problem was that the matching rule was evaluated before sending the html
page, and the script was inserted in the page according to the matching rule
(it wasn't inserted if the rule was 'hide_button'). However, the matching rule
wasn't re-evaluated if the page was already in the cache. The page content thus
might depend on a matching rule computed for someone else in that case.
Rather than inserting the script according to the matching rule, we insert it
only if there is an operator available. We then ask for the matching rule in
the livechat widget, by RPC, and we reject its willStart deferred if the rule
says so. We also re-check for operator availability in the same RPC.
- use channel configuration for the auto_popup
- clear auto_popup timeout when chat open to prevent opening the chat twice
if the user opens it himself before the end of the timeout
- don't send message when no feedback given
* chat windows:
- input was kicked out of the window on chrome 43
- don't animate if folded by default (e.g. after a refresh)
- width and height 100% like in the frontend
- z-index to make sure that they are over bootstrap active btn,
but below notifications, and modals
* chatter:
- internal note: send button renammed to 'Log'
- send button is the first button again
- remove annoying form view widget's tooltip
* client action: focus on composer on channel change
- Don't display livechat button if no operator available
- Livechat windows persistence through website pages
- Auto popup feature re-introduced (inadvertently removed at rev. f23f57cc)
- Operators that are 'away' are available, as 'away' means that the focus isn't
on the Odoo tab for at least 10 minutes, but the user is still connected.
- Avoid duplicated messages when the visitor is a connected user
- Unfold livechat window on first 'close' click as the event is intercepted to
ask the user feedback before actually closing the window
bus.poll() should be a private function, as it initializes a new longpolling.
Only bus.start_polling() should be called as it prevents running multiple
polls concurrently.
On the website, bus.poll() was called each time the user clicked on the
livechat button, blocking the whole UI if the user clicked 6 times in a row on
that button, as only 6 RPCs can be done concurrently.
A consequence of this fix is that the poll isn't restarted if the user opens
a new livechat session just after closing one, so the messages sent through
that session are delayed (~50 seconds). To circumvent this situation, we simply
don't restore the livechat button after closing a livechat session (the button
re-appears anyway at the next click, or after a refresh).
Messages are required to be displayed in a smarter way: relative to the
current date, if it's a recent message, or absolute if not. This
commits rework most of the date processing code to comply with these
requirements.
Messages were preprocessed each time a thread is rendered, which is
stupid. It should be preprocessed only when the message is created.
This was a small problem because livechat does not use the chat manager,
so a simplified version of the preprocessing had to be done.
The Website Live Chat is supposed to appear following 3 ways outside of
the backend:
- in a singleton page with path /im_livechat/support/{id}
- in a page in which a code code snippet (with two script and a css
bundle) has been inserted in the head section
- by installing the module "Website Live Support"
In the first both instances, including some less files and bootstrap
default variables is required which this commit do.
In the last instance these file should already be included in the
website and the additional assets required are inserted in the
website.assets_frontend bundle.
opw-654898
Synchronize the unread counter between chat windows, client action and the
actual value stored in DB. This adds robustness to the counter displayed in
chat window, and allows to synchronize the client action with the chat windows
when marking messages as read.
The bus was allowed to restart polling, client side, to allow the user
to directly receive messages in new channels. This was only acceptable
as a temporary fix, the correct way to do this is to actually notify the
bus server side. This is even more urgent since the client was allowed
to keep multiple longpolls simultaneously, which degraded the experience
in some cases.