Skip to content

refactor: rename TextField -> TextBox for WinUI parity#387

Merged
codemonkeychris merged 4 commits into
mainfrom
refactor/textfield-to-textbox
May 23, 2026
Merged

refactor: rename TextField -> TextBox for WinUI parity#387
codemonkeychris merged 4 commits into
mainfrom
refactor/textfield-to-textbox

Conversation

@codemonkeychris
Copy link
Copy Markdown
Collaborator

Summary

  • Rename the record TextFieldElementTextBoxElement and introduce TextBox(...) as the canonical DSL factory, matching WinUI's Microsoft.UI.Xaml.Controls.TextBox.
  • Keep TextField(...) as a [Obsolete(error: false)] forwarding alias for one release; removal is scheduled for a follow-up PR.
  • Update analyzers (REACTOR_A11Y_003) and the localization scanner to recognize both names so the deprecation window doesn't lose accessibility/localization coverage.
  • Migrate all call sites — src/Reactor/Controls/**, samples/**, docs/_pipeline/apps/**, tests/**, skills/**, plugins/reactor/skills/**, root SKILL.md — to TextBox(...).
  • Update docs/_pipeline/templates/*.md.dt; regenerated docs/guide/*.md via mur docs compile (exit 0).
  • MaskedTextFieldMaskedTextBox is intentionally deferred to a follow-up PR; its docstring notes this.
  • RichEditBox is left as-is to match WinUI naming.

Test plan

  • dotnet build src/Reactor/Reactor.csproj clean
  • dotnet test tests/Reactor.Tests
  • dotnet test tests/Reactor.AppTests
  • mur docs compile clean (already verified locally)
  • Spot-check that TextField(...) callers see CS0618 warning and that switching to TextBox(...) clears it
  • Confirm REACTOR_A11Y_003 still fires on TextBox(value) without a header / AutomationName / LabeledBy
  • Confirm mur check loc still picks up placeholder/header strings from both TextBox and TextField

🤖 Generated with Claude Code

Renames the record TextFieldElement to TextBoxElement and introduces
TextBox(...) as the canonical DSL factory. TextField(...) remains as a
[Obsolete(error: false)] forwarding alias and will be removed in a
follow-up PR. Updates analyzers, the loc scanner, samples, tests, doc
templates, and the regenerated docs/guide output. MaskedTextField is
intentionally deferred.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aligns Reactor’s text input naming with WinUI by making TextBox(...) / TextBoxElement the primary API surface, while keeping TextField(...) as an [Obsolete(error: false)] forwarding alias for a deprecation window. It also updates analyzer/localization tooling and migrates call sites across tests, samples, docs, and skills content.

Changes:

  • Rename TextFieldElementTextBoxElement and add TextBox(...) DSL factory (keep TextField(...) as obsolete alias).
  • Update analyzers + localization scanner + a11y scanner to recognize the new factory/element naming.
  • Migrate repo call sites and docs/templates from TextField(...) to TextBox(...) (plus changelog updates).
Show a summary per file
File Description
tools/Templates/templates/WinUIApp-CSharp/App.cs Update template sample usage to TextBox(...).
tests/Reactor.WinFormsTests.Host/TestDuctComponent.cs Update WinForms interop test component to TextBox(...).
tests/Reactor.Tests/ValidationVisualizerTests.cs Update validation visualizer tests to TextBox(...) / TextBoxElement.
tests/Reactor.Tests/ValidateExtensionTests.cs Update validation extension tests to TextBox(...) / TextBoxElement.
tests/Reactor.Tests/UseFocusTests.cs Update focus hook tests to TextBox(...).
tests/Reactor.Tests/SetExtensionsCoverageTests.cs Update setter coverage tests to TextBox(...).
tests/Reactor.Tests/RichEditBoxElementTests.cs Update reconciler CanUpdate test to use TextBox(...).
tests/Reactor.Tests/ReconcilerHelperTests.cs Update caption resolution tests to TextBoxElement.
tests/Reactor.Tests/Localization/LocalizableStringScannerTests.cs Update localization scanner tests to TextBox(...).
tests/Reactor.Tests/FormFieldTests.cs Update form field tests to TextBox(...) / TextBoxElement.
tests/Reactor.Tests/FormFieldDescriptorTests.cs Update descriptor tests to TextBoxElement.
tests/Reactor.Tests/ErrorStylingTests.cs Update error styling tests to TextBox(...).
tests/Reactor.Tests/ElementTests.cs Update element factory tests to TextBox(...).
tests/Reactor.Tests/Elements/Phase4InitFluentTests.cs Update fluent init tests to TextBox(...).
tests/Reactor.Tests/Elements/NamedStyleFluentTests.cs Update named-style fluent tests to TextBoxElement and reflection target type.
tests/Reactor.Tests/Elements/GallerySampleConstructionSmokeTests.cs Update construction smoke tests to TextBox(...).
tests/Reactor.Tests/Elements/FactoryWithExpressionTests.cs Update with { Placeholder = ... } test to TextBox(...).
tests/Reactor.Tests/Elements/EventFluentNullClearTests.cs Update fluent null-clear tests to TextBox(...).
tests/Reactor.Tests/ElementExtensionsCoverageTests.cs Update extension coverage tests to TextBox(...).
tests/Reactor.Tests/DslFactoryLogicTests.cs Update DSL factory logic tests to TextBox(...).
tests/Reactor.Tests/Controls/TypedColumnsBehaviorTests.cs Update typed editor factory tests to cast TextBoxElement.
tests/Reactor.Tests/Controls/PropertyGridDefaultsTests.cs Update property grid defaults tests to use Factories.TextBox(...).
tests/Reactor.Tests/Controls/EditorsBehaviorTests.cs Update editor factory behavior tests to cast TextBoxElement.
tests/Reactor.Tests/Controls/EditChainTests.cs Update edit chain tests to assert TextBoxElement.
tests/Reactor.Tests/AnalyzerTests/AccessibilityAnalyzerTests.cs Update analyzer tests to use a TextBox mock factory name.
tests/Reactor.Tests/AccessibilityScannerTests.cs Update scanner tests to TextBox(...) usage.
tests/Reactor.Tests/A11yShowcaseScannerTest.cs Update showcase scanner test tree to TextBox(...).
tests/Reactor.AppTests.Host/SelfTest/Fixtures/TextFieldMountFixtures.cs Update selftest fixtures to mount TextBox(...).
tests/Reactor.AppTests.Host/SelfTest/Fixtures/ReconcilerBigCoverageFixtures.cs Update large coverage fixture trees to TextBox(...).
tests/Reactor.AppTests.Host/SelfTest/Fixtures/PointerModifierFixtures.cs Update pointer modifier fixtures to TextBox(...).
tests/Reactor.AppTests.Host/SelfTest/Fixtures/HooksCoverageFixtures.cs Update hooks coverage fixtures to TextBox(...).
tests/Reactor.AppTests.Host/SelfTest/Fixtures/FocusFixtures.cs Update focus fixtures to TextBox(...).
tests/Reactor.AppTests.Host/SelfTest/Fixtures/EchoSuppressionFixtures.cs Update echo suppression fixture to TextBox(...).
tests/Reactor.AppTests.Host/SelfTest/Fixtures/DevtoolsFixtures.cs Update devtools fixtures to TextBox(...).
tests/Reactor.AppTests.Host/SelfTest/Fixtures/DataGridEditFixtures.cs Update DataGrid editing fixture to use TextBox(...).
tests/Reactor.AppTests.Host/SelfTest/Fixtures/CoverageBoostFixtures2.cs Update coverage boost fixture to TextBox(...).
tests/Reactor.AppTests.Host/SelfTest/Fixtures/CoverageBoostFixtures.cs Update coverage boost fixture to TextBox(...).
tests/Reactor.AppTests.Host/SelfTest/Fixtures/ControlUpdateFixtures.cs Update control update fixture to TextBox(...).
tests/Reactor.AppTests.Host/SelfTest/Fixtures/ControlCatalogFixtures.cs Update catalog entry to build TextBox(...) (label still “TextField”).
tests/Reactor.AppTests.Host/Fixtures/ImmediateAndDisabledFocusableFixtures.cs Update fixture to TextBox(...).
tests/Reactor.AppTests.Host/Fixtures/EventHandlerFixtures.cs Update fixture to TextBox(...).
tests/Reactor.AppTests.Host/Fixtures/DockingInputE2EFixtures.cs Update docking E2E fixtures to TextBox(...).
tests/Reactor.AppTests.Host/Fixtures/AccessibilityInteractionFixtures.cs Update interaction fixtures to TextBox(...).
tests/Reactor.AppTests.Host/Fixtures/AccessibilityFixtures.cs Update accessibility fixtures to TextBox(...).
tests/perf_bench/PerfBench.Priorities/Priorities.Reactor/PrioritiesApp.cs Update perf bench app input to TextBox(...).
tests/perf_bench/PerfBench.InteractivePool/InteractivePool.Reactor/InteractivePoolApp.cs Update interactive pool app to TextBox(...).
src/Reactor/Hooks/UseFocus.cs Update Focus(...) extension to TextBoxElement and docs string.
src/Reactor/Hooks/UseElementFocus.cs Update example to return TextBox(...).
src/Reactor/Elements/ElementExtensions.NamedStyles.cs Update named input-scope fluents to target TextBoxElement.
src/Reactor/Elements/ElementExtensions.Events.cs Update input event fluents (Changed, SelectionChanged) to TextBoxElement.
src/Reactor/Elements/ElementExtensions.cs Update “TextBox sugar” extension methods and examples to TextBox.
src/Reactor/Elements/Dsl.cs Introduce TextBox(...) factory and add obsolete TextField(...) forwarding alias.
src/Reactor/Core/Reconciler.Update.cs Switch update dispatch to TextBoxElement; update warning text to “TextBox”.
src/Reactor/Core/Reconciler.Mount.cs Mount switch now treats text input element as TextBoxElement (still mounts via MountTextField).
src/Reactor/Core/Reconciler.cs Update caption resolution switch to TextBoxElement.
src/Reactor/Core/Element.cs Rename element record type to TextBoxElement and shallow-equality arm.
src/Reactor/Core/AccessibilityScanner.cs Update scanner element matching to TextBoxElement and docs strings.
src/Reactor/Controls/Validation/ImmediateExtensions.cs Update docs comment mentioning per-keystroke input to “TextBox”.
src/Reactor/Controls/PropertyGrid/TypeRegistry.cs Use TextBox(...) for string editor factory.
src/Reactor/Controls/PropertyGrid/PropertyGridComponent.cs Update search + read-only rendering to TextBox(...).
src/Reactor/Controls/MaskedTextBox/MaskedTextFieldElement.cs Update remarks documenting deferred MaskedTextBox rename.
src/Reactor/Controls/Editors/Editors.cs Update editors to create TextBox(...) for text/uri/color compact.
src/Reactor/Controls/DataGrid/DataGridComponent.cs Update DataGrid search/editing fallbacks to TextBox(...) and comment text.
src/Reactor.Cli/Loc/LocalizableStringScanner.cs Add TextBox to named-localizable params; update positional placeholder handling for TextBox/TextField.
src/Reactor.Analyzers/AccessibilityAnalyzers.cs Update analyzer’s form-field method set to include TextBox.
skills/recipes/list-add-delete.cs Update recipe to TextBox(...).
skills/recipes/form-with-validation.cs Update recipe to TextBox(...).
skills/recipes/async-fetch-list.cs Update recipe to TextBox(...).
skills/reactor.api.txt Update API reference to TextBox(...) / TextBoxElement (plus ItemContainer additions).
skills/input.md Update skill doc examples to TextBox(...).
skills/forms.md Update skill doc examples to TextBox(...).
skills/dsl-reference.md Update DSL reference to TextBox(...).
skills/design.md Update design guidance to refer to TextBox (and related examples).
skills/design-docs/layout-and-scaling.md Update layout/scaling doc examples to TextBox(...).
skills/commanding.md Update commanding doc examples to TextBox(...).
SKILL.md Update top-level skill docs to TextBox(...).
samples/WinFormsInterop/SampleDuctComponent.cs Update sample to TextBox(...).
samples/TodoApp/Program.cs Update todo sample input to TextBox(...).
samples/ReactorHostControlDemo/MainWindow.xaml.cs Update demo input to TextBox(...).
samples/ReactorGallery/ControlPages/Navigation/TitleBarPage.cs Update gallery page to TextBox(...).
samples/ReactorGallery/ControlPages/Media/WebView2Page.cs Update URL input to TextBox(...).
samples/ReactorGallery/ControlPages/Media/PersonPicturePage.cs Update display name input to TextBox(...) (and shown source string).
samples/ReactorGallery/ControlPages/DesignGuidance/GeometryPage.cs Update design guidance samples to TextBox(...).
samples/ReactorGallery/ControlPages/BasicInput/TextFieldPage.cs Update page content/source strings to TextBox(...) (file name remains).
samples/ReactorCharting.Gallery/Samples/ComponentHierarchy.cs Update “TextBox” node rendering to use TextBox(...).
samples/Reactor.TestApp/Demos/TodoDemo.cs Update demo input to TextBox(...).
samples/Reactor.TestApp/Demos/SlotsDemo.cs Update slots demo input to TextBox(...).
samples/Reactor.TestApp/Demos/PersistedDemo.cs Update persisted demo inputs to TextBox(...).
samples/Reactor.TestApp/Demos/NavigationDemo.cs Update notes input to TextBox(...).
samples/Reactor.TestApp/Demos/IntegratedDataDemo.cs Update editor to TextBox(...).
samples/Reactor.TestApp/Demos/InputGesturesDemo.cs Update focus demo input to TextBox(...).
samples/Reactor.TestApp/Demos/FormDemo.cs Update form demo inputs to TextBox(...).
samples/Reactor.TestApp/Demos/DataTemplateDemo.cs Update filter input to TextBox(...).
samples/Reactor.TestApp/Demos/DataSystemDemo.cs Update search input to TextBox(...).
samples/Reactor.TestApp/Demos/ContextDemo.cs Update context demo input to TextBox(...).
samples/Reactor.TestApp/Demos/AsyncValueSamplesDemo.cs Update async sample query inputs to TextBox(...).
samples/NavigationDemo/App.cs Update profile edit inputs to TextBox(...).
samples/CommandingDemo/App.cs Update commanding demo inputs to TextBox(...).
samples/apps/validation-showcase/App.cs Update validation showcase inputs to TextBox(...) + Focus(...).
samples/apps/regedit/Components/Dialogs/FindDialog.cs Update dialog input to TextBox(...).
samples/apps/regedit/Components/Dialogs/FavoritesDialog.cs Update dialog input to TextBox(...).
samples/apps/regedit/Components/Dialogs/ExportDialog.cs Update branch field to TextBox(...).
samples/apps/regedit/Components/Dialogs/EditStringDialog.cs Update dialog inputs to TextBox(...).
samples/apps/regedit/Components/Dialogs/EditQwordDialog.cs Update dialog inputs to TextBox(...).
samples/apps/regedit/Components/Dialogs/EditMultiStringDialog.cs Update dialog inputs to TextBox(...).
samples/apps/regedit/Components/Dialogs/EditDwordDialog.cs Update dialog inputs to TextBox(...).
samples/apps/regedit/Components/Dialogs/EditBinaryDialog.cs Update dialog inputs to TextBox(...).
samples/apps/regedit/App.cs Update rename dialogs to TextBox(...).
samples/apps/minesweeper/Components/Dialogs/DialogContent.cs Update numeric inputs to TextBox(...).
samples/apps/dock-showcase/App.cs Update editor/filter inputs to TextBox(...).
samples/apps/demo-script-tool/App/Components/StepCard.cs Update editable fields to TextBox(...).
samples/apps/demo-script-tool/App/Components/DemoPromptPanel.cs Update title/prompt fields to TextBox(...).
samples/apps/chat/Chat.UI/LandingPage.cs Update chat input to TextBox(...).
samples/apps/chat/Chat.UI/InputBar.cs Update chat input bar to TextBox(...).
samples/apps/a11y-showcase/App.cs Update a11y showcase inputs to TextBox(...).
plugins/reactor/skills/reactor-recipes/references/use-custom-hook.cs Update reference snippet to TextBox(...).
plugins/reactor/skills/reactor-recipes/references/list-add-delete.cs Update reference snippet to TextBox(...).
plugins/reactor/skills/reactor-recipes/references/form-with-validation.cs Update reference snippet to TextBox(...).
plugins/reactor/skills/reactor-recipes/references/async-fetch-list.cs Update reference snippet to TextBox(...).
plugins/reactor/skills/reactor-input/SKILL.md Update plugin skill doc examples to TextBox(...).
plugins/reactor/skills/reactor-getting-started/SKILL.md Update plugin getting started mapping to TextBox(...).
plugins/reactor/skills/reactor-forms/SKILL.md Update plugin forms docs to TextBox(...).
plugins/reactor/skills/reactor-dsl/references/reactor.api.txt Update plugin API reference to TextBox(...) / TextBoxElement (plus ItemContainer additions).
plugins/reactor/skills/reactor-design/SKILL.md Update plugin design docs to TextBox(...).
plugins/reactor/skills/reactor-commanding/SKILL.md Update plugin commanding docs to TextBox(...).
docs/guide/xaml-developers.md Update guide to TextBox(...) terminology/examples.
docs/guide/winforms-interop.md Update guide examples to TextBox(...).
docs/guide/windows.md Update guide example to TextBox(...).
docs/guide/text-and-media.md Update references from TextField to TextBox.
docs/guide/rules-of-reactor.md Update examples to TextBox(...).
docs/guide/reconciliation.md Doc snippet update (includes additional reconciliation details).
docs/guide/recipes/search-with-suggestions.md Update recipe to TextBox(...).
docs/guide/recipes/multi-step-form.md Update recipe to TextBox(...) and link text.
docs/guide/recipes/login.md Update recipe to TextBox(...) and wording.
docs/guide/recipes/command-palette.md Update recipe to TextBox(...) and wording.
docs/guide/reactor-vs-xaml.md Update narrative to “TextBox controlled-input pattern”.
docs/guide/persistence.md Update examples to TextBox(...).
docs/guide/performance.md Doc snippet update (includes additional reconciliation details).
docs/guide/navigation.md Update example to TextBox(...).
docs/guide/layout.md Update example to TextBox(...).
docs/guide/input-and-gestures.md Update examples to TextBox(...) and wording.
docs/guide/hooks.md Update examples to TextBox(...).
docs/guide/getting-started.md Update getting started examples to TextBox(...).
docs/guide/forms.md Update forms guide to TextBox(...) terminology and snippet reference.
docs/guide/focus-and-input-internals.md Update internal docs example to <TextBox>.
docs/guide/flex-layout.md Update examples to TextBox(...).
docs/guide/effects.md Update example to TextBox(...).
docs/guide/docking.md Update narrative to TextBox.
docs/guide/dialogs-and-flyouts.md Update narrative and screenshot alt text to TextBox.
docs/guide/dev-tooling.md Update examples to TextBox(...).
docs/guide/controls.md Update control overview to TextBox.
docs/guide/components.md Update example to TextBox(...).
docs/guide/commanding.md Update examples to TextBox(...).
docs/guide/collections.md Update examples to TextBox(...).
docs/guide/cheat-sheet.md Update cheat sheet entries to TextBox.
docs/guide/charting.md Update narrative to TextBox.
docs/guide/architecture-overview.md Doc snippet update (also includes unrelated example change).
docs/guide/advanced.md Update examples to TextBox(...).
docs/guide/accessibility.md Update examples + analyzer text to TextBox.
docs/_pipeline/templates/xaml-developers.md.dt Update template text/examples to TextBox.
docs/_pipeline/templates/text-and-media.md.dt Update template references to TextBox.
docs/_pipeline/templates/recipes/multi-step-form.md.dt Update recipe template to link TextBox.
docs/_pipeline/templates/recipes/login.md.dt Update recipe template wording to TextBox.
docs/_pipeline/templates/recipes/command-palette.md.dt Update recipe template wording to TextBox.
docs/_pipeline/templates/reactor-vs-xaml.md.dt Update template narrative to TextBox.
docs/_pipeline/templates/input-and-gestures.md.dt Update template examples to TextBox.
docs/_pipeline/templates/getting-started.md.dt Update template wording from TextField to TextBox.
docs/_pipeline/templates/forms.md.dt Update forms template to TextBox (snippet key currently mismatched).
docs/_pipeline/templates/focus-and-input-internals.md.dt Update template example to <TextBox>.
docs/_pipeline/templates/flex-layout.md.dt Update template examples to TextBox.
docs/_pipeline/templates/docking.md.dt Update template narrative to TextBox.
docs/_pipeline/templates/dialogs-and-flyouts.md.dt Update template narrative/alt text to TextBox.
docs/_pipeline/templates/controls.md.dt Update controls template to TextBox.
docs/_pipeline/templates/cheat-sheet.md.dt Update cheat sheet template to TextBox.
docs/_pipeline/templates/charting.md.dt Update charting template narrative to TextBox.
docs/_pipeline/templates/advanced.md.dt Update template example to TextBox(...).
docs/_pipeline/templates/accessibility.md.dt Update analyzer text to TextBox.
docs/_pipeline/apps/xaml-developers/App.cs Update pipeline app code to TextBox(...).
docs/_pipeline/apps/winforms-interop/App.cs Update pipeline app code to TextBox(...).
docs/_pipeline/apps/windows/App.cs Update pipeline app code to TextBox(...).
docs/_pipeline/apps/todo-app/App.cs Update pipeline app code to TextBox(...).
docs/_pipeline/apps/rules-of-reactor/App.cs Update pipeline app code to TextBox(...).
docs/_pipeline/apps/recipe-search-with-suggestions/App.cs Update pipeline app code to TextBox(...).
docs/_pipeline/apps/recipe-multi-step-form/App.cs Update pipeline app code to TextBox(...).
docs/_pipeline/apps/recipe-login/App.cs Update pipeline app code to TextBox(...).
docs/_pipeline/apps/recipe-command-palette/App.cs Update pipeline app code to TextBox(...).
docs/_pipeline/apps/readme/App.cs Update pipeline app code to TextBox(...).
docs/_pipeline/apps/persistence/App.cs Update pipeline app code to TextBox(...).
docs/_pipeline/apps/navigation/App.cs Update pipeline app code to TextBox(...).
docs/_pipeline/apps/layout/App.cs Update pipeline app code to TextBox(...).
docs/_pipeline/apps/input-and-gestures/App.cs Update pipeline app code to TextBox(...).
docs/_pipeline/apps/hooks/App.cs Update pipeline app code to TextBox(...).
docs/_pipeline/apps/getting-started/App.cs Update pipeline app code to TextBox(...).
docs/_pipeline/apps/forms/App.cs Update forms pipeline app code to TextBox(...) (snippet tag remains textfield-config).
docs/_pipeline/apps/effects/App.cs Update pipeline app code to TextBox(...).
docs/_pipeline/apps/dialogs-and-flyouts/App.cs Update pipeline app code to TextBox(...).
docs/_pipeline/apps/dev-tooling/App.cs Update pipeline app code to TextBox(...).
docs/_pipeline/apps/controls/App.cs Update pipeline app code to TextBox(...).
docs/_pipeline/apps/components/App.cs Update pipeline app code to TextBox(...).
docs/_pipeline/apps/commanding/App.cs Update pipeline app code to TextBox(...).
docs/_pipeline/apps/collections/App.cs Update pipeline app code to TextBox(...).
docs/_pipeline/apps/advanced/App.cs Update pipeline app code to TextBox(...).
docs/_pipeline/apps/accessibility/App.cs Update pipeline app code to TextBox(...).
CHANGELOG.md Document rename + deprecation of Factories.TextField(...).

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 204/204 changed files
  • Comments generated: 3

Comment on lines 135 to 142
// Also check positional arguments that map to localizable params
// For TextField: placeholder is arg index 2, header is set via property
if (methodName == "TextField" && args.Count >= 3 && args[2].NameColon == null)
// For TextBox/TextField: placeholder is arg index 2, header is set via property
if ((methodName == "TextBox" || methodName == "TextField") && args.Count >= 3 && args[2].NameColon == null)
{
var placeholderArg = args[2].Expression;
if (!IsMessageCall(placeholderArg))
ProcessExpression(placeholderArg, className, "TextField.placeholder");
ProcessExpression(placeholderArg, className, $"{methodName}.placeholder");
}
Comment on lines +84 to 90
`TextBox` covers the common WinUI `TextBox` knobs through dedicated fluents
so you rarely need `.Set(...)`. The named-input shapes set the appropriate
`InputScope` for soft-keyboard and IME hinting:

```csharp snippet="forms/textfield-config"
```csharp snippet="forms/TextBox-config"
```

Comment on lines 807 to 813
// Uncontrolled divergence: value is set but no onChange to reconcile.
// Log once per field to help developers catch mismatched bindings.
_logger?.LogWarning(
"TextField value diverged from controlled value with no OnChanged handler. " +
"TextBox value diverged from controlled value with no OnChanged handler. " +
"Controlled: \"{ControlledValue}\", Actual: \"{ActualValue}\". " +
"Wire up OnChanged to keep state in sync, or this field won't reflect user edits after re-renders.",
Truncate(n.Value, 20), Truncate(tb.Text, 20));
Comment thread tests/Reactor.Tests/UseFocusTests.cs Fixed
codemonkeychris and others added 3 commits May 23, 2026 08:08
The bulk markdown rename used PowerShell's case-insensitive -replace,
which mangled the lowercase snippet id forms/textfield-config into
forms/TextBox-config in the template but left the App.cs snippet
marker untouched. Align both ends to lowercase forms/textbox-config
and rename the class to TextBoxConfigDemo.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…test

- Reconciler.Update: clear TextBox.Header/Description via ClearValue when
  the new element transitions them to null. Previously the value stayed
  stuck on the control across re-renders.
- LocalizableStringScanner: also extract the positional header argument
  (TextBox/TextField index 3); previously only the placeholder at
  index 2 was scanned, so positional header strings silently lost
  localization coverage.
- UseFocusTests: drop the unused `var el =` assignment flagged by
  github-code-quality; the chained call still runs and registers.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The FormFieldLabelAnalyzer test pinned the diagnostic span to columns
9..25 (16 chars, the length of TextField(value)). After the
TextField → TextBox rename, the call site is TextBox(value) — 14
chars — so the diagnostic now ends at column 23. Update the expected
span accordingly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@codemonkeychris codemonkeychris merged commit 5d4e81b into main May 23, 2026
43 of 71 checks passed
@codemonkeychris codemonkeychris deleted the refactor/textfield-to-textbox branch May 23, 2026 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants