Isiah Meadows
1f4b2cf49a
Deservicify core ( #2458 )
...
* De-servicify router (mostly)
Still uses the redraw service, but it no longer has an intermediate
service of its own.
Also, did a *lot* of test deduplication in this. About 30-40% of the
router service tests were already tested on the main router API instance
itself.
Bundle size decreased from 9560 to 9548 bytes min+gzip.
* Merge `m.mount` + `m.redraw`, update router
Simplifies the router and redraw mechanism, and makes it much easier to
keep predictable.
Bundle size down to 9433 bytes min+gzip, docs updated accordingly.
* Make `mithril/render` just return the `m.render` function directly.
* Deservicify `m.render`, revise `m.route`
- You now have to use `mithril/render/render` directly if you want an
implicit redraw function. (This will likely be going away in v3.)
- Revise `m.route` to only `key` components
* Add `redraw` to `m.render`, deservicify requests
* Test error logging
* Update docs + changelog [skip ci]
2019-07-07 18:28:43 -04:00
Isiah Meadows
6c562d2b9b
Fix keys, normalize holes ( #2452 )
...
* Fix #2434
* Treat holes as unkeyed, normalize boolean/null/undefined
This brings a lot better consistency with that API, even though it's
slightly breaking. (I had to update a bunch of tests to correspond with
it.)
* Fill in PR number [skip ci]
2019-07-03 17:05:44 -04:00
Isiah Meadows
a8473e63c9
Reverse hook order for all but onbeforeupdate ( #2297 )
...
- Drive-by: `onbeforeupdate` prevents subtree redraw if *either* hook
returns `false`, not *both*.
2018-11-27 18:02:48 -05:00
Pierre-Yves Gérardy
203df39c30
Remove the DOM nodes recycling pool ( fix #1653 , fix #2023 )
2018-04-16 09:45:45 +02:00
Isiah Meadows
19d2ba316c
Remove support for vnode.state = ...
...
- Remove docs for it
- Remove tests for it
- Add runtime check for unexpected reassignment, since we can't freeze
the property (we internally have to be able to modify it)
2017-10-02 19:57:48 -04:00
Pierre-Yves Gerardy
e031fe49a1
[test-utils/domMock] improve attributes handling
2017-05-28 18:26:09 +02:00
Pierre-Yves Gerardy
0a76772283
Add tests for components that overwrite their state in oninit
2017-03-27 18:30:48 +02:00
Pierre-Yves Gerardy
32ada55e00
Make the state undefined, not null during class and closure component initialization
2017-03-27 10:42:12 +02:00
Pierre-Yves Gerardy
7be2ff5feb
Strengthen the self-return prevention logic (for recycled nodes and updates)
2017-03-26 22:19:05 +02:00
Isiah Meadows
d4a0417dde
Merge branch 'next' of https://github.com/lhorie/mithril.js into strict-mode
2017-03-03 18:27:24 -05:00
Isiah Meadows
1cc5fa5ba7
"use strict" and other linty fixes
2017-03-03 18:24:38 -05:00
Pierre-Yves Gerardy
e496f7bfa6
Test: ensure that recycled components get a fresh state
2017-02-21 09:17:00 +01:00
Pierre-Yves Gerardy
fc038f9d85
Tests: enable tests for #1638
2017-02-21 09:17:00 +01:00
Pierre-Yves Gerardy
1dd5fe3101
Tests: Some more render/tests/test-component.js refactoring
2017-02-21 09:17:00 +01:00
Pierre-Yves Gerardy
fca89f987f
Tests: enable the three kind of components in all related files but api/tests/test-route.js
2017-02-19 02:14:15 +01:00
Pierre-Yves Gerardy
24243dba94
Tests: wrap the rest of the components definitions
2017-02-19 02:14:15 +01:00
Pierre-Yves Gerardy
ac38335453
Tests: Wrap some component definitions in createComponent() calls
...
These are the ones that would have been tedious to automate.
jscodeshift will handle the remaining ones
2017-02-19 02:14:15 +01:00
Pierre-Yves Gerardy
90b67b42f0
Tests: render/test-components tweaks
2017-02-19 02:14:15 +01:00
Pierre-Yves Gerardy
f96319e6f6
Tests: add dummy forEach blocks around sections with components
2017-02-19 02:14:15 +01:00
Pierre-Yves Gérardy
3f3af74dde
Support classes and factories as components ( #1339 )
...
* Support classes and factories as components
* Tests for class and factory component support
2017-02-14 22:48:02 -05:00
Pat Cavit
9f32267259
tests: Update tests for false -> "" behavior
2017-01-05 23:07:47 -08:00
Leo Horie
1222a9a3ab
change onbeforeremove and make state inherit from prototype
2016-12-26 12:19:20 -05:00
Leo Horie
53a83a58f2
rename RouteResolver::view back to render to restore diff semantics
...
prevent double resolving
2016-08-23 22:33:18 -04:00
Barney Carroll
f2f8bf825e
Test case for circular component returns
2016-08-22 11:37:42 +01:00
Leo Horie
276184484d
fix diff bugs when there are null components in list
2016-07-15 00:28:01 -04:00
Leo Horie
ffa9736151
fix diff for other null component root cases
2016-07-08 15:08:56 -04:00
Leo Horie
abadcfc13a
fix null ref when updating component root from null to something
2016-07-08 14:57:10 -04:00
Leo Horie
a988276e9b
Revert "don't copy state anymore"
...
This reverts commit cece44d4ac .
2016-07-08 10:24:48 -04:00
Leo Horie
cece44d4ac
don't copy state anymore
2016-07-08 00:40:52 -04:00
impinball
b4fb21475c
Add editorconfig, resolve differences
...
This includes newlines, tabs, among other things.
2016-06-18 03:22:12 -04:00
Leo Horie
ca784a684e
fix svg across component boundaries
2016-06-03 12:27:24 -04:00
Leo Horie
f9ef480b34
fix bugs about recycling in components, and styles when reusing style object
2016-06-02 21:42:18 -04:00
Leo Horie
e7420e72e1
more tests
2016-05-24 23:16:43 -04:00
Leo Horie
41cfda2719
more component lifecycle tests
2016-05-13 07:03:01 -04:00
Leo Horie
ead2e8ac0b
shouldUpdate, component oninit order fix
2016-05-05 23:20:31 -04:00
Leo Horie
3282ef3f77
components, angular dbmon
2016-05-03 23:39:01 -04:00