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
da1824f4dd
[DOC] doc: improve navigation to main doc page
...
also, fixes a small error
2019-10-10 12:28:36 +02:00
Géry Debongnie
07dac970f7
[IMP[ component/hooks: add onWillStart and onWillUpdateProps
2019-10-09 15:09:26 +02:00
Géry Debongnie
5f6f081ae2
[IMP] playground: save changes to local storage
...
closes #316
closes #101
2019-10-09 10:15:09 +02:00
Géry Debongnie
1c3c2e5c51
[IMP] hooks/Context: add Context and useContext
...
Closes #310
2019-10-08 15:56:46 +02:00
Aaron Bohy
17ce73e6a9
[REF] hooks: improve makeLifecycleHook
2019-10-08 15:52:44 +02:00
Géry Debongnie
cedb1f411f
[REF] component: move template check in constructor
2019-10-08 13:51:55 +02:00
Géry Debongnie
e7516be95c
[DOC] component: remove doc for removed updateEnv method
2019-10-07 16:07:56 +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
50d569411c
[DOC] hooks: fixing broken link
2019-10-07 15:51:45 +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
b0dd0252a4
[REF] component: move method at proper place
2019-10-04 22:54:27 +02:00
Géry Debongnie
e2b2e54e29
[DOC] tooling: add missing link
2019-10-04 22:12:56 +02:00
Géry Debongnie
766c378ac9
[DOC] hooks: add missing doc for onWillPatch/onPatched
2019-10-03 11:57:58 +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
e82ed7dc8c
[DOC] component: add information on svg components
2019-10-02 16:40:13 +02:00
Géry Debongnie
63c3d4f6b0
[IMP] playground: slightly improve default text
2019-10-01 21:37:36 +02:00
Géry Debongnie
b859fcb8f0
[REL] bump to v0.22.0
v0.22.0
2019-10-01 21:05:04 +02:00
Géry Debongnie
3005756d89
[LEGAL] add copyright file
2019-10-01 20:44:39 +02:00
Géry Debongnie
f6820bb8ac
[REF] hooks: better implementation of onMounted/onWillUnmount
2019-09-28 21:14:40 +02:00
Géry Debongnie
090880f478
[DOC] readme: add quick overview section
2019-09-27 17:34:27 +02:00
Géry Debongnie
5cdaa7b473
[IMP] hooks: implement useRef hook
...
closes #194
2019-09-27 11:20:08 +02:00
Géry Debongnie
91b9e78182
[DOC] update component, tooling doc
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
Géry Debongnie
cc82b3ffcd
[IMP] component: support dynamic t-component
2019-09-21 21:58:19 +02:00
Géry Debongnie
bbbaf95c8e
Merge pull request #296 from odoo/issue-293-owl-fibers
...
[MERGE] component: introduce owl fiber
2019-09-20 13:54:59 +02:00
Géry Debongnie
caa63628dc
[REF] component: refactor fiber creation methods
2019-09-20 11:14:50 +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
8edc637033
[FIX] qweb: remove comments in xml strings before parsing
...
It was done in loadTemplates, but this does not work if we want to add
templates from another source.
2019-09-19 15:18:59 +02:00
Géry Debongnie
c9910077a4
[FIX] qweb: do not capture current qweb instance in closure
...
it is not needed, and has a bad effect on globally registered templates.
2019-09-12 23:23:55 +02:00
Géry Debongnie
6bf70f016c
[DOC] doc: update readme.md
2019-09-12 23:23:39 +02:00
Géry Debongnie
905619f80f
[ADD] tools: add benchmark for 0.21.0
2019-09-12 14:50:56 +02:00
Géry Debongnie
14ceb382ef
[REL] bump to v0.21.0
v0.21.0
2019-09-12 14:21:36 +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
cfc2fb2ba2
[REF] qweb: rename register method to registerComponent
2019-09-12 14:17:21 +02:00
Géry Debongnie
d57017b6ed
[IMP] qweb: add registerTemplate method
2019-09-12 14:17:21 +02:00
Géry Debongnie
5bf7a5c671
[IMP] component: make template key static
...
closes #288
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
471fd49063
[IMP] router: replace t-routecomponent directive by RouteComponent
...
closes #287
2019-09-11 14:58:36 +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