Skip to content
Snippets Groups Projects
Commit 7f5a9d04 authored by Arthur Detroux (ard)'s avatar Arthur Detroux (ard) Committed by qsm-odoo
Browse files

[FIX] web_editor, website: improve perf of color previews

Follow-up of [1].

After [2], color previews on the side panel would be changed by the
wysiwyg adapter. The adapter would add each block individually inside
the iframe and check its current styling to then add the style to the
color preview elements. This was performed many times (as color palettes
all have their own individual rendering of the color previews)
and slowed down the editor.

This commit improves that by relying on the copied variables introduced
at [3]. This removes the "re-render" of the color preview elements,
instead relying on styling rules and CSS variables which are initialized
when the editor is started.

[1]: https://github.com/odoo-dev/odoo/pull/1149#discussion_r900120846
[2]: https://github.com/odoo/odoo/commit/212a8bfdd21269b18054200b9e2585e1c95540d6
[3]: https://github.com/odoo/odoo/commit/a396f791da94d064d58cce15892e74f45d29b7b7



closes odoo/odoo#100441

Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: default avatarqsm-odoo <qsm@odoo.com>
parent 89622aa0
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment