Skip to content

feat(ui): language picker v2 card layout - #457

Merged
camrun91 merged 28 commits into
mainfrom
feat/language-picker-v2
Nov 2, 2026
Merged

camrun91 merged 28 commits into
mainfrom
feat/language-picker-v2

Conversation

@camrun91

@camrun91 camrun91 commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Why

Readers need to browse Bible languages and search them in the tablet picker flow. The previous picker mixed those controls and did not match the tablet card dimensions.

What changed

  • Split version browsing, language tabs, and language search into separate views. Add native language names, counts, search pills, and version-row chevrons.
  • Size this picker at 400 by 600 pixels with viewport and available-space caps. Keep standalone content navigation under host control.
  • Preserve the host CSS appearance rule through style rebuilds. Include the existing design plan and reference screenshots.

Scope

  • Tablet popover layout and language navigation.
  • Mobile full-height sheets, downloads, audio controls, and recent-list editing remain follow-ups.
  • The Bible Languages title uses its own key and English fallback, preserving “Select a Language” for selection controls. Other English copy follows localization PR #94 and the normal SDK sync. Bundled locale files are unchanged.

Tradeoffs

Sizing stays local to the picker so other popovers keep their defaults. The version-section count describes its displayed rows and excludes rows already shown under Recent Versions.

Blast Radius

The picker’s public API and shared popover defaults are unchanged. A regression assertion protects standalone content selection and host close callbacks. The language row exposes its visible name and count to screen readers.

Visual comparison

Old (main) · New (this PR) · Figma tablet refs. Captured from Storybook light cards and the saved design frames for node 4966:6915.

Versions

Versions: Old, New, Figma

Languages

Languages: Old, New, Figma

Language search

Language search: Old, New, Figma

Verification

  • Forced workspace build, full tests, lint, typecheck, and i18n parity passed. The UI suite passed all 526 tests.
  • Browser checks passed at 834×1194, 1180×820, 375×812, and 820×400. Both tablet cards measured 400×600.
  • All 15 picker Storybook journeys passed, including four viewport cases. They check accessible counts, global search with English-only region suggestions, back navigation, selection dismissal, viewport caps, and long headings. The standalone verification script is removed.
  • Browser journeys used the existing Vitest Storybook project with a temporary installed-Chrome launch override because the bundled Chromium installation stalled. CI keeps its normal Chromium configuration.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no new actionable issues were found.

Summary

The PR splits version browsing, language tabs, and language search into separate views.

  • The picker separates version, language, and language-search views in a viewport-capped card.
  • The UI package keeps the host appearance rule when CSS is rebuilt or watched.

No new actionable issues were found. Previous threads were checked against the current code; none require a duplicate comment. Tests were not run during this review.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  V[Versions] -->|Language row| L[Language tabs]
  L -->|Search button| S[Language search]
  S -->|Back| L
  L -->|Back or select language| V
  V -->|Select version| C[Close picker]
Loading

Reviews (19) · Last reviewed commit: "test(ui): move edited picker workflows o..." · Reviewed by Greptile

A third screen does not fit in the single 1100-line file. Versions, languages, and rows now live in their own modules so the view change can follow.
A boolean cannot name versions, the language list, and search. Search now has its own screen, the bottom language field is gone, and language screens hide Close.
The header pill was the only way into languages, and search sat under the list. The versions screen now starts with search and a full-width language row, and the pill stays available for hosts that render it themselves.
Language rows led with the English name and pinned the native name to the far end. The native name is now first, English follows only when it differs, and the Suggested and All pills use a high-contrast active state.
The old tests clicked a header pill and typed into a field that stayed mounted. They now follow the language row into search, and the changeset marks the card change as minor.
Stop flaky verify failures during pnpm dev:web by re-applying
preserve-host-revert-layer before style checks and watching CSS
outputs so Tailwind rewrites cannot drop -webkit-appearance:revert-layer.
@changeset-bot

changeset-bot Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 2a104c0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@youversion/platform-react-ui Minor
vite-react Patch
@youversion/platform-core Minor
@youversion/platform-react-hooks Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Comment thread packages/ui/scripts/verify-styles.js Resolved
@camrun91

Copy link
Copy Markdown
Collaborator Author

Addressed the four Greptile review threads:

  1. P1 Story Korean assertion — expect /한국어/ (native primary on LanguageEntry)
  2. P2 Focus jumps — instance refs (+ popover-scoped fallback) instead of document.querySelector
  3. P2 verify-styles — re-run write-public-styles after preserve; assert -webkit-appearance:revert-layer in styles.css and bundled JS
  4. P2 Nested describes — flattened describe('language search') under the single top-level describe('BibleVersionPicker')

Picker unit tests: 29 passed. Style verification passes after build:css.

Comment thread scripts/verify-tablet-picker.mjs Resolved
camrun91 and others added 2 commits October 29, 2026 13:33
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
camrun91 and others added 2 commits October 30, 2026 10:23
Wrap/truncate utilities push brotlied CSS to 9502 B; set the limit to
measured size plus ~10% headroom per CONTRIBUTING.

Co-authored-by: Cursor <cursoragent@cursor.com>
Page-wide querySelector preferred an outer host popover when the picker
was nested. Focus via the picker's PopoverContent ref, and skip for
standalone content that has no card.

Co-authored-by: Cursor <cursoragent@cursor.com>
@camrun91

Copy link
Copy Markdown
Collaborator Author

@visualinventor, tagging you here as a reviewer so you can know when we pull this in. if it gets merged by Monday it should make it in the next release.

camrun91 and others added 2 commits October 30, 2026 10:48
Restore muted shared popover defaults with picker-only header/Close
overrides, remove version-search tabIndex so Tab reaches the field,
and return standalone language search to the tabs after selection.

Co-authored-by: Cursor <cursoragent@cursor.com>
Short Viewport height is limited by --radix-popover-content-available-height,
not only innerHeight - 32. Include that CSS variable in the expected min().

Co-authored-by: Cursor <cursoragent@cursor.com>
New and edited workflows use explicit resetPickerTestEnvironment setup
without inheriting the suite beforeEach, per docs/testing.md.

Co-authored-by: Cursor <cursoragent@cursor.com>
@camrun91
camrun91 requested a review from abharms October 30, 2026 16:21

@abharms abharms left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The functional fixes look good. One test-structure issue remains before approval.

Search/navigation and new label/count/position workflows now call
resetPickerTestEnvironment() directly outside the legacy describe.

Co-authored-by: Cursor <cursoragent@cursor.com>
@camrun91
camrun91 requested a review from abharms November 2, 2026 14:07
@camrun91
camrun91 merged commit b0280a5 into main Nov 2, 2026
21 checks passed
@camrun91
camrun91 deleted the feat/language-picker-v2 branch November 2, 2026 14:53
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.

2 participants