refactor(swiflowui)!: LabeledField labelPrefix/labelSuffix; Toast numeric guardrails; scoped disabled-vs-inert comments#262
Merged
Conversation
📦 Bundle size
✅ Within budget (≤5% growth allowed). Baseline: Swift 6.3, WASM SDK 6.3-RELEASE, measured 2026-06-18. |
…eric guardrails; scoped disabled-vs-inert comments LabeledField named the same adornment slots prefix:/suffix: while every field control says labelPrefix:/labelSuffix: — renamed before the split vocabulary ages past its one release (BREAKING, no behavior change). ToastQueue(maxVisible: 0) parked every toast in pending forever and rendered nothing, silently; it now clamps to 1 with a DEBUG warn (the DataTable rowHeight-guard precedent). ToastItem warns on duration <= 0 (the timer fires next tick — a one-frame flash is never intended). The 'inert, not disabled' comments claimed an unscoped project rule that Button and the field chrome don't follow. The actual rule is scoped and the code already obeys it: native disabled where form semantics matter (submission exclusion, :disabled UA behavior, fieldset cascade); inert for controls inside composite widgets that must leave the tab order without form semantics. Comments now state that rule at both anchor sites. NumberField/Slider Field<T> overloads intentionally NOT added: the gap is documented in NumberField.swift — Field's validators are string-typed today. Whole-package swift test: 1907 green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
zzal
force-pushed
the
fix/swiflowui-api-polish
branch
from
July 20, 2026 01:22
7a99482 to
bf7116b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Audit backlog B10 + B7 (Part-7 Mediums/High).
LabeledField(labelPrefix:/labelSuffix:)replacesprefix:/suffix:— the same slots every field control already spellslabelPrefix:/labelSuffix:. Renamed clean (no deprecation shim): the split vocabulary is one release old, and a defaulted deprecated overload would be ambiguous with the new one at call sites that pass neither.ToastQueue(maxVisible: 0)previously parked every toast inpendingand rendered nothing, silently — it now clamps to 1 with a DEBUGswiflowWarn(the DataTablerowHeightguard precedent).ToastItem(duration: ≤0)warns (the timer fires next tick; a one-frame flash is never what the caller meant). Both covered by a new sync-only warn-capturing suite.disabledwhere form semantics matter (Button, inputs,<fieldset>cascade);inertfor controls inside composite widgets (Pagination pagers, Dropdown items) that must leave the tab order without form semantics. Pagination's "project rule" comment and Button's disabled line now state the actual rule.Field<T>overloads for NumberField/Slider — NumberField's doc documents the gap as intentional (Field's validators are string-typed today); adding them means generalizing the Forms validator system, not polishing API.Whole-package
swift test: 1907 tests, 353 suites, green.🤖 Generated with Claude Code