fix: Fix symbol hover popover clipping issue#326
Conversation
WalkthroughA new entry was added to the changelog documenting a fix for the symbol hover popover clipping issue. The symbol hover popup component's positioning logic was updated with additional middleware options, and its JSX rendering was refactored for clarity and consolidation, without altering the component's functional behavior or exports. Changes
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/web/src/ee/features/codeNav/components/symbolHoverPopup/index.tsx (1)
10-10: Remove unused import.The
createPortalimport fromreact-domis not used anywhere in the component.-import { createPortal } from "react-dom";
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
CHANGELOG.md(1 hunks)packages/web/src/ee/features/codeNav/components/symbolHoverPopup/index.tsx(3 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
packages/web/src/ee/features/codeNav/components/symbolHoverPopup/index.tsx (4)
packages/web/src/ee/features/codeNav/components/symbolHoverPopup/symbolDefinitionPreview.tsx (1)
SymbolDefinitionPreview(18-62)packages/web/src/components/ui/separator.tsx (1)
Separator(31-31)packages/web/src/components/ui/loading-button.tsx (1)
LoadingButton(30-30)packages/web/src/components/ui/button.tsx (1)
Button(56-56)
🪛 LanguageTool
CHANGELOG.md
[duplication] ~10-~10: Possible typo: you repeated a word.
Context: ...pec/v2.0.0.html). ## [Unreleased] ### Fixed - Fixed issue with the symbol hover popover cli...
(ENGLISH_WORD_REPEAT_RULE)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build
🔇 Additional comments (3)
packages/web/src/ee/features/codeNav/components/symbolHoverPopup/index.tsx (2)
58-64: Excellent fix for the popover clipping issue!The addition of
boundary: editorRef.view?.domto both theflipandshiftmiddleware, along with thepadding: 20in the flip middleware, effectively addresses the clipping problem by:
- Constraining the popup to stay within the editor boundaries
- Providing adequate padding when flipping the popup position
This implementation correctly uses Floating UI's boundary detection to prevent the popup from extending beyond the editor container.
98-140: JSX formatting improvements enhance readability.The reformatted JSX structure is much cleaner and more maintainable. The conditional rendering logic remains functionally identical while being easier to follow.
CHANGELOG.md (1)
10-12: Changelog entry properly documents the fix.The changelog entry accurately describes the fix for the symbol hover popover clipping issue and includes the appropriate PR reference following the established format.
🧰 Tools
🪛 LanguageTool
[duplication] ~10-~10: Possible typo: you repeated a word.
Context: ...pec/v2.0.0.html). ## [Unreleased] ### Fixed - Fixed issue with the symbol hover popover cli...(ENGLISH_WORD_REPEAT_RULE)
Before:

After:

Summary by CodeRabbit