6772252c99011499994d77957f4d2de396f6c46b
In [1], an automatic scroll feature was introduced in order to always scroll to
the bottom of the hierarchy view after each patch.
The `isAnchor` option is removed, because in `Knowledge` it has the side effect
of completely scrolling the article down to the last card of the Hierarchy
view, hiding the rest of the view. Also, that option was not useful in the
standard configuration since there is only one scrollable parent.
Another issue is that the `scroll-behavior: smooth` css property also affects
the scroll speed of the `draggable_hook_builder`, which means that drag scroll
speed is extremely slow and does not follow the speed computed in that file.
This style is therefore removed, and `scrollTo` is refactored:
- Make use of the native `Element.scrollTo` method, which has a `behavior:
"smooth"` option.
- Move and rename methods to compute the closest scrollable from the
`draggable_hook_builder.js` to `scrolling.js`.
- They check if a scrollable has a client[Dimension] greater than 0 for
eligibility.
- They check the proper `overflow-[axis]` from the computed style (`auto`
and `scroll` are eligible).
- A test of `scroller_service_tests` was updated because even if an element
has `max-height: 0`, its children still can have a height and make their
scrollable ancestor have a `scrollHeight` greater than its own height.
- If the `scrollable` option is given to the function and the provided
element is not actually scrollable, compute a `scrollable` ancestor instead
of doing nothing.
- This is more flexible in a situation where a supposedly "scrollable" is
computed with a selector and ends up not "scrollable" in some custom
configuration (i.e. embedded view in Knowledge).
The `scrollable` option is removed, since `scrollTo` is already able to compute
the correct closest scrollable element, no need to hardcode a selector for that.
Finally, the draggable speed and threshold for the Hierarchy view are set to
the same values as a Kanban view for user experience consistency.
[1]: https://github.com/odoo/odoo/commit/3489a0d28fdbaf607d18b00d144bb00bae2727c3
task-3562116
Part-of: odoo/odoo#143941
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%