Skip to content

fix(ui): build the boolean switch row from the shared list item - #1244

Merged
TheMeinerLP merged 2 commits into
mainfrom
fix/ui-switch-field-list-item
Nov 23, 2026
Merged

TheMeinerLP merged 2 commits into
mainfrom
fix/ui-switch-field-list-item

Conversation

@TheMeinerLP

Copy link
Copy Markdown

Description

The on/off rows of the generated settings forms (every boolean setting and the optional-object switch) drew their own padded row. They now use MdListItem with the switch in its trailing slot, so the inset and height match the other rows. The label, description, required marker, error text and the switch behave as before.

Part of task 4.7 of migrate-content-to-components (BooleanSwitchRenderer).

Type of change

  • fix - bug fix (UI consistency)

How was this tested?

  • SwitchField.test.ts gained two tests (row is a list item, error stays visible).
  • npx vitest run src/components/renderers src/components/settings src/anchors src/style-gate: 84 files, 1173 tests passed.
  • npm run typecheck: clean.

Checklist

  • Commit messages follow the Conventional Commits convention
  • Tests cover the change
  • ./gradlew build passes locally (frontend-only change, not run)
  • Existing copyright headers are preserved; new files carry the appropriate header
  • No credentials, tokens or personal data are included in the diff

@TheMeinerLP TheMeinerLP added the ci:e2e Run the dashboard end-to-end tests label Nov 23, 2026
SwitchField, the row behind BooleanSwitchRenderer and the optional
object switch, drew its own padded row. It is now an MdListItem with
the switch in the trailing slot, so the 16 pixel inset and the row
height come from the shared component.

Signed-off-by: TheMeinerLP <github@themeinerlp.dev>
The lookup of the shared list item resolved to an unresolved type and
tripped no-unsafe-call. Cast the component the way the settings tests do.

Signed-off-by: TheMeinerLP <github@themeinerlp.dev>
@TheMeinerLP
TheMeinerLP force-pushed the fix/ui-switch-field-list-item branch from 922138d to 654d145 Compare November 23, 2026 07:15
@TheMeinerLP
TheMeinerLP added this pull request to the merge queue Nov 23, 2026
Merged via the queue into main with commit 73b1b07 Nov 23, 2026
39 checks passed
@TheMeinerLP
TheMeinerLP deleted the fix/ui-switch-field-list-item branch November 23, 2026 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:e2e Run the dashboard end-to-end tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant