Repository navigation
Conversation
🦋 Changeset detectedLatest commit: bf42d1f 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 |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
| const frame = window.requestAnimationFrame(() => { | ||
| const scope = popoverContentRef.current; | ||
| if (!scope) return; | ||
| if (view === 'languages' && previous === 'versions') { | ||
| scope.querySelector<HTMLElement>('[data-slot="language-back"]')?.focus(); | ||
| return; | ||
| } | ||
| if (view === 'versions') { | ||
| scope.querySelector<HTMLElement>('[data-slot="language-entry"]')?.focus(); |
There was a problem hiding this comment.
Closing the picker from Languages or Search Languages resets view to versions. That schedules this frame while PopoverContent remains mounted for its exit animation. The frame then focuses language-entry inside the closing picker. A user clicking an outside input can lose focus just after the click, and the focused button then disappears.
Skip this work when isPopoverOpen is false and check that the panel is still open inside the callback.
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/ui/src/components/bible-version-picker/index.tsx
Line: 609-617
Comment:
**Closing picker steals focus**
Closing the picker from Languages or Search Languages resets `view` to `versions`. That schedules this frame while `PopoverContent` remains mounted for its exit animation. The frame then focuses `language-entry` inside the closing picker. A user clicking an outside input can lose focus just after the click, and the focused button then disappears.
Skip this work when `isPopoverOpen` is false and check that the panel is still open inside the callback.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.be02975 to
bf42d1f
Compare
|
@greptileai review |
|
Superseded by #472. The replacement starts from the corrected six-file diff and includes the validated retained-exit focus fix, without the stale review history from the earlier oversized branch topology. |
Summary
Verification
The local full Firefox runner is intermittently rendering unrelated stories as Storybook's
No Previewshell. The exact Firefox regression test is deterministic and green; CI remains the authoritative full Firefox run.The new changes have no confirmed issues, but the previous closing-picker focus bug still needs fixing before merging.
Fix with agent prompt
Summary
Updates the Shadow DOM journeys for picker v2.
Browser tests were not rerun because workspace dependencies are not installed.
Reviews (3) · Last reviewed commit: "fix(ui): skip version list viewport in t..." · Reviewed by Greptile