Géry Debongnie
8d1d0a2244
[FIX] app: make sure we maintain the correct prototype chain in env
2022-03-03 16:19:05 +01:00
Géry Debongnie
0457e5d4ed
[FIX] component: missing renderings in some cases
2022-03-03 16:19:05 +01:00
Samuel Degueldre
8920b4b93a
[IMP] component, reactivity: add subscription getter in dev mode
...
This allows to see which objects and which keys in those objects a
component is observing, so that issues with missing renders or extra
renders can be more easily diagnosed.
2022-03-03 10:33:39 +01:00
Géry Debongnie
6908102a72
[IMP] app: only log dev message once
...
Before this commit, it was logged for every app created, which is
annoying in odoo: because of the compatibility layer, there are many
apps being created.
2022-03-03 08:48:37 +01:00
Géry Debongnie
d6348b8310
[REL] v2.0.0-beta.1
...
# 2.0.0-beta.1
First beta release! The last missing feature has been merged (support for
sets/maps/weakmaps in the reactivity system).
v2.0.0-beta.1
2022-03-02 13:28:50 +01:00
Géry Debongnie
79738e00c7
[REF] small cleanup for template helpers
2022-03-02 13:26:22 +01:00
Géry Debongnie
2a1b99be2d
[REM] remove the Memo component
...
With the new fine grained reactivity system, it was no longer useful.
2022-03-02 13:26:22 +01:00
Géry Debongnie
8a472231cf
[FIX] release script was using a hardcoded value for notes
...
instead of the value that was actually provided by the user
2022-03-02 13:26:22 +01:00
Géry Debongnie
bb373e6a7a
[DOC] add explanation on structure of compiled template
2022-03-01 15:46:09 +01:00
Samuel Degueldre
d735213758
[IMP] reactivity: add support for collections (Set/Map WeakSet/WeakMap)
2022-02-28 15:43:41 +01:00
Géry Debongnie
076b0d774e
[REL] v2.0.0-alpha.3
...
# v2.0.0-alpha.3
A new release, with the fine grained reactivity applied to component props,
and changes in the way Owl render subcomponents: it can now skip patching and
or rendering child components if needed.
v2.0.0-alpha.3
2022-02-25 10:57:25 +01:00
Géry Debongnie
f405fe9323
[DOC] add information about reactivity
2022-02-25 10:32:25 +01:00
Géry Debongnie
1ae9d514b9
[IMP] component: use reactivity to allow shallow renderings
...
With this commit, component only render child
components if they have different props (shallow
equality). Otherwise, we trust the reactivity
system to make sure that all impacted components
are updated
2022-02-25 10:32:25 +01:00
Géry Debongnie
592d9a458e
[REF] move useState into component_node.ts
2022-02-25 10:32:25 +01:00
Géry Debongnie
0dbd2bd463
[REF] component: slightly simplify fiber code
2022-02-18 16:21:34 +01:00
Géry Debongnie
8ec7a6f9bf
[FIX] compiler: prevent block- attributes and tags
2022-02-16 17:32:59 +01:00
Géry Debongnie
12b8ce963e
[IMP] reactivity: toRaw now works with non reactive objects
2022-02-16 09:35:36 +01:00
Géry Debongnie
bb9d65e95b
[IMP] app: better error message when missing template
2022-02-16 09:35:36 +01:00
Géry Debongnie
73c339fff1
[DOC] remove outdated event bus doc
2022-02-15 10:31:03 +01:00
Géry Debongnie
406be446a5
[FIX] app: display correct url in dev mode message
...
closes #850
2022-02-15 10:15:07 +01:00
Géry Debongnie
bd2aa8a72f
[MISC] playground: improve benchmarking code
2022-02-15 09:07:32 +01:00
Géry Debongnie
3536f41f00
[FIX] blockdom: undefined properties are treated as empty strings
2022-02-15 09:07:32 +01:00
Samuel Degueldre
804ad3c35e
[IMP] component: improve errors when thrown from lifecycle hooks
...
Previously, a crash in a lifecycle hook for any reason would throw an
error whose stack trace started from the scheduler and contained only
the place where the hook was called by owl, but not the place where the
hook was registered by the user. This proved very difficult for users to
debug as they cannot really tell which component registered that hook.
This commit alleviates the issue by creating a new Error when the hook
is originally called, and wrapping the registered callback in a try
catch, throwing an error with the correct stack trace instead of the
error in the hook, and setting the error in the hook as the cause of
this synthetic error.
2022-02-14 13:54:17 +01:00
Géry Debongnie
4a922ed82d
[REL] v2.0.0-alpha.2
...
# v2.0.0-alpha.2
A new release, with some small fixes. Owl 2.0 is getting close.
v2.0.0-alpha.2
2022-02-14 13:42:34 +01:00
Géry Debongnie
a6f0985d43
[TOOLING] add benchmarking code to playground samples
2022-02-14 13:10:30 +01:00
Aaron Bohy
6aee1355c8
[IMP] deploy.yml: remove owl-next from the branch list
2022-02-11 11:03:23 +01:00
Géry Debongnie
921ced7c90
[FIX] refs in recursive templates now work properly
2022-02-11 10:46:44 +01:00
Géry Debongnie
1da930cb25
[MISC] tools: fix version string
2022-02-11 10:46:44 +01:00
Bruno Boi
cc8e11c9c9
[FIX] can use t-out with String classes
2022-02-11 10:46:44 +01:00
Géry Debongnie
3196b585fd
[FIX] slots: process slot params/values like normal props
2022-02-11 10:46:44 +01:00
Géry Debongnie
ea2ccc5a03
[DOC] improve changelog
2022-02-11 10:46:44 +01:00
Géry Debongnie
960808aeb2
[IMP] blockdom: apply dynamic part of block before inserting it
2022-02-11 10:46:44 +01:00
Géry Debongnie
1fb1d37e32
[IMP] props validation: cannot set default value on mandatory props
2022-02-11 10:46:44 +01:00
Géry Debongnie
24ce8613c5
[DOC] add some info to the changelog
2022-02-11 10:46:44 +01:00
Géry Debongnie
2c1226d737
[IMP] compiler: translatableAttributes can be added/removed
2022-02-11 10:46:44 +01:00
Samuel Degueldre
140818b5f9
[IMP] compiler: allow to declare default slot scope on component
2022-02-11 10:46:44 +01:00
Géry Debongnie
83de53d283
[REF] allow external code to override validateTarget
2022-02-11 10:46:44 +01:00
Géry Debongnie
50aac42bdc
[IMP] component: validate mounting target at patch time
2022-02-11 10:46:44 +01:00
Géry Debongnie
bd98d4d0d0
[IMP] component: disallow calling hooks outside of setup
...
(and constructor)
Doing so could cause strange and difficult bugs
2022-02-11 10:46:44 +01:00
Bruno Boi
4d68dac24d
[FIX] hooks: useSubEnv will not erase previous useChildSubEnv
2022-02-11 10:46:44 +01:00
Géry Debongnie
722abd6d5f
[IMP] app: introduce test mode
...
Same as `dev` mode, but without warning in console
2022-02-11 10:46:44 +01:00
Géry Debongnie
a7305a5cdb
[TEST] component: add test to make sure a specific issue does not arise
2022-02-11 10:46:44 +01:00
Géry Debongnie
ff734c706c
[IMP] typing: make app and mount method properly generic
2022-02-11 10:46:44 +01:00
Bruno Boi
add5fdd737
[FIX] compiler: never add _ prefix to non variable token
2022-02-11 10:46:44 +01:00
Samuel Degueldre
a221411938
[FIX] compiler: do not pass dynamic props object as is
...
The child receiving the props can observe changes made to the passed
t-props object which is not desirable.
2022-02-11 10:46:44 +01:00
Bruno Boi
bb6479f44f
[FIX] compiler: add _ prefix to local variables while compiling an expression
2022-02-11 10:46:44 +01:00
Géry Debongnie
aa95149997
[IMP] hooks: introduce useChildSubEnv and change useSubEnv
2022-02-11 10:46:44 +01:00
Géry Debongnie
e4b4ee471f
[FIX] compiler: does not modify xml doc in place
2022-02-11 10:46:44 +01:00
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