Skip to content

Remove the obsolete fluent modifier aliases - #1830

Open
Alexandre Zollinger Chohfi (azchohfi) wants to merge 2 commits into
mainfrom
azchohfi-remove-obsolete-modifier-aliases
Open

Alexandre Zollinger Chohfi (azchohfi) wants to merge 2 commits into
mainfrom
azchohfi-remove-obsolete-modifier-aliases

Conversation

@azchohfi

Copy link
Copy Markdown
Collaborator

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: dd1e48935979a6bb73246a202699649246dabae2

Dimension Assessment Rationale
Change confidence 9/10 ↑ Every removed alias was a one-line forwarder, and each replacement has the same receiver, parameters and defaults.
↑ 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-reactor projects 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).

Removed Use instead
.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.cs drops 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.
  • ModifierSchemaTests used .Visible as its forwarder positive control. It now uses Margin(double uniform), and checks it has no direct assignment so it can only pass through the forwarding path.
  • Tests that only covered the shims are deleted. Every replacement still has its own test. The AccessKeyDisplayRequested unit test and the RBC_AllEventHandlersAttached selftest now call OnAccessKeyDisplayRequested, and the unit test now invokes the handler instead of checking for non-null.
  • Docs: regenerated docs/guide/reference/**, fixed a LightDismiss mention in the dialogs-and-flyouts guide, Visible(...) in docs/reference/async-system.md, the dead Visible/Selectable/Disabled patterns in reference-map.yaml, and the WPF Visibility row in the spec 038 vocab table. SetEventSubscriptionAnalyzer's AccessKeyDisplayRequested key stays, since that's the WinUI event name.
  • Both reactor.api.txt copies are unchanged because the index generator already skips [Obsolete] members.
  • CHANGELOG Removed entry with the migration table.

Linked issue / spec

Relates to #1819.

Test plan

  • dotnet restore Reactor.slnx then dotnet build Reactor.slnx --no-restore -c Release (with NuGetAudit=false behind a TLS proxy). No compile errors. The only errors were NU1301 on the src/vs-reactor projects, which couldn't reach nuget.org.
  • dotnet test tests/Reactor.Tests -p:Platform=x64 on the rebased head: 16,913 passed, 18 skipped, 1 failed. The failure was LoopbackHttpStallTests.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 all AllEvents_* checks.
  • dotnet run --project tools/Reactor.ModifierGen: nothing stale.
  • dotnet run --project tools/Reactor.DocPipeline -- compile --reference-only and compile --topic dialogs-and-flyouts. No pages added or removed, so nav.json is 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.

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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

📦 Build metrics

Artifact sizes for dd1e489 vs the base branch (7020f0c).

Packages (compressed .nupkg)

Artifact base PR Δ
Microsoft.UI.Reactor.nupkg 2.19 MB 2.19 MB -876 B (-0.04%) ≈
Microsoft.UI.Reactor.Advanced.nupkg 531.3 KB 531.3 KB -5 B (0.00%) ≈
Microsoft.UI.Reactor.Devtools.nupkg 290.6 KB 290.6 KB -16 B (-0.01%) ≈

Assemblies in Microsoft.UI.Reactor

Artifact base PR Δ
Microsoft.UI.Reactor.dll 2.93 MB 2.92 MB -2.00 KB (-0.07%) ✅
Reactor.Analyzers.dll 469.5 KB 469.5 KB +0 B (0.00%) ≈
Reactor.Localization.Generator.dll 16.0 KB 16.0 KB +0 B (0.00%) ≈
Reactor.Wrappers.Abstractions.dll 12.0 KB 12.0 KB +0 B (0.00%) ≈
Reactor.Wrappers.Generator.dll 229.5 KB 229.5 KB +0 B (0.00%) ≈

Assemblies in Microsoft.UI.Reactor.Advanced

Artifact base PR Δ
Microsoft.UI.Reactor.Advanced.dll 1.08 MB 1.08 MB +0 B (0.00%) ≈

Assemblies in Microsoft.UI.Reactor.Devtools

Artifact base PR Δ
Microsoft.UI.Reactor.Devtools.dll 791.5 KB 791.5 KB +0 B (0.00%) ≈

✅ smaller / ⚠️ larger / ≈ within noise. Sizes come from a Release dotnet pack on the CI runner: packages are the compressed .nupkg download size, assemblies the uncompressed DLL inside it.
workflow run.

@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

🧪 Merged coverage

Coverage for dd1e489 vs the base branch (7020f0c) — unit + selftest merged.

Metric base PR Δ
Line 89.22% 89.22% 0.00 pp ≈
Branch 43.99% (18780/42687) 44.00% (18782/42687) +0.01 pp ≈

No coverage change beyond the noise floor. ✅

✅ higher / ⚠️ lower / ≈ within noise. Δ is in percentage points; coverage is unit + selftest merged (Debug x64) on the CI runner. Cobertura reports attached to the workflow run as artifacts.

@azchohfi Alexandre Zollinger Chohfi (azchohfi) added ready-for-review Agent work and technical checks complete; awaiting review, not approval or merge and removed agent-preparing Agent is addressing feedback or completing required validation and CI labels Dec 4, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review Agent work and technical checks complete; awaiting review, not approval or merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants