Commit db8fd5c0 authored by JC Brand's avatar JC Brand

Turn off message animations by default

parent db1c9c38
...@@ -2,6 +2,12 @@ ...@@ -2,6 +2,12 @@
## 3.3.1 (Unreleased) ## 3.3.1 (Unreleased)
### UI/UX changes
- Add new configuration option
[show_message_load_animation](https://conversejs.org/docs/html/configurations.html#show-message-load-animation)
with a default value of `false`. The message load animations (added in 3.3.0)
cause slowness and performance issues in Firefox, so they're now disabled by default.
### Translation changes ### Translation changes
- Updated Spanish and French translations. - Updated Spanish and French translations.
- New translation: "Simplified Chinese" - New translation: "Simplified Chinese"
......
...@@ -1138,6 +1138,16 @@ the operating system or browser (which might not support emoji). ...@@ -1138,6 +1138,16 @@ the operating system or browser (which might not support emoji).
See also `emojione_image_path`_. See also `emojione_image_path`_.
show_message_load_animation
---------------------------
* Default: ``false``
Determines whether a CSS3 background-color fade-out animation is shown when messages
appear in chats.
Set to ``false`` by default since this option causes performance issues on Firefox.
show_only_online_users show_only_online_users
---------------------- ----------------------
......
...@@ -110,6 +110,7 @@ ...@@ -110,6 +110,7 @@
'chatview_avatar_height': 32, 'chatview_avatar_height': 32,
'chatview_avatar_width': 32, 'chatview_avatar_width': 32,
'show_toolbar': true, 'show_toolbar': true,
'show_message_load_animation': false,
'time_format': 'HH:mm', 'time_format': 'HH:mm',
'visible_toolbar_buttons': { 'visible_toolbar_buttons': {
'emoji': true, 'emoji': true,
...@@ -520,10 +521,10 @@ ...@@ -520,10 +521,10 @@
}, },
getExtraMessageClasses (attrs) { getExtraMessageClasses (attrs) {
if (window.converse_disable_effects) { if (_converse.show_message_load_animation) {
return attrs.delayed && 'delayed' || '';
} else {
return 'onload ' + (attrs.delayed && 'delayed' || ''); return 'onload ' + (attrs.delayed && 'delayed' || '');
} else {
return attrs.delayed && 'delayed' || '';
} }
}, },
...@@ -566,7 +567,7 @@ ...@@ -566,7 +567,7 @@
'extra_classes': this.getExtraMessageClasses(attrs) 'extra_classes': this.getExtraMessageClasses(attrs)
}) })
)); ));
if (!window.converse_disable_effects) { if (_converse.show_message_load_animation) {
window.setTimeout(_.partial(u.removeClass, 'onload', msg), 2000); window.setTimeout(_.partial(u.removeClass, 'onload', msg), 2000);
} }
const msg_content = msg.querySelector('.chat-msg-content'); const msg_content = msg.querySelector('.chat-msg-content');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment