Skip to content

Fix invisible dark-mode text in shared modal components - #234

Merged
morcen merged 1 commit into
mainfrom
fix/issue-149-dark-mode-modal-text
Sep 24, 2026
Merged

morcen merged 1 commit into
mainfrom
fix/issue-149-dark-mode-modal-text

Conversation

@morcen

@morcen morcen commented Sep 23, 2026 •

Copy link
Copy Markdown
Owner

What was broken

The shared modal components (Modal.vue, DialogModal.vue, ConfirmationModal.vue) hardcoded a bg-white panel background and text-gray-900 / text-gray-600 text colors with no dark: variants. This app uses Tailwind's default media-based dark mode strategy (no in-app toggle, no darkMode key in tailwind.config.js), so dark styling activates automatically from the OS's prefers-color-scheme: dark.

For any visitor with OS dark mode enabled, the modal panel stayed white-on-white... actually stayed white, but the surrounding page went dark, while the title/content text stayed near-black (text-gray-900) — in practice this reads as unreadable/very low contrast once other on-page elements correctly switch to their dark variants. This affected every consumer of these shared components app-wide: Delivery Details, API Token, Event trigger, and all delete/confirmation modals (Profile forms, Teams, Endpoints, Events, Deliveries pages).

What changed

Added dark: variants consistent with the conventions already used elsewhere in the app:

  • Modal.vue: panel wrapper bg-white → bg-white dark:bg-gray-800
  • DialogModal.vue: title/content text gets dark:text-white / dark:text-gray-400; footer bg-gray-100 → bg-gray-100 dark:bg-gray-700
  • ConfirmationModal.vue: same background/text treatment, plus its icon circle (bg-red-100/text-red-600) gets matching dark: variants

Testing

  • vendor/bin/pint --dirty — pass (no PHP files changed)
  • npm run build — builds cleanly
  • composer test (full PHPUnit suite) — 274 passed, 1 skipped, 0 failed; no regressions

This is a CSS-only Vue template change with no backend behavior affected, so no new PHPUnit test was added — the repo has no JS unit-test runner (Vitest/Jest) configured, and the existing Playwright e2e suite is not wired into CI (tracked separately in #95). The full PHPUnit suite was run to confirm no backend regressions.

Fixes #149

DialogModal, ConfirmationModal, and the underlying Modal.vue panel
hardcoded bg-white with no dark: variant, and their title/content text
used text-gray-900/text-gray-600 with no dark: variants either. Since
Tailwind's dark mode here follows the OS prefers-color-scheme media
query with no in-app toggle, any visitor with OS dark mode enabled saw
near-black text on a white panel that itself never adapted, rendering
these modals effectively illegible. This affected every consumer
app-wide: Delivery Details, API Token, Event trigger, and all
delete/confirmation modals.

Bring the panel background and text colors in line with the dark:
variants already used elsewhere in the app (dark:bg-gray-800,
dark:text-white, dark:text-gray-400, dark:bg-gray-700 for footers).
@morcen
morcen merged commit ab1ca02 into main Sep 24, 2026
2 checks passed
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.

Shared DialogModal/ConfirmationModal has no dark-mode background, causing invisible white-on-white text app-wide

1 participant