Commit Graph

63 Commits

Author SHA1 Message Date
Aaron Bohy 26f14180e2 [IMP] qweb: t-ref: dyn values with string interpolation
Closes #100
2019-05-29 11:22:12 +02:00
Aaron Bohy 7cdd1aa9a1 [IMP] qweb: add global Component registry to qweb
Closes #112
2019-05-27 12:10:33 +02:00
Aaron Bohy 050694414c [REF] move animations tests into their own file 2019-05-27 11:50:21 +02:00
Aaron Bohy 639908366a [IMP] allow to combine t-transition and t-widget
Closes #94
2019-05-27 11:50:21 +02:00
Aaron Bohy 649e20b956 [IMP] improve tests of transition directive 2019-05-27 11:49:09 +02:00
Géry Debongnie a1e982aba5 [REF] tests: rename makeTestWEnv to makeTestEnv 2019-05-17 15:52:16 +02:00
Géry Debongnie 2ce027a0a6 [REF] component: remove isStarted key 2019-05-17 15:50:55 +02:00
Géry Debongnie 8758dfcedf [IMP] component: better error if cannot find widget
closes #54
2019-05-15 17:17:39 +02:00
Géry Debongnie 0a10bbc023 [IMP] component: remove support for inlineTemplate
closes #93
2019-05-15 15:54:18 +02:00
Géry Debongnie 9c1d369e94 [FIX] qweb/component: fix scoping issue with list of widgets
In a t-foreach loop, there was a bad interaction between variables
defined with the `var` keyword and asynchronous code.

closes #108
2019-05-15 15:42:45 +02:00
Géry Debongnie 04eb720619 [IMP] qweb: add default template in QWeb 2019-05-15 10:55:17 +02:00
Géry Debongnie 361ecbe90b [IMP] component: deduce template name from component name
closes #102
2019-05-15 10:40:23 +02:00
Géry Debongnie 53911de00a [FIX] component: make t-widget work with t-elif
closes #97
2019-05-10 19:36:44 +02:00
Aaron Bohy 1760d0d336 [FIX] allow to combine directives using node hooks
e.g. t-ref and t-transition, or t-mounted and t-transition.
2019-05-10 19:31:09 +02:00
Aaron Bohy 0aba9748c9 [IMP] add t-mounted directive
closes #45
2019-05-10 19:31:09 +02:00
Aaron Bohy 8ee0973dab [REF] autoformat some files 2019-05-10 19:31:09 +02:00
Géry Debongnie 7f33f9b68e [FIX] component: call patch between willpatch and patched
closes #91
2019-05-09 15:22:59 +02:00
Géry Debongnie b7860a95b0 [REF] store: typecheck code
closes #87
closes #39
2019-05-07 11:47:09 +02:00
Géry Debongnie ba506be58d [FIX] component: fix issue with crash caused by async rendering
This may (or may not?) closes #85
2019-05-06 14:23:29 +02:00
Géry Debongnie 91896942dd [FIX] component: prevent rendering if not mounted 2019-05-06 13:45:50 +02:00
Géry Debongnie b9591cfecd [IMP] component: add support for dynamic css on t-widget
closes #80
2019-05-06 11:19:18 +02:00
Géry Debongnie 51320204f9 [IMP] component: add static css support for sub components
part of issue #80
2019-05-06 10:22:53 +02:00
Géry Debongnie eb508b7660 [FIX] component: capture ref key in closure
This is what commit d3197e9865 should have
done. Many changes should be done on normal nodes and on components!

closes #77
2019-05-04 22:48:50 +02:00
Géry Debongnie 4e982f5460 [IMP] qweb: add warning if t-key is missing in some cases
closes #71
2019-05-03 10:22:57 +02:00
Géry Debongnie 6350d9598d [REF] qweb, component: small code refactoring 2019-05-02 10:58:47 +02:00
Géry Debongnie 40e486a9eb [REF] component: remove updateProps
it is actually now a private method
2019-04-29 16:50:49 +02:00
Géry Debongnie e56580efb2 [FIX] component: call willPatch/patched hooks properly
Each component called its hooks properly individually, however the issue
was that it was done component by component.  However, in practice, we
want the willPatch hooks to be done before ANY patch is actually
performed, and the patched should be called AFTER every patch is
applied.

