Commit Graph

956 Commits

Author SHA1 Message Date
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
Géry Debongnie 65a65bd241 remove memory leak... 2019-03-18 16:15:08 +01:00
Géry Debongnie d99ea4c9f4 rename updateState into setState 2019-03-15 11:54:59 +01:00
Alexandre Kühn 9be0b65cd3 make t-set works with t-props
test by aku, fix by ged
2019-03-15 11:06:05 +01:00
Géry Debongnie 733d5f81e6 slightly improve build script 2019-03-14 16:22:50 +01:00
Géry Debongnie 46c8d5a4ee add support for ES6-like syntax for props 2019-03-14 15:53:31 +01:00
Géry Debongnie ce8c176578 rename qweb_vdom into qweb 2019-03-14 14:32:29 +01:00
Géry Debongnie a9d5cab3b6 rename WEnv to Env 2019-03-14 12:51:51 +01:00
Géry Debongnie 027318bb98 move snabbdom into libs/ 2019-03-14 11:30:49 +01:00
Géry Debongnie f08ff9e5c2 move demo/static/src/ts/core to src/ 2019-03-14 11:23:10 +01:00
Géry Debongnie 3766fbc7b8 reorganize files 2019-01-23 09:45:28 +01:00
Géry Debongnie 5652ef65ad rename widget file into Widget 2019-01-22 14:46:02 +01:00
Géry Debongnie 4862496891 add router service, better structure for demo app 2019-01-22 14:44:37 +01:00
Géry Debongnie a357ff6b37 call mounted recursively on all children 2019-01-21 16:26:51 +01:00
Géry Debongnie 9be5cc1760 add t-ref directive 2019-01-21 15:46:29 +01:00
Géry Debongnie 64557ae999 update bundle code to new qweb file 2019-01-21 15:04:34 +01:00
Géry Debongnie cd0ef90075 naive implementation of mounted hook 2019-01-21 14:54:13 +01:00
Géry Debongnie fbf099f1f3 add attributes module in widget (+lint) 2019-01-21 14:39:06 +01:00
Géry Debongnie a3bf470930 add support for text root nodes (and test suite cleanups) 2019-01-21 14:03:36 +01:00
Géry Debongnie e40c9ee4e5 t-widget directive 2019-01-20 15:10:44 +01:00
Géry Debongnie 041830c684 remove old code 2019-01-20 09:29:18 +01:00
Géry Debongnie 00e20f7c72 lint 2019-01-20 09:26:14 +01:00
Géry Debongnie a2146ffa83 fix widget class 2019-01-20 09:25:41 +01:00
Géry Debongnie cc96328bdd add on-directive 2019-01-20 09:10:50 +01:00
Géry Debongnie 3a4d1ef1ba basic qweb vdom implementation 2019-01-19 23:21:41 +01:00