Géry Debongnie
f5bbf25d4f
[IMP] store: add deep tracking for changes
...
This is only at the level of the store currently. To be useful, we need
to work on the 'connect' function.
2019-04-14 21:24:54 +02:00
Géry Debongnie
4ea0875fd9
[REF] store: namespace rev under __owl__ name
2019-04-14 11:27: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
d7bed96667
[IMP] qweb: crashes if unknown directive
...
closes #22
2019-04-14 10:43:27 +02:00
Géry Debongnie
a0f0a24d1d
[REF] component: use __owl__ as metadata key
2019-04-13 14:14:34 +02:00
Géry Debongnie
caed076f2a
[FIX] store: properly handle null values
2019-04-12 21:07:12 +02:00
Géry Debongnie
2ea01455cb
[FIX] qweb: fix issue with expression formatting
...
closes #21
2019-04-12 15:27:44 +02:00
Géry Debongnie
4f1d976206
[FIX] store: properly observe all array methods
2019-04-12 13:03:25 +02:00
Géry Debongnie
8ca806eb28
[IMP] store: make sure set function works with arrays
2019-04-12 12:45:44 +02:00
Géry Debongnie
e0608aa7fd
[IMP] store: propagate 'set' function to commit parameters
2019-04-12 12:42:14 +02:00
Géry Debongnie
111080fdbf
[FIX] store: observer array values recursively
2019-04-12 12:25:22 +02:00
Géry Debongnie
ab12ac8a9f
[IMP] store: properly handle already observed state
2019-04-12 12:17:16 +02:00
Géry Debongnie
63069d96a5
fix: properly observe recursively new values
2019-04-12 12:08:31 +02:00
Géry Debongnie
f1cc32de8f
imp: prevent store state change outside a mutation
2019-04-12 12:05:06 +02:00
Géry Debongnie
03511ce9ea
ref: reorganize store (based on different principles)
2019-04-12 11:57:29 +02:00
Géry Debongnie
90f6808f57
ref: rename _start to _prepare
2019-04-10 10:45:27 +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
816ffe1b44
imp: store dispatch functions can be synchronized
2019-04-09 13:16:22 +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
7ea782bd60
fix: prevent issue in store with existing values in array
2019-04-09 10:08:37 +02:00
Géry Debongnie
bf4cbaea33
imp: unskip test, add new test
2019-04-09 09:14:22 +02:00
Alexandre Kühn
cde85269fd
imp: make store reactive (observe state and react to changes)
...
This is a pretty big change, yet still not complete.
2019-04-08 23:11:38 +02:00
Alexandre Kühn
3340401f54
imp: give reference to dispatch function in actions
2019-04-08 23:11:32 +02:00
Alexandre Kühn
7027ff1eb6
imp: add env to store dispatch
...
This is useful to allow actions to use specific environment methods.
For example, one might want to add a rpc method to the environment.
2019-04-08 23:04:27 +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
Géry Debongnie
f2fc20f8e3
fix: connected components should recompute store props properly
2019-04-04 16:01:09 +02:00
Géry Debongnie
3e8682b741
ref: adapt qweb to output code closer to es5
2019-04-04 14:14:02 +02:00
Géry Debongnie
a86d0b5b02
imp: store connect: mapStateToProps receive ownProps
2019-04-02 14:23:40 +02:00
Géry Debongnie
7ebea5a486
imp: better error message when evaluating/compiling templates
...
fixes #3
2019-04-02 11:03:04 +02:00
Géry Debongnie
56be87f26e
fix: allow t-attf- attributes to combine with regular attrs
...
fixes #10
2019-04-02 09:22:37 +02:00
Géry Debongnie
990a08dc04
imp: add componentDidUpdate hook
2019-04-01 16:00:57 +02:00
Alexandre Kühn
e7a4ad99de
[FIX] connected child components with custom hooks
2019-04-01 14:44:53 +02:00
Géry Debongnie
d6e61c2203
imp: qweb engine can be initialized with templates
2019-03-29 16:40:59 +01:00
Géry Debongnie
e6b0d06e3e
fix: make sure qweb throw error if invalid templates
2019-03-29 15:37:42 +01:00
Géry Debongnie
5cd45b59af
fix: properly destroy/detach widgets in some cases
...
Sometimes, widgets were not properly destroyed/detached. This was caused
by the fact that we used the hook remove, when we sometimes need to use
the hook destroy as well.
2019-03-29 12:50:45 +01:00
Géry Debongnie
1e58c7b12b
fix: update component snapshots
2019-03-29 12:39:00 +01:00
Géry Debongnie
afc89e6f66
fix: if t-props is not defined, should fallback on {}
2019-03-28 17:35:08 +01:00
Géry Debongnie
2758269139
add patch/unpatch utility methods
2019-03-26 14:30:27 +01:00
Géry Debongnie
a7d2edd0c9
imp: qweb compiler now condenses whitespaces
...
This is a pretty big breaking change: the html output by qweb is now
different.
The main goal is to optimize the compiled templates:
- condense all consecutive whitespaces into a single spaces
- if possible, drop completely some text nodes, based on the following
heuristic: if a text node is only composed of whitespaces, and
contains at least one linebreak, then it can be dropped.
This leads in my benchmark test to an improvement of about 10%, in
rendering speed and in memory consuption.
Note: whitespace here means anything that matches the \s regexp: newlines,
tabs, ...
close #8
2019-03-22 12:04:50 +01:00
Géry Debongnie
d48cb5aae4
imp: work on store, refactor, improve todoapp
2019-03-22 10:47:59 +01:00
Géry Debongnie
a236ae396a
fix: make sure props are always defined
...
fix #7
2019-03-22 09:28:56 +01:00
Géry Debongnie
ad9fb77458
fix: force children to rerender when env changes
2019-03-21 16:06:06 +01:00
Géry Debongnie
88a3b6d25e
add some tests to store class
2019-03-21 12:09:17 +01:00
Géry Debongnie
a34fc39100
imp: allow object descriptors for attributes
...
close #6
2019-03-21 11:15:06 +01:00
Géry Debongnie
a8b3ec7726
support using object variables in t-esc
2019-03-21 10:47:08 +01:00