Skip to content

Comments

🐛 Fixed invisible comments filter dropdown in Safari#26484

Open
kevinansfield wants to merge 1 commit intomainfrom
fix/safari-filter-positioning
Open

🐛 Fixed invisible comments filter dropdown in Safari#26484
kevinansfield wants to merge 1 commit intomainfrom
fix/safari-filter-positioning

Conversation

@kevinansfield
Copy link
Member

fixes https://linear.app/ghost/issue/BER-3153/

  • Wrapped shade PopoverContent in PopoverPrimitive.Portal to fix filter popover positioning in Safari
  • Without a Portal, Safari resolved the offset parent differently from Chrome, causing the popover's translateX to be off by exactly the sidebar width (300px), pushing it off-screen
  • Matches the Portal pattern already used by SelectContent and HoverCardContent in shade, and the standard shadcn/ui popover implementation

fixes https://linear.app/ghost/issue/BER-3153/

Safari resolved the popover's offset parent differently from Chrome,
causing the translateX to be off by the sidebar width (300px). Wrapping
PopoverContent in a Portal renders it to document.body, matching the
pattern already used by SelectContent and HoverCardContent in shade.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 18, 2026

Walkthrough

The Popover component in apps/shade/src/components/ui/popover.tsx was refactored to wrap its content rendering. Previously, PopoverPrimitive.Content was rendered directly; now it is wrapped inside a Portal and an additional wrapper div using SHADE_APP_NAMESPACES. The className composition continues to use cn(...) logic with an updated origin utility class. The public API remains unchanged, with no modifications to props, refs, or event handling beyond this structural change. The modification adds 15 lines and removes 10 lines.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly relates to the changeset, explaining the Safari positioning issue, the Portal wrapper solution, and how it aligns with existing patterns.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title mentions fixing a Safari-specific issue with a filter dropdown/popover, which matches the PR's actual objective of fixing popover positioning in Safari.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/safari-filter-positioning

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@kevinansfield kevinansfield changed the title Fixed filter popover positioning in Safari 🐛 Fixed invisible filter dropdown in Safari Feb 18, 2026
@kevinansfield kevinansfield changed the title 🐛 Fixed invisible filter dropdown in Safari 🐛 Fixed invisible comments filter dropdown in Safari Feb 19, 2026
Copy link
Contributor

@weylandswart weylandswart left a comment

Choose a reason for hiding this comment

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

Sorry for taking so long with the review. Tested and all looks good to me!

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