3551 Commits

Author SHA1 Message Date
Michael Rawlings
7595742acd
4.13.0 v4.13.0 2018-08-27 12:20:08 -07:00
Michael Rawlings
df79fcc5f0
Diffing/Keying fixes (#1094)
* Updates the diffing algorithm to use an HTMLFragment node as an abstraction rather than keeping track of startNode and endNode all throughout the diffing algorithm.

* Uses the HTMLFragment for the <${dynamic}> tag and <include> tags to preserve server-rendered content for which the renderBody is not available in the browser.

* Component ids are based on the resulting parent tree (not the owner tree). This means we cannot rely on the ids in the global lookup, so component key/refs are now also stored on the component instance.

* Static node trees are now only auto assigned a key for the top-level node (instead of all nodes).

* Server comment starting markers now have the component's key serialized so the component can be attached to its owner

* Server comment markers no longer have the id on the closing marker, it is stack based.

* Normalize differences between hydration and client-rendering, so post mount the DOM looks the same regardless of whether a component was server or client rendered.

* fix matching up fragments when hydrating by taking components and normalized text nodes into account

* remove wrapping divs in test, should no longer be needed.  address hydration issue with alternate fragment matching approach.

* add fragment to dom if there's a parentNode even if no startNode

* add test for mismatched hydration

* don't detach components before moving

* use fragments to preserve renderBody content

* use ___finishFragment as the incomplete fragment marker

* ensure fragments get destroyed properly and dom node key sequences don't continue from previous renders

* use parent/owner terminology in more places, component ids are now parent scoped, key/ref components are attached to their owner for both client + server render, server comment boundaries include the owner and the key in addition to the fully scoped component id, autokeyed dom nodes are attached to their parent, hydration now uses a stack: ids in ending comment nodes not needed, hydration checks to see if a component has been initialized and will attach keys directly to the owner if so

* add mutation guards for text/comment nodes, add mutation guard for input value

* make component-pages test better represent streaming hydration, fix html/head/body hydration in a better/more generic way

* add test for async rendered keyrefs

* add test for repeated mult-level transclusion

* Autokeyed elements are now stored on the parent rather than the owner. User assigned key/refs are still stored on the owner component. Because of this, user assigned keys are now prefixed (with @) to differentiate them from autokeys. This also has the benefit that assigning numeric keys can no longer conflict with the autokeys.

* add re-rendering the intermediate container to one of the new tests
2018-08-27 11:46:47 -07:00
Dylan Piercey
e9b08cb41e
4.12.5 v4.12.5 2018-08-17 15:07:36 -07:00
Dylan Piercey
487d2b8974
Fix node inspect deprecation warning. (#1111) 2018-08-17 15:06:27 -07:00
Michael Rawlings
e2b0ffd858
Merge branch 'master' of github.com:marko-js/marko 2018-08-16 12:24:40 -07:00
Michael Rawlings
342ddb0084
fix event names with dashes 2018-08-16 12:24:27 -07:00
Anton Wilhelm
de9674efe6 fix missing module to install (#1110)
lasso module is missing

CLI installation globally is not enough, otherwise I get this error:
Error while applying option of "plugin". 
Cause: Error: Cannot find module 'lasso/package'
2018-08-16 05:59:45 -04:00
Dylan Piercey
cd7d93ba3b Add test for nested fragments. (#1107) 2018-08-14 12:56:06 -07:00
Dylan Piercey
e7057f140e Add test for top level transcluded content. (#1108) 2018-08-13 16:03:41 -07:00
Michael Rawlings
168dc9b71e
support functions as event handlers (#1106) 2018-08-07 14:58:47 -07:00
Michael Rawlings
b749da95ed
Use capture for event delegation (#1104)
use delegation for all events
2018-08-06 15:50:55 -07:00
Michael Rawlings
ce1b8bd765
update changelog 2018-08-02 12:09:19 -07:00
Michael Rawlings
4745dcf3a3
4.12.4 v4.12.4 2018-08-02 12:08:59 -07:00
Michael Rawlings
671ef757e3
don't render invalid attribute names on the server (#1103) 2018-08-02 11:40:53 -07:00
Dylan Piercey
97253639e1
4.12.3 v4.12.3 2018-07-26 10:41:49 -07:00
Dylan Piercey
2c8762bc9d
Update changelog. 2018-07-26 10:41:34 -07:00
Dylan Piercey
e4a01a9558 Remove extra parenthesis from compiled javascript. (#1099) 2018-07-26 10:38:21 -07:00
Austin Wei
ffb5a0b51b typo in code example (#1093)
First time looking at marko, but I think that `users` should be `user`
2018-07-20 16:33:13 -04:00
Michael Rawlings
492361c73d
update changelog 2018-07-19 16:57:47 -07:00
Michael Rawlings
d3c9b8d919
4.12.2 v4.12.2 2018-07-19 16:47:46 -07:00
Michael Rawlings
c7b993db08
fix all for loop types (#1091) 2018-07-19 16:47:10 -07:00
Michael Rawlings
14d2943863
update changelog 2018-07-16 13:39:46 -07:00
Michael Rawlings
0ca3778363
4.12.1 v4.12.1 2018-07-16 13:37:10 -07:00
Michael Rawlings
7b7e6328bb
fixes #1022 - transcluded keys don't match, stateful component not preserved (#1086) 2018-07-16 13:22:33 -07:00
Michael Rawlings
b5f5f669ae
update changelog 2018-07-10 13:22:38 -07:00
Michael Rawlings
c6829e1efe
4.12.0 v4.12.0 2018-07-10 13:22:12 -07:00
Michael Rawlings
8bcb848297
enable style arrays (#1082) 2018-07-10 13:06:14 -07:00
Michael Rawlings
280f734f70
fixes #1075 - cannot compile dynamic tag at root with user key (#1081) 2018-07-10 13:05:43 -07:00
Michael Rawlings
f48e22c414
Fixes #1078 - don't mutate spread attributes (#1080) 2018-07-10 13:05:14 -07:00
Michael Rawlings
f5ebda8f2a
Tag params (#1076) 2018-07-10 13:04:46 -07:00
Michael Rawlings
63b0aeb58a
dynamic tag fixes 2018-07-10 10:57:31 -07:00
Michael Rawlings
2ec6695bd3
update changelog 2018-07-02 14:38:48 -07:00
Michael Rawlings
0b80f57aef
4.11.5 v4.11.5 2018-07-02 14:37:44 -07:00
Michael Rawlings
c6a2bf2819
Deprecation warnings (#1073)
* update complain
* use fallback location for deprecation if node does not have a position
2018-07-02 14:20:47 -07:00
Sandeep Vattapparambil
8e0cb388a7 Documentation on components updated (#1061) 2018-06-29 13:52:47 -07:00
Cameron Braid
d49498cb94 added failing test for #1059 (#1072)
* added failing test for #1059
2018-06-29 13:19:25 -07:00
Michael Rawlings
9722e2d809
update changelog 2018-06-28 15:35:50 -07:00
Michael Rawlings
916f12792f
4.11.4 v4.11.4 2018-06-28 15:30:44 -07:00
Michael Rawlings
5fe6cbec2e
fix nextsibiling error caused by components not being removed from lookup (#1068)
* fix nextSibiling error caused by components not being removed from lookup
2018-06-28 15:13:31 -07:00
Dylan Piercey
6d9c11d072 No longer set scoped attributes as default keys. (#1069)
* No longer set scoped attributes as default keys.
* Remove now unnecessary variable from compiled output
2018-06-28 12:19:31 -07:00
Michael Rawlings
1e4c5ce720
Merge pull request #1071 from marko-js/jsdom-context-require
switch to using extracted jsdom-context-require
2018-06-28 12:05:48 -07:00
Michael Rawlings
5729a7efd9
remove artificial memory limit, npm test is just mocha now 2018-06-28 10:13:32 -07:00
Michael Rawlings
bdd13e6449
update context-require 2018-06-28 10:12:37 -07:00
Michael Rawlings
505dd1e1ba
switch to using extracted jsdom-context-require 2018-06-27 14:12:41 -07:00
Michael Rawlings
47e2dfef0a
update changelog 2018-06-25 21:53:43 -07:00
Michael Rawlings
4c197199e1
4.11.3 v4.11.3 2018-06-25 21:50:53 -07:00
Michael Rawlings
a5b93ebb25
fix for loop autokeys (#1067) 2018-06-25 21:35:39 -07:00
Michael Rawlings
a78c54d25e
fix formatting, ignore ~* when formatting 2018-06-24 17:55:36 -07:00
Dustin Brown
2d307739df Improve parity between React and Marko example (#1037)
* improve parity between React and Marko example

There was some unnecessary cruft in the opening React example. This simplifies it to make it more in line with the Marko example.

* fix broken React example

The example I gave didn't work. I've fixed it and changed `var` use to `const` and `let`.
2018-06-22 09:43:56 -04:00
Dylan Piercey
8679a3e681
4.11.2 v4.11.2 2018-06-21 13:03:08 -07:00