The trick is to propagate a list of patched components across various
function calls.

closes #64
2019-04-29 15:45:15 +02:00
Géry Debongnie b08e876136 [FIX] component: call mounted hooks in subcomponent properly
order was not correct in some cases.  Also, this commit is a pretty
significant optimization.
2019-04-27 11:35:02 +02:00
Géry Debongnie 005b727328 [FIX] component: hooks mounted/willUnmount called in correct order
The issue was with parent/child relationship.  It is not intuitive to
me, but the mounted hook should be called first on the children, and
then on the parent.  willUnmount hooks is the opposite.

closes #63
2019-04-26 17:23:50 +02:00
Géry Debongnie b44f274e37 [FIX] component: do not call willPatch/patched if not in DOM
closes #62
2019-04-26 15:30:59 +02:00
Géry Debongnie 754272b436 [IMP] component: give snapshot from 'willPatch' to 'patched' 2019-04-25 14:46:04 +02:00
Alexandre Kühn 379cd2a90f [FIX] component: t-refs are bound/unbound at proper timing
With this commit, we make sure that bound references are removed when a
widget is removed from the DOM.

closes #59
2019-04-25 10:40:45 +02:00
Géry Debongnie 20b33f50fa [FIX] component: bind t-ref widgets at correct moment
closes #51
2019-04-23 11:28:30 +02:00
Géry Debongnie 4ee39282ca [IMP] component: add 'set' method to allow extending state
closes #49
2019-04-18 10:15:50 +02:00
Géry Debongnie 3b3fd8a6c9 [REF] component: make observer and state optional 2019-04-18 10:11:16 +02:00
Géry Debongnie 29111a5c10 [IMP] component: disable mutations in render phase
closes #48
2019-04-18 10:11:04 +02:00
Géry Debongnie 94ed6ebe60 [IMP] component: remove updateState method 2019-04-17 10:59:03 +02:00
Géry Debongnie 619e455dd5 [IMP] component: observe the state and rerender if it changes
closes #35
2019-04-17 10:58:54 +02:00
Géry Debongnie 0ca4cc1596 [IMP] qweb: make t-key directive dynamic
instead of having t-key and t-att-key.

closes #36
2019-04-16 14:38:55 +02:00
Géry Debongnie 6640644d34 [FIX] qweb/component: make widgets work with t-else=""
closes #37
2019-04-16 14:17:02 +02:00
Géry Debongnie 3733734ae5 [REF] component: rename t-keep-alive to t-keepalive
This is useful to preserve the following nice property: when we have an
attribute t-something-someotherthing, we can get the directive name by
removing 't-' at the front, and splitting on '-'.
2019-04-14 10:44:29 +02:00
Géry Debongnie a0f0a24d1d [REF] component: use __owl__ as metadata key 2019-04-13 14:14:34 +02:00
Géry Debongnie f960149ba2 rem: remove destroyed hook 2019-04-10 09:35:20 +02:00
Géry Debongnie 74ce6a671e fix: properly destroy widget in some cases
when widget was (props)updated, then removed from DOM, it was not
destroyed.

closes #19
2019-04-09 15:31:03 +02:00
Géry Debongnie bc07c49a5f imp: add willUpdateProps hook to components 2019-04-09 13:55:13 +02:00
Géry Debongnie 94c33af8e9 ref: rename 'detach' method to 'unmount' 2019-04-09 12:57:34 +02:00
Géry Debongnie 6e0ef0fd5c ref: rename updated hook to 'patched' 2019-04-09 10:37:53 +02:00
Géry Debongnie 370a92b67e imp: t-ref directive is now dynamic
closes #11
2019-04-09 10:33:08 +02:00
Géry Debongnie a951c484be ref: rename componentDidUpdate hook into 'updated'
closes #16
2019-04-05 23:29:16 +02:00
Géry Debongnie 14d3eb83eb imp: add willPatch hook 2019-04-05 23:23:00 +02:00