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
c10b84cd99
ref: move magify function from utils to store
2019-04-09 10:09:29 +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
afc89e6f66
fix: if t-props is not defined, should fallback on {}
2019-03-28 17:35:08 +01:00
Géry Debongnie
e53287b52e
ref: reorganize exports into core/extras
2019-03-27 15:18:25 +01:00
Géry Debongnie
2758269139
add patch/unpatch utility methods
2019-03-26 14:30:27 +01:00
Géry Debongnie
766d2f2301
ref: qweb context cleanup
...
Some code was uselessly duplicated. We simplify in this commit the
handling of subcontexts.
closes #9
2019-03-22 15:02:07 +01:00
Géry Debongnie
597adb3981
ref: improve qweb implementation
2019-03-22 14:51:02 +01:00
Géry Debongnie
6ea9ccf56f
fix: remove exprCache, as formatting is contextual
...
Formatting expressions now depends on the currently defined variables, so
it cannot be put in a cache.
2019-03-22 14:46:47 +01:00
Géry Debongnie
a444e3dcac
imp: export utils in main bundle
2019-03-22 12:08:55 +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
d81e5d8f4f
imp: add debug mode to store
2019-03-22 10:56:34 +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
add380f59b
ref: move PureWidget back to core, use updateEnv
2019-03-21 16:33:08 +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
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
Géry Debongnie
d799e3dd47
prevent useless rerenders when updatingEnv on unmounted component
...
fix #4
2019-03-21 10:39:09 +01:00
Géry Debongnie
8e82a8612a
small cleanup of the store
2019-03-21 09:11:44 +01:00
Géry Debongnie
9baf3ad4a7
add support for boolean properties, such as 'checked'
...
fix #5
2019-03-20 13:19:08 +01:00
Géry Debongnie
c9796e6bdc
add store class to core
2019-03-20 11:49:41 +01:00
Géry Debongnie
91e7e00f97
clean component file, add some documentation
2019-03-19 13:46:18 +01:00
Géry Debongnie
38f307ef57
implement updateEnv feature
2019-03-19 13:26:05 +01:00
Géry Debongnie
bd7a2bfc67
fix crash in template compilation with objects in props
...
fix #1
2019-03-19 10:44:01 +01:00
Géry Debongnie
695636e60e
cleanup, rename setState into updateState
2019-03-19 10:35:41 +01:00
Géry Debongnie
7d10e57cc0
remove a leftover d.ts file
2019-03-18 16:15:08 +01:00