YPE-2257 - Add Bible version picker composition APIs for later use in Expo DOM#228
Open
cameronapak wants to merge 3 commits intomainfrom
Open
YPE-2257 - Add Bible version picker composition APIs for later use in Expo DOM#228cameronapak wants to merge 3 commits intomainfrom
cameronapak wants to merge 3 commits intomainfrom
Conversation
🦋 Changeset detectedLatest commit: 6123478 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
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 |
60aa5b3 to
736cee7
Compare
736cee7 to
56aac3e
Compare
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.
https://lifechurch.atlassian.net/browse/YPE-2257
CleanShot.2026-05-06.at.13.43.54.mp4
Summary
Adds advanced composition surfaces for the Bible version picker so the React Native Expo SDK can reuse Web SDK picker content inside Expo DOM/native presentation.
Changes
BibleVersionPicker.RootvialanguageId,defaultLanguageId, andonLanguageChange.BibleVersionPickerLanguageTriggerfor reusable Web SDK language trigger UI.BibleLanguagePickerContentas body-only language picker content for SDK/native sheet composition.openhandling to picker content so pre-warmed DOM surfaces can clear transient search state on close.Validation
pnpm --filter @youversion/platform-react-ui test -- bible-version-pickerpnpm --filter @youversion/platform-react-ui test -- bible-chapter-pickerpnpm --filter @youversion/platform-react-ui typecheckpnpm --filter @youversion/platform-react-ui buildGreptile Summary
This PR adds composition surfaces for the Bible version picker so Expo DOM/native sheets can reuse the existing Web SDK picker UI. It introduces controlled language state,
BibleVersionPickerLanguageTrigger, andBibleLanguagePickerContentas standalone exported components, and refactorsContentto serve both popover and standalone scenarios via a runtime branch.useControllableStateonRoot, withlanguageId,defaultLanguageId, andonLanguageChangeprops;onVersionPickerPressbypasses thePopoverwrapper so Expo can open a native sheet instead.BibleVersionPickerLanguageTriggerandBibleLanguagePickerContentare extracted fromContentinto individually exportable components, each reading shared state from context.Contentrefactor adds anopenprop for pre-warmed DOM reset and splits into popover vs. standalone render paths based on whetheronVersionPickerPress,open, oronRequestCloseare present.Confidence Score: 5/5
Safe to merge; all changes are additive composition APIs with good test coverage, and the one visual regression is minor and easily patched.
The refactor is well-scoped: new exports are additive, the Root branching logic is straightforward, and controlled state is handled by the existing useControllableState primitive. The only concrete defect found — missing transition classes on the popover-mode animation wrappers — causes panels to snap rather than blend but has no effect on correctness or state management.
The animation wrapper divs inside the popover branch of Content in bible-version-picker.tsx are missing transition-all duration-300.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD Root["BibleVersionPicker.Root\n(versionId, languageId, onVersionPickerPress, ...)"] Root -->|onVersionPickerPress set| CtxOnly["Context.Provider\n(no Popover wrapper)"] Root -->|no onVersionPickerPress| PopoverWrap["Context.Provider\n+ Popover wrapper"] CtxOnly --> Trigger["BibleVersionPicker.Trigger\n→ calls onVersionPickerPress on click"] CtxOnly --> LangTrigger["BibleVersionPickerLanguageTrigger\n→ sets isLanguagesOpen via context"] CtxOnly --> StandaloneContent["BibleVersionPicker.Content\n(open, onRequestClose)\n→ standalone div"] CtxOnly --> LangContent["BibleLanguagePickerContent\n(open, onRequestClose)\n→ standalone div"] PopoverWrap --> PopoverTrigger["BibleVersionPicker.Trigger\n→ PopoverTrigger"] PopoverWrap --> PopoverContent["BibleVersionPicker.Content\n(no props)\n→ PopoverContent\n ├─ Content (onRequestClose)\n └─ LanguagePanel (onRequestClose)"]Comments Outside Diff (1)
packages/ui/src/components/bible-version-picker.tsx, line 853-870 (link)BibleLanguagePickerContentdoes not reset its tab state whenopentransitions tofalseContenthas auseEffectthat callssetSearchQuery('')andsetIsLanguagesOpen(false)whenopenflips tofalse, ensuring pre-warmed surfaces return to a clean state on close.BibleLanguagePickerContentaccepts the sameopenprop but only writes it to adata-openattribute — it has no equivalent cleanup effect. In Expo pre-warmed DOM scenarios, a user who navigated to the "All" tab would see it still selected on reopen.Prompt To Fix With AI
packages/ui/src/components/bible-version-picker.tsx, line 674-681 (link)Contentsearch barThe wrapper
divusesgrid-cols-[1fr_auto]with a gap, but only the<InputGroup>is rendered inside it — theautocolumn is always empty in standalone mode. The[1fr_auto]template collapses harmlessly but is dead CSS.Prompt To Fix With AI
Prompt To Fix All With AI
Reviews (3): Last reviewed commit: "fix(ui): preserve language trigger defau..." | Re-trigger Greptile