Repository navigation
Remove the obsolete fluent modifier aliases - #1830
Alexandre Zollinger Chohfi (azchohfi) wants to merge 2 commits into
Conversation
Drops the [Obsolete] one-line forwarders Visible, Disabled, DisabledFocusable, Selectable, ReadOnly (TextBox, RatingControl), Editable, Closable, Active, IsAddButtonVisible, ShowAddButton, LightDismiss and both AccessKeyDisplayRequested overloads, plus the Visible/Disabled fluent aliases in ModifierSchema. Each replacement takes the same receiver and arguments. Relates to #1819. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the obsolete modifier alias cleanup.
No open issues 🎉
What changed in this PR
Removes obsolete fluent modifier aliases from Reactor’s C# API as part of the compatibility cleanup tracked in #1819.
Changes:
- Deletes obsolete forwarding methods and their schema aliases.
- Removes shim-only tests and updates coverage to use supported methods.
- Refreshes documentation and adds migration guidance, including the required boolean inversion for
.Disabled(x).
| File | Description |
|---|---|
tests/Reactor.Tests/InputModifierExtensionsTests.cs |
Tests the supported access-key callback and verifies invocation. |
tests/Reactor.Tests/ElementModifiersCoverageTests.cs |
Removes the popup shim test. |
tests/Reactor.Tests/ElementExtensionsCoverageTests.cs |
Removes tests for deleted aliases. |
tests/Reactor.Tests/AnalyzerTests/ModifierSchemaTests.cs |
Uses Margin to verify forwarder detection. |
tests/Reactor.AppTests/Tests/ImmediateAndDisabledFocusableTests.cs |
Updates comments and assertion wording. |
tests/Reactor.AppTests.Host/SelfTest/Fixtures/ReconcilerBigCoverageFixtures.cs |
Uses the supported access-key callback method. |
tests/Reactor.AppTests.Host/Fixtures/ImmediateAndDisabledFocusableFixtures.cs |
Updates the fixture documentation comment. |
tests/Reactor.AppTests.Host/FixtureRegistry.cs |
Updates a modifier name in a comment. |
src/Reactor/Elements/ElementExtensions.cs |
Deletes obsolete fluent aliases. |
src/Reactor.Analyzers/Modifiers/ModifierSchema.cs |
Removes Visible and Disabled alias metadata. |
docs/specs/tasks/038-vocab-table.csv |
Recommends IsVisible for visibility migration. |
docs/reference/async-system.md |
Uses current visibility terminology. |
docs/guide/reference/modifiers/typography.md |
Removes Selectable documentation. |
docs/guide/reference/modifiers/status-and-info.md |
Removes Active and Closable documentation. |
docs/guide/reference/modifiers/navigation.md |
Removes obsolete add-tab aliases. |
docs/guide/reference/modifiers/layout-and-spacing.md |
Removes Visible documentation. |
docs/guide/reference/modifiers/input.md |
Removes Editable and ReadOnly aliases. |
docs/guide/reference/modifiers/input-and-events.md |
Removes Disabled documentation. |
docs/guide/reference/modifiers/focus-and-keyboard.md |
Removes obsolete access-key callback documentation. |
docs/guide/reference/modifiers/ElementExtensions.md |
Removes deleted methods from the modifier index. |
docs/guide/reference/modifiers/dialogs-and-flyouts.md |
Removes LightDismiss documentation. |
docs/guide/reference/modifiers/buttons.md |
Removes DisabledFocusable documentation. |
docs/guide/reference/elements/text.md |
Removes the Selectable cross-link. |
docs/guide/reference/elements/status-and-info.md |
Removes obsolete status modifier cross-links. |
docs/guide/reference/elements/navigation.md |
Removes obsolete TabView modifier cross-links. |
docs/guide/reference/elements/input.md |
Removes obsolete input modifier cross-links. |
docs/guide/reference/elements/dialogs-and-flyouts.md |
Removes the LightDismiss cross-link. |
docs/guide/reference/elements/buttons.md |
Removes the DisabledFocusable cross-link. |
docs/guide/dialogs-and-flyouts.md |
Corrects the popup light-dismiss property name. |
docs/_pipeline/templates/dialogs-and-flyouts.md.dt |
Updates the source template’s light-dismiss wording. |
docs/_pipeline/reference-map.yaml |
Removes obsolete modifier matching patterns. |
CHANGELOG.md |
Documents removals and replacement calls. |
Review effort: Balanced
📦 Build metricsArtifact sizes for Packages (compressed .nupkg)
Assemblies in Microsoft.UI.Reactor
Assemblies in Microsoft.UI.Reactor.Advanced
Assemblies in Microsoft.UI.Reactor.Devtools
✅ smaller / |
🧪 Merged coverageCoverage for
No coverage change beyond the noise floor. ✅ ✅ higher / |
Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
dd1e48935979a6bb73246a202699649246dabae2↑ Release solution build has no compile errors, and 16,913 unit tests pass on the rebased head. The one failure was an unrelated loopback HTTP timing test that passed 7/7 on re-run.
↑ The touched selftest (
RBC_group) passes with 0 failures.↑ pr-review ran all seven dimensions plus a GPT cross-check, with no critical or high findings. The medium and low ones are fixed.
↓ The
src/vs-reactorprojects couldn't restore through the local proxy, so the Release build didn't cover them. They don't use these modifiers.↓ Full selftest and E2E suites not run locally. CI covers them.
Summary
Removes the fluent modifier aliases that have been
[Obsolete]since #296 and #301, before the first preview. Each was a one-line forwarder, so nothing is lost. The replacements take the same receiver and arguments, except.Disabled(x), which becomes.IsEnabled(!x)..Visible(x).IsVisible(x).Disabled()/.Disabled(x).IsEnabled(false)/.IsEnabled(!x).DisabledFocusable(x).IsDisabledFocusable(x).Selectable(x).IsTextSelectionEnabled(x).ReadOnly(x)(TextBox, RatingControl).IsReadOnly(x).Editable(x).IsEditable(x).Closable(x).IsClosable(x).Active(x).IsActive(x).IsAddButtonVisible(x),.ShowAddButton(x).IsAddTabButtonVisible(x).LightDismiss(x).IsLightDismissEnabled(x).AccessKeyDisplayRequested(h)(both overloads).OnAccessKeyDisplayRequested(h)Other changes:
ModifierSchema.csdrops the"Visible"and"Disabled"fluent aliases. ModifierGen has nothing to regenerate, since those names only feed the visual-owning map (neither slot takes the visual) and the schema tests.ModifierSchemaTestsused.Visibleas its forwarder positive control. It now usesMargin(double uniform), and checks it has no direct assignment so it can only pass through the forwarding path.AccessKeyDisplayRequestedunit test and theRBC_AllEventHandlersAttachedselftest now callOnAccessKeyDisplayRequested, and the unit test now invokes the handler instead of checking for non-null.docs/guide/reference/**, fixed aLightDismissmention in the dialogs-and-flyouts guide,Visible(...)indocs/reference/async-system.md, the deadVisible/Selectable/Disabledpatterns inreference-map.yaml, and the WPFVisibilityrow in the spec 038 vocab table.SetEventSubscriptionAnalyzer'sAccessKeyDisplayRequestedkey stays, since that's the WinUI event name.reactor.api.txtcopies are unchanged because the index generator already skips[Obsolete]members.Removedentry with the migration table.Linked issue / spec
Relates to #1819.
Test plan
dotnet restore Reactor.slnxthendotnet build Reactor.slnx --no-restore -c Release(withNuGetAudit=falsebehind a TLS proxy). No compile errors. The only errors were NU1301 on thesrc/vs-reactorprojects, which couldn't reach nuget.org.dotnet test tests/Reactor.Tests -p:Platform=x64on the rebased head: 16,913 passed, 18 skipped, 1 failed. The failure wasLoopbackHttpStallTests.DeadlineClient_ReportsABodyThatStallsAfterTheHeaders, a timing test unrelated to this change. It passed on the run before the rebase, and a re-run of that class passed 7/7.dotnet run --project tests/Reactor.AppTests.Host --no-build -c Debug -p:Platform=x64 -- --self-test --filter "RBC_": 0 failures, including allAllEvents_*checks.dotnet run --project tools/Reactor.ModifierGen: nothing stale.dotnet run --project tools/Reactor.DocPipeline -- compile --reference-onlyandcompile --topic dialogs-and-flyouts. No pages added or removed, sonav.jsonis unchanged. Re-running after the rebase produced no diff.mur --regen-api: no change.Risk / breaking changes
Breaking for apps still calling the old names, which have shown CS0618 in every preview. The fix is the rename in the table above. Watch
.Disabled(x): a plain rename to.IsEnabled(x)compiles but inverts the value.