[19.0][MIG] web_editor_class_selector: Migration to 19.0#3328
Conversation
|
/ocabot migration web_editor_class_selector |
… editor. This module allows users to create custom CSS classes, which can then be selected and applied directly in the HTML editor.
…s not present Go to the website Open the editor Add text and select it, a traceback is shown
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: web-17.0/web-17.0-web_editor_class_selector Translate-URL: https://translation.odoo-community.org/projects/web-17-0/web-17-0-web_editor_class_selector/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: web-17.0/web-17.0-web_editor_class_selector Translate-URL: https://translation.odoo-community.org/projects/web-17-0/web-17-0-web_editor_class_selector/
Currently translated at 100.0% (18 of 18 strings) Translation: web-17.0/web-17.0-web_editor_class_selector Translate-URL: https://translation.odoo-community.org/projects/web-17-0/web-17-0-web_editor_class_selector/it/
03a5be0 to
d0c9404
Compare
carlos-lopez-tecnativa
left a comment
There was a problem hiding this comment.
LGTM, working fine, just a technical detail.
| title: {type: [String, Function], optional: true}, | ||
| getSelection: {type: Function, optional: true}, | ||
| isDisabled: {type: [Function, Boolean], optional: true}, |
There was a problem hiding this comment.
What is the reason for this change?
I see that this code already exists in v19:
https://github.com/odoo/odoo/blob/4986ffe1047e5e2b02f039314cd2dad2388db94d/addons/html_editor/static/src/main/toolbar/toolbar.js#L66-L70
There was a problem hiding this comment.
You're right, I hadn’t noticed that toolbarButtonProps was already exported from the core. I’ve updated the component to reuse the existing one instead of redefining the props manually. I also adjusted the template accordingly, following the same approach used in FontSelector. Thanks for pointing that out!
There was a problem hiding this comment.
There was a problem hiding this comment.
I've now marked those props as optional in the component and added a comment explaining why (since the Toolbar might pass undefined if the description is missing). I also updated the plugin to use description instead of title to match what the core Toolbar expects. That should fix the validation error you saw. Thanks!
d0c9404 to
fba019a
Compare
fba019a to
2171834
Compare
|
Hey, thanks for contributing! Proceeding to merge this for you. |
|
Congratulations, your PR was merged at 2fa7b00. Thanks a lot for contributing to OCA. ❤️ |

No description provided.