1661 Commits

Author SHA1 Message Date
Bruno Boi 3af5e57825 [FIX] component: properly capture expression of t-model 2022-02-11 10:46:44 +01:00
Géry Debongnie 979712f84e [DOC] fix error in slot documentation 2022-02-11 10:46:44 +01:00
Géry Debongnie 93f2c1d766 [FIX] reactivity: clear callbacks at destroy time instead of unmount 2022-02-11 10:46:44 +01:00
Géry Debongnie 0728c8333d [FIX] compiler: add missing ; in some places 2022-02-11 10:46:44 +01:00
Géry Debongnie 6639d361c3 [FIX] component: proper error message in dev mode in some cases 2022-02-11 10:46:44 +01:00
Lucas Perais (lpe) 72962f1dd1 [FIX] compiler: force new block for svg nested in html 2022-02-11 10:46:44 +01:00
Géry Debongnie a4d9aae9a7 [FIX] svg: allow path as root tag 2022-02-11 10:46:44 +01:00
Samuel Degueldre 1e8576ad40 [FIX] blockdom: fix VHtml patching not setting its html correctly 2022-02-11 10:46:44 +01:00
Lucas Perais (lpe) 753d82149e [FIX] compiler: t-model on select with options with dynamic values 2022-02-11 10:46:44 +01:00
Géry Debongnie 700030cc7d [DOC] update changelog renderToString example 2022-02-11 10:46:44 +01:00
Géry Debongnie d828f39a2d [FIX] reactivity: do not observe eventtarget and other stuff 2022-02-11 10:46:44 +01:00
Géry Debongnie 0a73154985 [IMP] reactivity: introduces markRaw and toRaw functions 2022-02-11 10:46:44 +01:00
Lucas Perais (lpe) d88eb34d4f [FIX] compiler: svg in new block takes the right namespace 2022-02-11 10:46:44 +01:00
Lucas Perais (lpe) a8d88d4009 [FIX] compiler: t-key on a sub-domnode pushes an anchor in parent block 2022-02-11 10:46:44 +01:00
Géry Debongnie 6d9ed0d62f [REF] utils: move batched from reactivity to utils 2022-02-11 10:46:44 +01:00
Géry Debongnie b33471e819 [IMP] component: improve error message when invalid handler 2022-02-11 10:46:44 +01:00
Géry Debongnie 3fb65b3a89 [FIX] doc: fix broken link, and fix doc link checker test 2022-02-11 10:46:44 +01:00
Géry Debongnie 09d192999a [DOC] update changelog (add browser removal to changes) 2022-02-11 10:46:44 +01:00
Géry Debongnie 466cf50b73 [FIX] playground: update window management example 2022-02-11 10:46:44 +01:00
Géry Debongnie 96620d3e8e [FIX] scheduler: make sure raf is bound to window 2022-02-11 10:46:44 +01:00
Géry Debongnie 176c89b278 [REF] scheduler: capture requestAnimationFrame asap
This is useful to prevent interactions with other testing code.
2022-02-11 10:46:44 +01:00
Géry Debongnie 38941bc26f [FIX] playground: update example to owl 2 2022-02-11 10:46:44 +01:00
Géry Debongnie ce8ddd1cbf [DOC] improve useEffect doc 2022-02-11 10:46:44 +01:00
Géry Debongnie 81f44ee5d3 [FIX] reactivity: export Reactive type 2022-02-11 10:46:44 +01:00
Géry Debongnie 99b5e9ec55 [FIX] typing: Component class should be generic on Props and Env
Otherwise, it prevents proper typing with typescript
2022-02-11 10:46:44 +01:00
Géry Debongnie 4f35f03986 [DOC] update changelog content 2022-02-11 10:46:44 +01:00
Géry Debongnie eab0caa6cb [IMP] portal: ensure that destroy is synchronous 2022-02-11 10:46:44 +01:00
Géry Debongnie 5a2c769eab [DOC] document synthetic events 2022-02-11 10:46:44 +01:00
Géry Debongnie 89d63ff29a [IMP] components: crash when using unknown suffix/modifiers 2022-02-11 10:46:44 +01:00
Lucas Perais (lpe) a2e8abc243 [FIX] component, error_handling: do not cancel the error fiber twice 2022-02-11 10:46:44 +01:00
Géry Debongnie dfd0dcedb8 [IMP] doc: add changelog to doc test, update changelog 2022-02-11 10:46:44 +01:00
Géry Debongnie ad743c205c [IMP] ci: fails if circular dependencies are found in build 2022-02-11 10:46:44 +01:00
Géry Debongnie 7c78442e43 [FIX] remove circular dependency 2022-02-11 10:46:44 +01:00
Géry Debongnie 0d13c362d3 [DOC] remove reference to catchError, fix mistake in changelog 2022-02-11 10:46:44 +01:00
Lucas Perais (lpe) 374dbb2fd9 [FIX] components: cascading render after microtaskTick (makeChildFiber)
Co-authored-by: Samuel Degueldre <sad@odoo.com>
Co-authored-by: François Georis <fge@odoo.com>
2022-02-11 10:46:44 +01:00
Géry Debongnie 2a5f37cf4b [DOC] update changelog 2022-02-11 10:46:44 +01:00
Géry Debongnie cfb6b9f958 [DOC] update translations page 2022-02-11 10:46:44 +01:00
Géry Debongnie 82f6923a21 [DOC] add more information to the slots page 2022-02-11 10:46:44 +01:00
Michael (mcm) cccb379377 [FIX] bind lifecycle callbacks to component
Before this commit, some of the callbacks were bound to the component
and some were not.
This commit makes all the callbacks bind to the component.
2022-02-11 10:46:44 +01:00
Géry Debongnie 82c7c24438 [DOC] reorganize and update documentation to owl 2 2022-02-11 10:46:44 +01:00
Jorge Pinna Puissant 41ad5db2e3 [IMP] portal: compile t-portal in an internal Component Portal
This commit also clean-up the deepRemove for the Portal that is not
needed any more.
2022-02-11 10:46:44 +01:00
Géry Debongnie 42a140a8e3 [FIX] components: only call handlers if component is mounted 2022-02-11 10:46:44 +01:00
Géry Debongnie 7711733a23 [FIX] blockdom: toString method in multi could crash 2022-02-11 10:46:44 +01:00
Lucas Perais (lpe) 281b32965e [FIX] app: t_call recursive template is bound to the correct this 2022-02-11 10:46:44 +01:00
Lucas Perais (lpe) cec451fd15 [FIX] compiler: slot are called with a specific and different key 2022-02-11 10:46:44 +01:00
Samuel Degueldre 6a7703ea82 [FIX] code_generator: stop matching other variables prefix
Previously, we would replace block declarations in some contexts with
the variable alone, and decalres the variable higher in the generated
code. Issues arise because whe sometimes try to replace "let b2" with
"b2" but end up matching "let b20" which is incorrect.

