Géry Debongnie
55bb09ba1a
[FIX] component: fix invalid prop validation situations
...
closes #453
2019-11-14 09:27:09 +01:00
Géry Debongnie
749f0063ea
[FIX] component: properly validate optional types in objects
...
closes #440
2019-11-13 15:36:46 +01:00
Aaron Bohy
e47f604449
[FIX] component: concurrent rendering issue
...
Resolved rendering with cancelled fiber for (not yet) destroyed
component -> Cannot read property 'sel' of null
Closes #421
2019-11-12 10:01:12 +01:00
Aaron Bohy
7e721a96b5
[IMP] hooks: useRef on component: set el anyway
...
Closes #437
2019-11-06 17:06:37 +01:00
Aaron Bohy
af4f372506
[REF] component: mount: remove renderBeforeRemount option
...
Re-render the component all the time before remounting it, which
seems safer anyway.
In the test, we had to add a nextTick to wait for the changes to
be notified (before, we waited thanks to the additional call to
mount). If we don't do the nextTick, mount is called, and render
is called right after (before the promise returned by mount is
resolved). This scenario doesn't work right now (see #441 ).
Closes #381
2019-11-06 16:26:12 +01:00
Géry Debongnie
b211e75140
[IMP] store: display error if no store found
2019-11-04 08:41:29 +01:00
Géry Debongnie
8d1dd06340
[IMP] component: error when mounted on invalid target
2019-11-04 08:41:29 +01:00
Géry Debongnie
d74b5a03db
[IMP] component: add props on root components
...
This is a partial revert of commit 7d249d6f09 .
The reason is that this changes made it much harder to unit test
components. Before, we could simply instantiate a component
like this:
const my|Comp = new MyComponent(null, props);
and then simply test it. This commit reestablish that possibility.
2019-11-01 09:03:27 +01:00
Géry Debongnie
534152eff7
[REF] component: small improvement
...
and run prettier
2019-11-01 08:39:35 +01:00
Aaron Bohy
05a678c039
[IMP] component: get env from constructor
...
closes #430
2019-11-01 08:39:35 +01:00
Géry Debongnie
ba483b6e2c
[FIX] component tests: make them work on windows
...
For an unknown reason, it looks like the way ticks, micro task ticks or other subtle scheduling issues are different on a windows machine (it may be because of other difference, such as a specific version of nodejs).
Anyway, I could not find the cause of the issue, but
simply waiting an extra microtask tick seems to work.
2019-10-31 12:32:26 +01:00
Aaron Bohy
08cb83149e
[REM] component: remove t-keepalive directive
...
We don't see any usecase for it, it makes the code more complex,
and there were still potential unresolved concurrency issues with
it.
Part of task #295
2019-10-30 16:35:45 +01:00
Aaron Bohy
7d249d6f09
[IMP] component: do not set props in root components
...
Also remove props from Fiber, as it was not useful anymore.
2019-10-30 15:09:10 +01:00
Aaron Bohy
9106c19066
[IMP] component: simplify constructor API
...
It now takes two arguments: parent (optional, only for non-root
components) and props (optional). In the case of the root component,
the env is taken from the config (config.defaultEnv). If it doesn't
exists, the default env is created on the fly.
Closes #306
2019-10-30 15:09:10 +01:00
Aaron Bohy
9e37b968e8
[FIX] component: error handling: rendering with sub components
...
Closes #425
2019-10-30 13:27:48 +01:00
Aaron Bohy
fa6801b523
[REF] observer: remove revNumber
...
Closes #257
2019-10-30 11:13:52 +01:00
Géry Debongnie
9edf29a3a1
[IMP] context: group components by depth
...
closes #399
2019-10-29 16:02:51 +01:00
Géry Debongnie
6a434310ee
[FIX] *: run prettier
2019-10-29 16:02:51 +01:00
Aaron Bohy
c9c2b3fa6d
[IMP] tests: add concurrency test
2019-10-28 14:46:21 +01:00
Géry Debongnie
3035a9f009
[DOC] move reference doc in subfolder
2019-10-28 14:23:02 +01:00
Géry Debongnie
c2adb429bd
[FIX] package.json: update node and typescript version
...
closes #414
2019-10-28 13:58:44 +01:00
Géry Debongnie
5614c85b04
[IMP] qweb: implement t-key with a directive
...
closes #331
2019-10-28 11:45:51 +01:00
Aaron Bohy
5d57a7bf13
[FIX] component: updateProps: validation and default values
...
Before this rev., default values weren't taken into account when
validating props whenever a component was updated. Moreover, there
was no test attesting that props were validated at update.
2019-10-28 11:32:43 +01:00
Géry Debongnie
4ebe419c56
[FIX] component: make sure props are validated in all cases
...
closes #379
2019-10-28 11:32:43 +01:00
Géry Debongnie
9779cd196c
[REF] fiber: small cleanups
2019-10-28 11:32:43 +01:00
Géry Debongnie
9cee12d7b4
[IMP] component: propagate error to mount and render
2019-10-28 11:32:43 +01:00
Géry Debongnie
2aa705f5c8
[FIX] router: preserve pathname in hash mode
...
closes #397
2019-10-28 11:32:43 +01:00
Géry Debongnie
2279dafbec
[IMP] qweb: add an option to setup a translate function
...
closes #393
2019-10-28 11:32:41 +01:00
Géry Debongnie
9dfcfda365
[DOC] add more info on xml tag and single file component
...
closes #401
2019-10-26 09:10:50 +02:00
Géry Debongnie
690d8edf67
[FIX] context: solve tricky concurrency issue
...
part of #330
2019-10-25 16:01:52 +02:00
Géry Debongnie
3c38bbc076
[REF] component: large cleanup of concurrency branch
...
We remove here old comments, add some tests and documentation, and in
general, make sure the state of the code is in a good shape
part of #330
2019-10-25 16:01:52 +02:00
Aaron Bohy
9c5cad15c1
[IMP] component: refactor rendering pipeline
...
This commit introduces a brand new rendering system based on a fiber
class and a scheduler.
closes #330
2019-10-25 16:01:52 +02:00
Géry Debongnie
2bed1cfbd1
[REF] asyncroot: create asyncroot component
...
This component replaces the t-asyncroot directive.
2019-10-25 16:01:52 +02:00
Géry Debongnie
67349eb0f0
[IMP] vdom: remove handling of combined selectors
...
this is done by qweb anyway
2019-10-25 16:01:52 +02:00
Aaron Bohy
2beb12678e
[IMP] t-on directive: allow empty handler
...
Closes #377
2019-10-25 14:11:44 +02:00
Aaron Bohy
0ea1091692
[IMP] t-on directive: handle inline statements
...
Closes #265
2019-10-25 14:11:44 +02:00
Géry Debongnie
c2f42d3b82
[FIX] qweb: do not format expression twice in t-if
...
closes #392
2019-10-24 14:57:48 +02:00
Géry Debongnie
a3317ab997
[FIX] qweb: handle variable expressions in t-if
...
closes #390
closes #362
2019-10-24 08:55:30 +02:00
Géry Debongnie
13128ed425
[FIX] component: do not validate props twice
...
it is not useful to do it in the component directive, especially since
it is done in the constructor, and the default props are not applied.
closes #379
2019-10-22 21:58:51 +02:00
Géry Debongnie
be556a970e
[FIX] qweb: properly calls directive finalizers
...
closes #382
2019-10-22 21:56:29 +02:00
Aaron Bohy
da6c24bbca
[FIX] test: do not check external links in doc
2019-10-21 09:47:20 +02:00
Géry Debongnie
f6d6da8393
[FIX] component: fix issues with component internal template key
...
closes #298
2019-10-21 09:41:27 +02:00
Géry Debongnie
0aeebd7b6e
[REF] utils: rename loadTemplates into loadFile
...
closes #351
2019-10-18 08:05:26 +02:00
Géry Debongnie
4bc49e7241
[DOC] add a roadmap
...
closes #347
2019-10-17 22:36:44 +02:00
Géry Debongnie
1d72164015
[FIX] component: support component reduced to a slot
2019-10-16 21:48:49 +02:00
Géry Debongnie
2825a5a55d
[FIX] qweb: properly handle xml comments
2019-10-15 15:47:50 +02:00
Aaron Bohy
23246c42aa
[REF] *: snakecase filenames
2019-10-14 11:06:59 +02:00
Géry Debongnie
895fe7c60f
[REF] store: replace ConnectedComponent by useStore hook
...
Closes #304
2019-10-14 11:06:59 +02:00
Géry Debongnie
4a346d0615
[FIX] qweb: properly remove t-ref reference
...
when the node is removed from the dom
2019-10-14 11:06:59 +02:00
Géry Debongnie
3e8f60cefa
[FIX] qweb: properly handle t-raw in various situations
...
closes #325
closes #327
2019-10-14 09:59:26 +02:00