Skip to content
This repository was archived by the owner on Feb 25, 2021. It is now read-only.

"Fixed" mode and E2E tests for <CascadingValue> #1566

Merged
merged 3 commits into from
Oct 18, 2018

Conversation

SteveSandersonMS
Copy link
Member

@SteveSandersonMS SteveSandersonMS commented Oct 15, 2018

This is a follow-up to #1545.

It's a perf optimization that allows the framework to skip the subscription tracking and parameter snapshotting that it normally has to do when cascading parameters might change value. The intended use case is for things like "form context" or anywhere you do:

<CascadingValue Value=this>...</CascadingValue>

... because if the Value instance is constant for the lifetime of the <CascadingValue>, we can make this really cheap.

If developers fail to apply this optimization when they could, nothing bad happens. We only expect this optimization to be used by our framework components and more advanced component authors who have proactively read docs about this.

Also, E2E tests

It was convenient to chain the E2E tests for cascading parameter/value in general to this PR. As usual, the E2E tests are not meant to cover every possible combination of use cases and error scenarios (that's in the unit tests); the E2E tests are a representative sample of high-level common scenarios.

@SteveSandersonMS SteveSandersonMS force-pushed the stevesa/cascadingvalue-fixed-mode branch from 11060d8 to 5690df7 Compare October 15, 2018 13:29
@SteveSandersonMS SteveSandersonMS changed the title Support "Fixed" mode for <CascadingValue> "Fixed" mode and E2E tests for <CascadingValue> Oct 15, 2018
@SteveSandersonMS SteveSandersonMS force-pushed the stevesa/cascadingvalue-fixed-mode branch from 5690df7 to 6090ca3 Compare October 18, 2018 08:44
@SteveSandersonMS SteveSandersonMS merged commit f9547db into master Oct 18, 2018
@SteveSandersonMS SteveSandersonMS deleted the stevesa/cascadingvalue-fixed-mode branch October 18, 2018 08:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants