Sunday, February 11, 2024
2 changes · saas-17.1
Miscellaneous changes
In order to not add steps in the history when changing the slides of a carousel, commit [1] added listeners that would deactivate the observer when sliding and reactivate it when the slide is over, in the `slider` public widget. These listeners are then removed at destroy. However, the way they are removed breaks some of the carousel behaviors: - Drop a "Carousel" snippet. - Change any "Carousel" option (so not a "Slide" one). For example, set the "Height" to 50% or add a conditional visibi
Original PR description
In order to not add steps in the history when changing the slides of a carousel, commit [1] added listeners that would deactivate the observer when sliding and reactivate it when the slide is over,…
In order to not add steps in the history when changing the slides of a carousel, commit [1] added listeners that would deactivate the observer when sliding and reactivate it when the slide is over, in the `slider` public widget. These listeners are then removed at destroy. However, the way they are removed breaks some of the carousel behaviors: - Drop a "Carousel" snippet. - Change any "Carousel" option (so not a "Slide" one). For example, set the "Height" to 50% or add a conditional visibility. - Slide the carousel (with any arrow). => The slide number did not update correctly. - Remove a slide with the "-" button. => The slide was not removed. It happens because, when this widget is destroyed, it removes all the `.carousel` listeners, which means that it also removes the listeners added at the `Carousel` options start. And since the widget is destroyed and restarted every time an option is changed, but the "Carousel" options are started only once at the beginning, the removed listeners are never added back (until the next start of the options). This commit adds an id to the events managing the sliding history, to make them more specific, in order to only remove these ones when the widget is destroyed. [1]: https://github.com/odoo/odoo/commit/14bc1a9bd1ebdec3b73e268450267320b79d01cd opw-3675019 Forward-Port-Of: odoo/odoo#153575 Forward-Port-Of: odoo/odoo#153102
Oversight in 06919a232251cbd68a28500757aef5cd2e3363a0 Need to handle `default_child_ids` and `default_tag_ids` as well. Forward-Port-Of: odoo/odoo#153397 Forward-Port-Of: odoo/odoo#153152
Original PR description
Oversight in 06919a232251cbd68a28500757aef5cd2e3363a0 Need to handle `default_child_ids` and `default_tag_ids` as well. Forward-Port-Of: odoo/odoo#153397 Forward-Port-Of: odoo/odoo#153152