Tags: ming-808/owl
Tags
[FIX] component: various issues while mounting manually components The initial problem solved by this commit is that it was possible to get into a situation where a mounting/rendering was started, then the component was updated, but then another mounting operation begins, and it tries to reuse the previous rendering operation, which is no longer uptodate. The underlying issue is that Owl did not track properly the various internal state change of a component. These issue should be solved by the introduction of the status enum, which currently tracks 6 possible states: - CREATED - WILLSTARTED - RENDERED - MOUNTED - UNMOUNTED - DESTROYED This status number replaces the isMounted and isDestroyed boolean flags. It has the advantage of making sure that the component is in a consistent state (it is no longer possible to be destroyed and mounted, for example) Another advantage is that it gives us an easy way to track the fact that a component has been rendered, but is not in the DOM. This is a subtle situation where some various events can happen, and we need to be able to react to that case. Note that there is a change of behaviour: if a component is mounted in a specific target, then before the mounting is complete, the component is mounted in another target, we no longer reject the first mounting operation.
[FIX] crash when rendering component before mounting This commit makes sure that Owl does not crash when a component is created, then updated (for example, with a (observed) state change), and then, some moment later, mounted. The initial render is not useful, because it is not linked to a mounting action anyway. And it caused issues such as a crash when Owl tried to patch it to a non existing target
[REL] v1.2.2 # v1.2.2 This is just a small bug fix release, because we need it in Odoo. Bug fix: allow renderings for detached components. Before this release, Owl ignored renderings in some cases if a component is detached. We now still render it, because it is important in some cases.
[REL] v1.2.0 # Owl v1.2.0 ## Changes - translation fix for terms surrounded by spaces - fix: properly remount components with shouldUpdate=false - add: add two new generic hooks: and - fix: do not skip rendering in components using store and local state (in some cases) Note that the last change is a pretty significant change: component connected to a store should be very careful if the data that they represent is deleted, because they will always be rendered with the current state of the store.
[REL] v1.0.12 # Owl v1.0.12 ## Bug fixes - fix: properly handle named t-slots inside named t-slots - fix: do not render comments as text in t-raw - fix: allow dynamic template in t-call - fix: correctly handle top-level t-call with body - fix: correct cause of non determinism in tests ## Tooling improvements - setup github actions for CI - improve owl bundling pipeline - add flag in owl configuration - add prettier to github CI
PreviousNext