Aaron Bohy
6c8b401092
[FIX] component: slots: multiple slots with components
...
Closes #508
2019-11-27 15:47:55 +01:00
Aaron Bohy
12be815342
[REF] qweb: use global nextID
...
and reset it to 1 before each test s.t. snapshots are deterministic.
2019-11-27 15:47:55 +01:00
Géry Debongnie
6c753bb49f
[FIX] qweb: scope t-key directive to node and subnodes
...
not to siblings
closes #503
2019-11-27 13:31:40 +01:00
Aaron Bohy
2e3e8cd603
[FIX] component: destroy not yet mounted components (2)
...
Following 2922cee6ea
Previous commit was not correct: used children with a cancelled
fiber (for instance, with a new currentFiber) could be destroyed.
This commit fixes the issue differently, by directly detecting
children that are not used anymore (and not mounted), and destroy
them directly (no need to wait for willStart promise to be resolved
anymore).
2019-11-20 14:31:03 +01:00
Aaron Bohy
2922cee6ea
[FIX] component: can destroy not yet mounted components
...
Sub-issue of #476
2019-11-20 11:43:14 +01:00
Géry Debongnie
c7773bfd2a
[FIX] qweb/component: fix scoping issue with t-model and t-foreach
...
Without this fix, the handler set by t-model did not capture properly
the expression that needs to be updated.
closes #474
2019-11-19 13:15:34 +01:00
Aaron Bohy
e5940b4b6b
[FIX] component: concurrent calls to mount and render
...
Closes #450
2019-11-14 15:12:31 +01:00
Aaron Bohy
e47f604449
[FIX] component: concurrent rendering issue
...
Resolved rendering with cancelled fiber for (not yet) destroyed
component -> Cannot read property 'sel' of null
Closes #421
2019-11-12 10:01:12 +01:00
Aaron Bohy
08cb83149e
[REM] component: remove t-keepalive directive
...
We don't see any usecase for it, it makes the code more complex,
and there were still potential unresolved concurrency issues with
it.
Part of task #295
2019-10-30 16:35:45 +01:00
Aaron Bohy
7d249d6f09
[IMP] component: do not set props in root components
...
Also remove props from Fiber, as it was not useful anymore.
2019-10-30 15:09:10 +01:00
Géry Debongnie
5614c85b04
[IMP] qweb: implement t-key with a directive
...
closes #331
2019-10-28 11:45:51 +01:00
Géry Debongnie
3c38bbc076
[REF] component: large cleanup of concurrency branch
...
We remove here old comments, add some tests and documentation, and in
general, make sure the state of the code is in a good shape
part of #330
2019-10-25 16:01:52 +02:00
Aaron Bohy
9c5cad15c1
[IMP] component: refactor rendering pipeline
...
This commit introduces a brand new rendering system based on a fiber
class and a scheduler.
closes #330
2019-10-25 16:01:52 +02:00
Géry Debongnie
2bed1cfbd1
[REF] asyncroot: create asyncroot component
...
This component replaces the t-asyncroot directive.
2019-10-25 16:01:52 +02:00
Aaron Bohy
2beb12678e
[IMP] t-on directive: allow empty handler
...
Closes #377
2019-10-25 14:11:44 +02:00
Aaron Bohy
0ea1091692
[IMP] t-on directive: handle inline statements
...
Closes #265
2019-10-25 14:11:44 +02:00
Géry Debongnie
f6d6da8393
[FIX] component: fix issues with component internal template key
...
closes #298
2019-10-21 09:41:27 +02:00
Géry Debongnie
1d72164015
[FIX] component: support component reduced to a slot
2019-10-16 21:48:49 +02:00
Géry Debongnie
4a346d0615
[FIX] qweb: properly remove t-ref reference
...
when the node is removed from the dom
2019-10-14 11:06:59 +02:00
Géry Debongnie
41b0618c93
[FIX] qweb: improve generated compiled code
2019-10-11 14:10:44 +02:00
Géry Debongnie
5cdaa7b473
[IMP] hooks: implement useRef hook
...
closes #194
2019-09-27 11:20:08 +02:00
Géry Debongnie
5335fb8fba
[IMP] components: add hooks mechanism
...
part of #194
2019-09-27 11:20:08 +02:00
Géry Debongnie
82a6961b3a
[FIX] component: properly handle wrapper component and slots
...
closes #297
2019-09-23 07:13:51 +02:00
Géry Debongnie
78a4550ebb
[IMP] component tags: allow injecting values in xml tag string
...
With this commit, we can now do this:
const SUBTEMPLATE = xml`<span><t t-esc="state.n"/></span>`
class Parent extends Widget {
static template = xml`<div><t t-call="${SUBTEMPLATE}"/></div>`
state = {n: 42};
}
2019-09-21 23:05:44 +02:00
Géry Debongnie
cc82b3ffcd
[IMP] component: support dynamic t-component
2019-09-21 21:58:19 +02:00
Géry Debongnie
7a49b9d94e
[REF] component: move render props and promise to fiber
...
part of #293
2019-09-20 10:48:10 +02:00
Géry Debongnie
01eb338e69
[REF] component: move patchqueue management to fiber
...
part of #293
2019-09-20 10:47:58 +02:00
Géry Debongnie
3048c6f961
[REF] component: introduce fiber
...
part of #293
2019-09-20 10:47:55 +02:00
Géry Debongnie
9846b2e997
[IMP] tags: introduce xml tag
...
Big change! This commit introduces an xml function tag to easily define
inline templates.
This is a pretty big change toward single file owl components
Part of #284
2019-09-12 14:17:21 +02:00
Géry Debongnie
9b589af75a
[REF] qweb: improve generated code in some cases
2019-09-12 09:43:09 +02:00
Géry Debongnie
4fc3423682
[IMP] component: support dynamic t-props
...
It is useful in some rare situations.
closes #144
2019-09-11 14:12:52 +02:00
Géry Debongnie
ffb3263c79
[IMP] component: allow dynamic root nodes
...
closes #283
2019-09-11 13:12:57 +02:00
Géry Debongnie
e1acf66143
[IMP] component: components key is now static
...
This is a breaking change!
closes #279
2019-09-11 11:18:49 +02:00
Géry Debongnie
53a8841914
[TEST] component: snapshots slot functions
2019-09-05 14:33:43 +02:00
Géry Debongnie
28f7b44f9e
[IMP] component: make t-model works with sub state keys
...
closes #273
2019-09-05 08:47:37 +02:00
Géry Debongnie
3c23a7b246
[FIX] component: t-model properly works with select
...
The initial value was not set on the select tag.
closes #271
2019-09-04 22:45:21 +02:00
Géry Debongnie
0c1a7aabae
[FIX] component: better templateId for multiple subcomponents
...
Of course, the templateId computation is kind of tricky. Here, an issue
occurred because the templateId did not take the componentId into
account when we were in a loop, but with no keyed parent.
This meant that multiple sub components shared the same templateId,
confusing the vdom algorithm.
2019-09-03 16:38:24 +02:00
Géry Debongnie
cfdce29ce7
[FIX] component: avoid key collisions in sub components
...
This is a difficult part of owl: we need to be able to reconcile the
vdom generated (this is done with our virtual dom algorithm), but also
to be able to reconcile the proper components.
The issue here is that when we are in a list, with a t-key attribute on all
list nodes, and those list nodes contains sub component, then the
component system used the index of the list, and did not take into
account the key from the parent. The fix is to keep track of the
current key in the context, and uses that as a part of the templateId.
2019-09-03 12:13:57 +02:00
Géry Debongnie
b344d73e07
[FIX] component: prevent collision between template ids and keys
2019-09-02 15:27:37 +02:00
Géry Debongnie
4cd08d25c8
[FIX] component: solve tricky concurrency issue
...
In some specific situation, a component could crash, because it was
destroyed before being mounted, but reused anyway for another rendering.
2019-09-01 21:24:54 +02:00
Géry Debongnie
e6a3ede4a6
[FIX] component: improve unmount/remount behaviour
2019-08-28 11:41:10 +02:00
Géry Debongnie
5382e824b1
[REF] owl: reorganize src code in sub files
2019-07-16 13:12:08 +02:00