fix: fix profile preview positioning in search dropdown (#1240)#1244
Merged
Conversation
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.
Fixes #1240
What this PR does:
This PR fixes a UI bug where profile previews were breaking the layout of the search results dropdown. Previously, hovering over a user in the search list would inject the preview inside the dropdown, causing it to expand or shift other elements.
Changes:
Forced Overlay Mode: Prevented isSticky logic from triggering for search results, ensuring the preview is always appended to document.body instead of being injected as a sibling.
Fixed Positioning: Re-calculated the top and left coordinates relative to the #search-input rather than the individual list item. This ensures the preview remains at a consistent height and doesn't "jump" while scrolling/hovering through the list.
Left-Side Alignment: Positioned the preview to the left of the search dropdown to avoid overlapping with the results and to handle limited screen space on the right side.
Z-Index Correction: Increased the stacking order to ensure the preview floats above all other navbar elements.
Screenshots:
Before:

After:
