Repository navigation
Conversation
Flip the dropdown above the caret line when there isn't room below and cap its max-height to the available space, so all rows stay reachable. Recompute the position on scroll (capture) and resize while open so it tracks the caret when the editor pane scrolls. Closes #294
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one): 1
Please check the settings in the CodeRabbit UI or the
|
vprashrex
force-pushed
the
fix/mention-dropdown-positioning
branch
from
October 25, 2026 06:46
e902b3a to
ba5096d
Compare
2 of 4 tasks
This branch has not been deployed
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.
Issue
Closes #294
Summary
@mention dropdown in the Assessment editor.bottompositioning when flipped for easier rendering.maxHeightto available space, capped at 208px, ensuring scrollability.scrollandresizeevents.Checklist
Before submitting a pull request, please ensure that you mark these task.
npm run devandnpm run buildin the repository root and test.Original PR description
Issue
Closes #294
Summary
Fixes two positioning bugs in the
@mention dropdown in the Assessment editor (app/components/assessment/editor/MentionDropdown.tsx). The change is limited to this one file: no new dependencies, and the caret math inuseAtMention.tsis untouched.1. Dropdown cut off at the bottom of the viewport
viewportPosition()now checks vertical space, using the same flip approach asapp/components/ui/MultiSelect.tsx. If there are at least 208px below the caret, or more room below than above, the dropdown opens below. Otherwise it flips above the caret line.bottominstead oftop, so its rendered height doesn't need to be measured.maxHeightis set to the space available on the chosen side (capped at 208px) and replaces themax-h-52class. The list stays fully scrollable in both positions.2. Dropdown drifts away from the caret when scrolling
scroll(withcapture: true, so the inneroverflow-y-autoeditor pane is included) andresizelisteners re-runviewportPosition(). The listeners are removed when the dropdown closes.Checklist
npm run devandnpm run buildin the repository root and test.Notes
tsc --noEmit, ESLint and Prettier pass. Not yet verified in the browser:/assessmentrequires a logged-in session and theASSESSMENTfeature flag. Reviewer, please check:@near the bottom of the window. The dropdown should stay fully visible (flipping up if needed) and every row should be reachable by scrolling.CARET_LINE_OFFSET_PX = 26is the editor'sleading-5line height (20px) plus the 6px offset added incomputeCaretPos. It is used to place the flipped dropdown above the caret line. If the editor's line height changes, this constant must change too.🤖 Generated with Claude Code