Monday, July 3, 2023
2 changes · master
Code cleanup and technical improvements
This change simplifies the internal handling of date and time fields so they can react more reliably to upcoming interface updates. It also consolidates duplicate comparison logic, reducing maintenance effort and the risk of inconsistent behavior.
Original PR description
## [REF] web,*: Centralize shallowEqual Before this commit, 2 implementations of a "shallowEqual" function coexisted, one in 'web/core/utils/objects.js' and another in 'web/core/utils/arrays.js'.…
## [REF] web,*: Centralize shallowEqual Before this commit, 2 implementations of a "shallowEqual" function coexisted, one in 'web/core/utils/objects.js' and another in 'web/core/utils/arrays.js'. This commit only keeps the one in objects.js and makes the other simply import and export it as well (easier to maintain while also easier to find for those who want to work with arrays), while also taking an optional comparison function argument in case the comparison needs to be more specific (e.g. compare DateTime objects). ## [REF] web: Make datetime hook independant from props This commit makes the datetime hook independant from the props update mechanism it previously relied on (onWillStart & onWillUpdateProps) to update its internal value. This was an incoming issue as the future relational model will rely on fine-grained reactivity to update the fields rather than updating the model and re-rendering all child components (effectively calling 'onWillUpdateProps'). Now, the hook relies on an internal state that tracks whether the props given by its caller changed from one render to another, which is check at render time (= 'onWillRender'). --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update tidies the payment and Stripe onboarding setup after a previous change. It helps keep the payment configuration flow easier to maintain, with minimal expected impact for users.