Daily updates from Odoo
Saturday, July 11, 2026
1 change
Code cleanup and technical improvements
The Knowledge comments area was internally updated to stay compatible with the newer interface framework. This should preserve the existing comments experience while reducing future maintenance risk.
Original PR description
`useLayoutEffect` is deprecated in OWL3. This replaces it with `useEffect` and moves the vertical-positioning logic into a `threadTops` getter. Two `useLayoutEffect` calls existed: one ran a batched…
`useLayoutEffect` is deprecated in OWL3. This replaces it with `useEffect` and moves the vertical-positioning logic into a `threadTops` getter. Two `useLayoutEffect` calls existed: one ran a batched vertical-dimension computation on `activeThreadId` change, the other a debounced horizontal computation on `editorThreads` change. - Horizontal: kept as a `useEffect`. Where the old hook ran on every patch, the OWL3 effect only reacts to the values it reads, so it reruns just when threads are added or removed. - Vertical: the positions can simply be derived while rendering, so the logic moved into a `threadTops` getter used by the template. This lets the render react to the relevant state on its own and drops the post-patch hook. The refactored code has test coverage — these failed when the effect was commented out and now pass: - TestESLint.test_eslint (`activeThreadId` defined but never used) - TestKnowledgeArticleTours.test_knowledge_article_comments (comments UI broken) runbot build with the effect commented out: https://runbot.odoo.com/runbot/batch/2594694/build/114736755