You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Store component/element keys on RenderTreeFrame
Also refactored how RenderTreeFrame gets constructed. The previous arrangement of having ad-hoc ctor overloads for different scenarios became intractible (too many combinations to avoid clashes; risk of accidentally losing field values when cloning). There's now one constructor per RenderTreeFrameType, so you always know where to add any new field values, and implicitly guarantees you don't lose other field values because adding a new param forces updates at all the call sites.
* Add StackObjectPool, which will be useful momentarily
* Support keyed insertions/deletions
* Refactor AppendDiffEntriesForRange to prepare for adding "move" logic
* Apply permutations on the JS side
* Handle keyed moves by writing a post-edit permutation list
* Shrink KeyedItemInfo struct
* Include sourcemaps when building client-side Blazor apps with ReferenceFromSource
* Update struct length of edit frames now it's explicit layout
It's longer now because all the reference-type fields, except the last, now have to be 8 bytes for compatibility with 64-bit runtimes. Previously on Mono WebAssembly the reference-type fields were all 4 bytes.
* Tolerate clashing keys (i.e., produce a valid diff, even if suboptimal)
* Tolerate keys being added/removed incorrectly
* E2E test harness for 'key'
* Some more unit test cases
* Invert diffing logic to prefer matching by key over sequence
Previously it preferred sequence over key, but that's wrong, and surfaces as bugs when you mix keyed and unkeyed items. We need to prefer key over sequence, because key is meant to guarantee preservation, whereas sequence is just best-effort preservation.
* Make unit test cases more adversarial
* First actual E2E test
* In E2E test, verify correct preservation of components
* E2E tests for simple insert/delete cases (with and without keys)
* E2E test for reordering. Also extend other tests to verify simultaneous editing.
* E2E test for many simultaneous changes
* Update reference sources
* CR: Avoid x = y = z
* CR: Only use 'finally' for actual cleanup
* CR: Clean up RenderTreeFrame assignment
* CR: Include 'key' in RenderTreeFrame.ToString()
* CR: Avoid "new T()" in StackObjectPool
* CR: Make KeyedItemInfo readonly
* CR: Handle change of frame type with matching keys (and sequence)
* CR: Add E2E test showing form + key scenarios
* Preserve focus across edits
* Tweak E2E test case
* In client-side Blazor, prevent recursive event handler invocations
* Actual E2E tests for moving form elements
0 commit comments