Skip to content

fix(ui): update landing/welcome page - #230

Open
v7ncentng wants to merge 3 commits into
benevolentbandwidth:mainfrom
v7ncentng:landing-touchups
Open

fix(ui): update landing/welcome page#230
v7ncentng wants to merge 3 commits into
benevolentbandwidth:mainfrom
v7ncentng:landing-touchups

Conversation

@v7ncentng

Copy link
Copy Markdown
Contributor

Summary

  • Replaced the native OS dropdown (mac/windows default <select> styling) in the CSV import "Map columns" step with a custom-built, fully themed listbox component that matches the rest of the app's design.
  • Enlarged the "Import from CSV" modal so the column-mapping and row-review steps use most of the viewport height instead of shrinking to content, while leaving the initial file-picker step unchanged.
  • Fixed usability bugs in the new dropdown: it can now be scrolled with the trackpad and navigated with arrow keys without closing unexpectedly, and it repositions itself to stay on-screen instead of rendering options unreachably off the bottom of the viewport.

Motivation

  • The column-mapping dropdowns in the CSV importer were plain native <select> elements, so they rendered with the OS's default styling (system font, native borders/colors) instead of matching the app's design system used everywhere else in the popup.
  • Once the modal was made taller, the dropdown menu (positioned via position: fixed) could open partially or fully below the visible viewport for rows near the bottom of the table, making the "Notes" option impossible to reach — a real workflow blocker when mapping the last column.
  • The stopgap fix for reachability surfaced two more interaction bugs: scrolling inside the dropdown's own list would immediately close it (a capture-phase scroll listener wasn't distinguishing internal vs. external scroll), and arrow keys did nothing because keyboard navigation had never been implemented for the custom listbox.

Changes

  • src/app/edit/components/address/CSVUploadOverlay.tsx
    • Replaced the native <select> in StepColumnMapper with a new MappingFieldSelect component: a button styled with the same OVERLAY_SELECT_WRAPPER/VALUE/ICON tokens used by other "Select" boxes in the app, plus a custom role="listbox" menu built from OVERLAY_AUTOCOMPLETE_* tokens.
    • Added viewport-aware positioning: the menu measures available space above/below its trigger and flips upward with a clamped maxHeight when there isn't enough room below, so it never renders outside the visible viewport.
    • Added full keyboard support (ArrowUp/ArrowDown to move an activeIndex highlight, Enter/Space to commit, Escape to close), synced with mouse hover, and auto-scrolls the highlighted option into view.
    • Fixed the outside-scroll-closes-menu listener to ignore scroll events that originate inside the dropdown's own list (previously any scroll, including internal, closed the menu instantly).
    • Increased the CSV-column value text from 14px to 16px/leading-6 to match the dropdown's text size, and switched the modal panel to a taller CSV_UPLOAD_OVERLAY_PANEL_TALL variant (90dvh) for the mapping and row-review steps only.
    • Ensured every mapping row has a bottom border, including the last ("Notes") row.
  • src/app/edit/formStyles.v2.ts
    • Added CSV_UPLOAD_OVERLAY_PANEL_TALL (90dvh variant of the existing panel) and propagated flex-1 min-h-0 through the inner/content/top wrapper tokens so the taller panel's scrollable regions correctly fill the available height instead of leaving empty space.
    • Added a CSV-scoped CSV_UPLOAD_SELECT_PLACEHOLDER token (--edit-stone-600) so the "Select" placeholder text is darker than the app-wide default, without changing the shared OVERLAY_SELECT_PLACEHOLDER token used by other overlays (VehicleDetailsOverlay, AddressOverlay).

Validation

Frontend

  • npm --prefix app/ui run lint
  • npm --prefix app/ui run format:check
  • npm --prefix app/ui run typecheck (ran as npx tsc --noEmit -p ., clean)
  • npm --prefix app/ui run test
  • npm --prefix app/ui run build
  • npm --prefix app/mobile run lint
  • npm --prefix app/mobile run typecheck

Backend

  • Not applicable — frontend-only change.

Note: No live browser verification was performed — the Chrome automation extension was not connected in this environment. Manual QA in a real browser (especially scrolling/arrow-keying to the "Notes" option, and confirming the dropdown flips correctly near the bottom of the modal) is recommended before merge.

Risk

  • Low risk, scoped to a single modal (CSVUploadOverlay.tsx) and its dedicated style tokens; no shared components were changed except additive tokens in formStyles.v2.ts.
  • The custom dropdown reimplements keyboard/focus/ARIA behavior that native <select> provided for free — worth a manual accessibility pass (screen reader, tab order) since this isn't covered by typecheck/lint.

Rollout and Recovery

  • Standard PR merge; no feature flag, migration, or data changes involved.
  • Rollback is a plain revert of this PR — no persisted state or schema changes to unwind.

@v7ncentng v7ncentng mentioned this pull request Jul 19, 2026
5 tasks
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.

1 participant