Commit Graph

31 Commits

Author SHA1 Message Date
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 4a748d2ea4 [IMP] qweb: add t-debug and t-log directives 2019-04-29 14:07:08 +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 b89327c831 [IMP] qweb: log a warning if a t-foreach is used without t-key
closes #40
2019-04-16 17:49:33 +02:00
Géry Debongnie 460ae4bb34 [REF] qweb: add missing semicolon to compiled template 2019-04-16 16:16:08 +02:00
Géry Debongnie c52e86feaf [FIX] qweb: t-set should reuse variable if possible
closes #41
2019-04-16 16:04:44 +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 85eb30626d [FIX] qweb: t-set expressions are evaluated only once
closes #23
2019-04-15 14:38:08 +02:00
Géry Debongnie 3d18359dd8 [IMP] store: add 'deep' param to connect options 2019-04-15 11:51:18 +02:00
Géry Debongnie a0f0a24d1d [REF] component: use __owl__ as metadata key 2019-04-13 14:14:34 +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 90f6808f57 ref: rename _start to _prepare 2019-04-10 10:45:27 +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 370a92b67e imp: t-ref directive is now dynamic
closes #11
2019-04-09 10:33:08 +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 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 d6e61c2203 imp: qweb engine can be initialized with templates 2019-03-29 16:40:59 +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 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 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 9baf3ad4a7 add support for boolean properties, such as 'checked'
fix #5
2019-03-20 13:19:08 +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 46c8d5a4ee add support for ES6-like syntax for props 2019-03-14 15:53:31 +01:00
Géry Debongnie e95af73065 move core tests to tests/ folder 2019-03-14 11:40:23 +01:00