Repository navigation
fix(ui): theme date and time pickers in dark mode - #1583
Merged
Merged
Conversation
…hemed-date-time-inputs.test.ts and tests/ui-regressions-621-623-626.test.ts with rendered markup and executable checks for ScheduledOrdersDrawer (reschedule mode), ExpensesPage, DashboardPage (day/month/range), WhatsAppPage (automation tab), and openTemporalPicker. Focused test commands (npm run test:themed-date-time-inputs && npm run test:ui-regressions-621-623-626) could not execute because ts-node is not on PATH and node_modules is absent in this isolated worktree
… to grant dashboard.view on useAuthStore.currentTenant before rendering DashboardPage and restore prior auth state in finally. Focused verification (npm run test:ui-regressions-621-623-626 && npm run test:themed-date-time-inputs) was blocked because ts-node is unavailable without node_modules in this isolated worktree
… tests/ui-regressions-621-623-626.test.ts so renderWithIntl(React.createElement(Runner)) executes and assigns tree before returning { tree, html }. Focused test execution (npm run test:ui-regressions-621-623-626) remains blocked in this isolated worktree because ts-node is not on PATH and node_modules is not installed
…om DatePickerInput in frontend/src/components/ui/date-picker-input.tsx and kept className="relative" directly on the wrapper div. Focused test execution (npm run test:themed-date-time-inputs) could not run because ts-node is unavailable without node_modules in this isolated worktree
|
ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
Contributor
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
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.
Fixes #1576
Intent
In dark mode, calendar and date/time icons on fields such as Expenses (date filter inputs and the Expense form date field) and other screens across the POS and management pages still appear black, and clicking them opens a native date/time picker with a white background. Using the Dashboard page's custom dark-aware calendar input implementation as the reference pattern, audit every place where calendar/date/time inputs are used across the POS and all other screens and apply the dark-mode theme fix consistently so both the icons and opened pickers match the active Light/Dark theme.
What Changed
DatePickerInputcomponent andopenTemporalPickerhelper infrontend/src/components/ui/date-picker-input.tsxthat hides the native WebKit picker indicator, sets[color-scheme:light] dark:[color-scheme:dark], and renders an accessibleCalendarDaysorClocktrigger button invokingshowPicker()with afocus()fallback.@layer baseinfrontend/src/app/globals.cssto applycolor-scheme: lightand.darkcolor-scheme: darktodate,datetime-local,month,week, andtimeinputs, and replaced native temporal inputs withDatePickerInputacross the dashboard, expenses, WhatsApp automation, cash close/movement modals, and POS order/scheduled-order drawers.tests/themed-date-time-inputs.test.ts(wired intopackage.json), updatedtests/ui-regressions-621-623-626.test.tsfor the shared picker component, and added Playwright coverage infrontend/e2e/dark-calendar-inputs.spec.ts.Risk Assessment
✅ Low: The change extracts the existing Dashboard custom dark-aware temporal input pattern into a shared DatePickerInput component, applies light/dark color-scheme rules across all 5 HTML temporal input types in globals.css, updates all 8 temporal input call sites consistently across POS and dashboard pages, and adds executable component and Playwright E2E coverage with no functional regressions or unrequired complexity.
Testing
Built backend and static desktop frontend, ran focused Node regression suites (
test:themed-date-time-inputsandtest:ui-regressions-621-623-626), drove all 4 Playwright Chromium scenarios infrontend/e2e/dark-calendar-inputs.spec.tsplusfrontend/e2e/expenses.spec.tsand Electrontheme.electron.spec.ts, verified unmocked nativeshowPicker()keyboard interaction, expense creation persistence, and Arabic RTL dark layout, and captured 14 screenshots under~/.no-mistakes/evidence/01M7F39RN453WYVTCV1FAD83FY, with every driven check passing.Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
npm run test:themed-date-time-inputsnpm run test:ui-regressions-621-623-626npx --prefix frontend playwright test --config=frontend/playwright.config.ts --project=chromium frontend/e2e/dark-calendar-inputs.spec.tsnpx --prefix frontend playwright test --config=frontend/playwright.config.ts --project=chromium frontend/e2e/expenses.spec.tsnpx --prefix frontend playwright test --config=frontend/playwright.electron.config.ts --project=electron-desktop frontend/e2e/desktop/theme.electron.spec.tsLive Chromium verification of unmocked nativeshowPicker()keyboard date selection,Add expenseDB persistence, and Arabic RTL dark-mode layout on/expenses✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.