Skip to content

refactor(ui): #150 remove DaisyUI v4 dead classes, adopt v5 names#151

Merged
TortoiseWolfe merged 2 commits into
mainfrom
refactor/daisyui-v5-class-drift-150
Jun 24, 2026
Merged

refactor(ui): #150 remove DaisyUI v4 dead classes, adopt v5 names#151
TortoiseWolfe merged 2 commits into
mainfrom
refactor/daisyui-v5-class-drift-150

Conversation

@TortoiseWolfe

Copy link
Copy Markdown
Owner

Closes #150.

What

DaisyUI beta (5.0.0-beta.9) renamed or removed several v4 class names that components still carried. This removes the dead ones and adopts the v5 names. 32 files.

Verified against the compiled app CSS that the removed classes emit zero rules in v5 (so removal is provably visually neutral), and that the rename targets exist.

Changes

Renames (classes that have CSS):

  • card-borderedcard-border
  • card-compactcard-sm
  • Also updates the custom .card-bordered accessibility rule in src/styles/colorblind-patterns.css.card-border, so colorblind-mode bordered cards keep their 2px border.

Dead-class removals (0 CSS rules in v5):

  • input-bordered / textarea-bordered / select-bordered — the base .input / .textarea / .select are bordered by default in v5. One ValidatedInput usage that carried only input-bordered (no base class) is fixed by dropping it — the component supplies .input itself.
  • form-control wrappers and label-text / label-text-alt spans — kept the div/label/span structure and the real Tailwind utilities on them (text-error, text-warning, font-medium, spacing). Empty className="" left behind by the strip were removed.

Verification

  • type-check, ✅ lint, ✅ build (clean)
  • ✅ 24 Card tests (assert card-sm/card-border) + 125 form/molecular/auth tests pass
  • ✅ Sign-in form render-checked in Chromium — inputs still bordered (base .input), labels intact, no layout shift

Why this was safe

The bulk of the removals were no-op classes — DaisyUI v5 emits no CSS for them, so the layouts already relied entirely on base classes + Tailwind utilities. The screenshot confirms the rendered result is unchanged.

🤖 Generated with Claude Code

TurtleWolfe and others added 2 commits June 24, 2026 00:41
DaisyUI 5.0.0-beta.9 renamed/removed several v4 classes the components
still carried. Verified against the compiled CSS that the removed classes
emit zero rules in v5 (so removal is visually neutral) and that the renames
map to existing v5 classes.

- card-bordered -> card-border, card-compact -> card-sm (renames). Also
  updates the custom .card-bordered a11y rule in colorblind-patterns.css so
  colorblind-mode bordered cards keep their 2px border.
- Remove dead input-bordered / textarea-bordered / select-bordered (the base
  .input/.textarea/.select are bordered by default in v5). One ValidatedInput
  usage that had only input-bordered (no base) is fixed by dropping the dead
  class — the component supplies .input itself.
- Remove dead form-control wrappers and label-text / label-text-alt spans;
  kept the div/label/span structure and real Tailwind utilities (text-error,
  text-warning, font-medium, spacing). Empty className="" left behind by the
  strip were removed.

32 files. Gates: type-check, lint, build clean; 24 Card tests + 125
form/molecular tests pass; sign-in form render-checked (inputs still
bordered, labels intact).

Closes #150

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The class strip in the previous commit broke E2E selectors that keyed on
removed DaisyUI v4 classes:

- form-submission.spec.ts: required-indicator selector was
  `.label-text-alt.text-error` → 0 matches after label-text-alt removal.
  Now matches `label.label span.text-error` filtered by the "*" text
  (verified 4 matches in the SSG'd contact HTML; error-message spans use
  role=alert and don't contain "*").
- ComponentsPage.ts: formControl/formHelp page-object selectors updated off
  the removed .form-control / .label-text-alt (unused today, kept accurate).
- mobile-form-inputs.spec.ts: form-group selector retargeted to
  fieldset/label wrappers instead of .form-control.

Root cause of the chromium-gen 5/6 failure on this branch; no app behavior
change — selectors only.

Refs #150

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@TortoiseWolfe TortoiseWolfe merged commit 260ee29 into main Jun 24, 2026
18 checks passed
@TortoiseWolfe TortoiseWolfe deleted the refactor/daisyui-v5-class-drift-150 branch June 24, 2026 02:05
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.

Clean up DaisyUI v4 → v5 class drift (dead classes across ~29 files)

2 participants