Commit Graph

7 Commits

Author SHA1 Message Date
Steve Sanderson e71db85149 Handle overlapping events (#1655)
* Add failing unit test to demonstrate overlapping events bug

* Handle overlapping events

* Make RemoteRenderer.UpdateDisplay's return task not complete until client sends explict ACK

* CR: Rename UpdateDisplay to UpdateDisplayAsync

* CR: Fix namespace

* CR: Catch synchronous SendAsync exceptions (if they can happen)
2018-11-13 12:08:08 +00:00
Adrian Wright 5e0aa0c0fa Fix typos 2018-11-09 10:17:10 -08:00
Steve Sanderson 211ad636fd Cascading parameters (#1545)
* Add Provider component

* Implement discovery and matching rules for tree parameters

* Remove artificial component hierarchy unit tests now they are redundant

* Refactor: Have RenderTreeFrame point to the ComponentState instead of IComponent

... so we can more quickly find associated tree param state without having to do lookups based on the componentId.

Also rename AssignComponentId to AttachAndInitComponent to be more descriptive.

* Refactor: Add shared code path for updating parameters so there's only one place to attach tree parameters

Now framework code should no longer call IComponent.SetParameters directly, except if it knows it's definitely dealing with a root component.

* Refactor: Simplify Parameter by making it hold the name/value directly

This will be necessary for tree parameters, which don't correspond to any RenderTreeFrame

* Refactor: Wrap ParameterEnumerator logic in extra level of iterator so we can also add one for iterating tree params

* Extend ParameterEnumerator to list tree parameters too

* Include tree parameters in SetParameters calls

* Refactor: Move parameter change detection logic into separate utility class

... so we include https://github.com/dotnet/jsinterop/pull/3

* Refactor: Move tree parameter tests from RendererTest.cs their own file

* Have Provider re-render consumers when value changes. Unit tests in next
commit.

* Components that accept tree parameters need to snapshot their direct params for later replay

* Empty commit to reawaken CI

* CR: Make name matching case-insensitive

* Refactor: Rename Provider/TreeParameter to
CascadingValue/CascadingParameter

* Add dedicated [CascadingParameter] attribute. Remove FromTree flag.

* CR: CascadingParameterState cleanups

* CR: Extra unit test

* CR: arguments/parameters

* CR: Enumerator improvements

* Fix test
2018-10-15 11:11:46 +01:00
Steve Sanderson 1089eecbfc In RenderBatchWriter, deduplicate strings only when safe to do so (#1340)
We allow deduplication of HTML element and attribute names, plus whitespace text nodes / attribute values.
2018-08-22 14:52:35 +01:00
Ryan Nowak 8f072a0711 Add HTML Block rewriting (#1146)
* Add HTML Block rewriter

* Baseline updates

* test gaps

* Update some unit tests to represent same behavior as before

* Define Markup frame type. Tests for rendering markup frames into render tree.

* Support markup frames during diffing (retain, insert, update, delete)

* Support markup blocks on WebAssembly

* Support rendering markup frames with server-side execution too

* Support markup blocks with multiple top-level nodes. Support updating markup dynamically.

* Define MarkupString type as a way to insert dynamic markup without needing custom RenderFragment code

* Remove comment

* CR: Better null value handling
2018-07-23 18:18:07 +01:00
Steve Sanderson 767a2373c8 Eliminate ElementRef's static incrementing ID for remote rendering cases
... because it's important not to disclose cross-user state, such as the number of IDs that have been assigned. Plus we don't want to run out of unique IDs, which we could if it's limited by the range of an 'int'.
2018-07-10 09:52:19 +01:00
Steve Sanderson 5bccac05fc Refactoring to prepare for remote rendering.
- Prepare for building multiple entrypoint variants of the .js library
- Use async interop more consistently for rendering and event handling
- Add binary serializer for RenderBatch with tests
2018-07-09 11:04:14 +01:00