Commit Graph

450 Commits

Author SHA1 Message Date
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
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 9baf3ad4a7 add support for boolean properties, such as 'checked'
fix #5
2019-03-20 13:19:08 +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 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 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 8d95f46fce move test helpers from demo app to tests/ 2019-03-14 11:50:39 +01:00
Géry Debongnie e95af73065 move core tests to tests/ folder 2019-03-14 11:40:23 +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 526555fd21 lint 2019-01-21 15:54:18 +01:00
Géry Debongnie 9be5cc1760 add t-ref directive 2019-01-21 15:46:29 +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
Géry Debongnie 0f8cdfa87d implement destroy, add tests 2019-01-17 08:36:38 +01:00
Géry Debongnie f0d529139b basic project infrastructure 2019-01-16 16:17:25 +01:00
Géry Debongnie 0f3b2d10da initial commit 2019-01-16 11:28:05 +01:00