Aaron Bohy
c9c2b3fa6d
[IMP] tests: add concurrency test
2019-10-28 14:46:21 +01:00
Géry Debongnie
3035a9f009
[DOC] move reference doc in subfolder
2019-10-28 14:23:02 +01:00
Géry Debongnie
c2adb429bd
[FIX] package.json: update node and typescript version
...
closes #414
2019-10-28 13:58:44 +01:00
Géry Debongnie
5614c85b04
[IMP] qweb: implement t-key with a directive
...
closes #331
2019-10-28 11:45:51 +01:00
Aaron Bohy
5d57a7bf13
[FIX] component: updateProps: validation and default values
...
Before this rev., default values weren't taken into account when
validating props whenever a component was updated. Moreover, there
was no test attesting that props were validated at update.
2019-10-28 11:32:43 +01:00
Géry Debongnie
4ebe419c56
[FIX] component: make sure props are validated in all cases
...
closes #379
2019-10-28 11:32:43 +01:00
Géry Debongnie
9779cd196c
[REF] fiber: small cleanups
2019-10-28 11:32:43 +01:00
Géry Debongnie
9cee12d7b4
[IMP] component: propagate error to mount and render
2019-10-28 11:32:43 +01:00
Géry Debongnie
2aa705f5c8
[FIX] router: preserve pathname in hash mode
...
closes #397
2019-10-28 11:32:43 +01:00
Géry Debongnie
2279dafbec
[IMP] qweb: add an option to setup a translate function
...
closes #393
2019-10-28 11:32:41 +01:00
Géry Debongnie
9dfcfda365
[DOC] add more info on xml tag and single file component
...
closes #401
2019-10-26 09:10:50 +02:00
Géry Debongnie
690d8edf67
[FIX] context: solve tricky concurrency issue
...
part of #330
2019-10-25 16:01:52 +02: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
Géry Debongnie
67349eb0f0
[IMP] vdom: remove handling of combined selectors
...
this is done by qweb anyway
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
c2f42d3b82
[FIX] qweb: do not format expression twice in t-if
...
closes #392
2019-10-24 14:57:48 +02:00
Géry Debongnie
a3317ab997
[FIX] qweb: handle variable expressions in t-if
...
closes #390
closes #362
2019-10-24 08:55:30 +02:00
Géry Debongnie
13128ed425
[FIX] component: do not validate props twice
...
it is not useful to do it in the component directive, especially since
it is done in the constructor, and the default props are not applied.
closes #379
2019-10-22 21:58:51 +02:00
Géry Debongnie
be556a970e
[FIX] qweb: properly calls directive finalizers
...
closes #382
2019-10-22 21:56:29 +02:00
Aaron Bohy
da6c24bbca
[FIX] test: do not check external links in doc
2019-10-21 09:47:20 +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
0aeebd7b6e
[REF] utils: rename loadTemplates into loadFile
...
closes #351
2019-10-18 08:05:26 +02:00
Géry Debongnie
4bc49e7241
[DOC] add a roadmap
...
closes #347
2019-10-17 22:36:44 +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
2825a5a55d
[FIX] qweb: properly handle xml comments
2019-10-15 15:47:50 +02:00
Aaron Bohy
23246c42aa
[REF] *: snakecase filenames
2019-10-14 11:06:59 +02:00
Géry Debongnie
895fe7c60f
[REF] store: replace ConnectedComponent by useStore hook
...
Closes #304
2019-10-14 11:06:59 +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
3e8f60cefa
[FIX] qweb: properly handle t-raw in various situations
...
closes #325
closes #327
2019-10-14 09:59:26 +02:00
Géry Debongnie
41b0618c93
[FIX] qweb: improve generated compiled code
2019-10-11 14:10:44 +02:00
Aaron Bohy
0928c189f4
[FIX] qweb: allow to combine t-esc with other directives
...
With this rev., when a t-esc is not set on a <t> tag, we create
it inside the node on which it is set, to ensure that the t-esc
directive is always set on <t> tags.
Same applies for t-raw.
Closes #324
2019-10-11 14:10:44 +02:00
Aaron Bohy
2f27768be2
[FIX] qweb: event modifier with arg in t-foreach
...
Closes #266
2019-10-11 14:01:07 +02:00
Aaron Bohy
aa1b0f502d
[FIX] tests: fix import
2019-10-11 14:01:07 +02:00
Géry Debongnie
07dac970f7
[IMP[ component/hooks: add onWillStart and onWillUpdateProps
2019-10-09 15:09:26 +02:00
Géry Debongnie
1c3c2e5c51
[IMP] hooks/Context: add Context and useContext
...
Closes #310
2019-10-08 15:56:46 +02:00
Géry Debongnie
cedb1f411f
[REF] component: move template check in constructor
2019-10-08 13:51:55 +02:00
Géry Debongnie
683993dbc4
[FIX] component/hooks: onWillUnmount was not properly called
2019-10-07 16:01:28 +02:00
Géry Debongnie
c3453d35b9
[IMP] hooks/component: remove updateEnv, add useSubEnv
...
closes #182
2019-10-04 22:54:27 +02:00
Géry Debongnie
022b29b6a0
[IMP] component/qweb: remove t-mounted directive
...
The t-mounted directive main goals can be achieved with hooks, in a
better and more intuitive way.
closes #308
2019-10-03 10:57:24 +02:00
Géry Debongnie
367725d194
[IMP] hooks: add onWillPatch and onPatched
...
This commit also changes the behaviour of willPatch and patched: they no
longer transfer data from one to the other, because it can be done
cleanly by hooks and a closure.
closes #307
2019-10-03 10:20:28 +02:00
Géry Debongnie
f6820bb8ac
[REF] hooks: better implementation of onMounted/onWillUnmount
2019-09-28 21:14:40 +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
4513e3f31c
[FIX] qweb: improved svg support for components
...
If we want to generate dynamically svg components, it is useful to be
able to define components with a <g> tag as root, and then getting the
correct namespace.
closes #302
2019-09-26 15:46:42 +02:00
Géry Debongnie
ecf12f6eee
[FIX] qweb: properly supports svg
...
Snabbdom supports svg, but it adds the namespace at the creation of the
virtual node. However, owl works slightly differently: it adds children
after creating the parent virtual node.
So, we need to actually call the addNS method after the children nodes
have been created.
As a bonus, this is slightly faster than snabbdom: we only check at
template compilation time once if a node is a svg.
2019-09-24 21:40:46 +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