This commit fixes that by adding a space to the text that we are trying
to match ("let b2 " won't match "let b20")
2022-02-11 10:46:44 +01:00
Lucas Perais (lpe) 4a03a60084 [FIX] component, fiber: subchildren should also patch and destroy their children
Have a GrandParent which controls whether one of its GrandChildren is displayed or not.
First, the GrandChild is displayed. Then, change the state of the GrandParent in order to kill
the GrandChild.

Before this commit the GrandChild is only removed from the DOM, as bdom correctly works.
But it is not destroyed.

After this commit, the GrandChild is correctly destroyed.
2022-02-11 10:46:44 +01:00
Lucas Perais (lpe) a6bdca082a [FIX] components tests: place tests in right submodule 2022-02-11 10:46:44 +01:00
Jorge Pinna Puissant 90167c5436 [IMP] portal: portal as a Directive
Before this commit, portal was a Component, now is a directive.
This commit also clean some unused code, and fix an issue on the clean
optimization when a portal is found in a condition or a loop.
2022-02-11 10:46:44 +01:00
Lucas Perais (lpe) c221721d7f [FIX] components: avoid leaks when children are outdated/destroyed
Every use case involving some sort of key set on a component would give birth to a leak in an async context:
- If a key of a component changed, the outdated one was never destroyed.
- destroyed component were never removed from their parent's reference map.

This commit solves both issues, that are tightly linked anyway.
2022-02-11 10:46:44 +01:00