Repository navigation
Conversation
Typing / in a fresh commit draft opened the /feature and /bug menu in the composer's flow, so the actions under it and the rest of the page jumped down, and back up when it closed. The mention, emoji, issue and guild suggestions float over the page instead. The menu now floats the same way: rendered in a portal, fixed under the slash, moved along when the page scrolls or resizes, and opened above it near the bottom of the viewport. In the composer dialog it can go past the dialog's edge rather than being clipped by it. The code that places the field's suggestions moves to lib/suggestion-position so both share it, and the key hints wrap between hints at its narrower width.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Summary
Typing
/in a fresh commit draft opened the/featureand/bugmenu inside the composer, so the composer's actions and the whole page under it jumped down 100px, and back up when it closed. The mention, emoji, issue and guild suggestions float over the page instead. This makes the command menu float the same way, so nothing moves when it opens.The jump grows with the menu: every command added to it pushes the page down further. Several open PRs add some:
/shrugand/tableflipafter/featureand/bug;/image(/img),/polland/code, and moves the commands into the field's own suggestion menu, which floats already: if it lands first, this one has nothing left to fix;/gifonce a GIF provider key is set.With a floating menu, a longer list only takes more room over the page, not in it.
Changes
IssueCommandSuggestionsrenders in a portal, fixed under the slash that starts the draft, with the same popover surface as the field's suggestions. It follows the page when it scrolls or resizes, and opens above the slash near the bottom of the viewport.MentionTextareatolib/suggestion-position.tsassuggestionPositionAt(), used by both.MentionTextareabehaves as before.[data-command-suggestions], so the menu can go past the dialog's edge instead of making it grow.↑↓ select,Tab or Enter pickandEsc dismissrather than inside one.Validation
pest --parallel --coverage --exactly=100.0(full suite)pest --type-coverage --min=100tsc --noEmit(app and tests)vp test(TSX unit tests)node --test tests/Unit/*.test.tsvp fmt --check,vp lintAll local; hosted CI runs once a maintainer approves the workflow.
Visual evidence
Playwright (Chromium) against a local dev server with seeded data, signed in as the local developer, typing
/in an empty draft. Before isproduction(0e09618), after is this branch.Layout shift, measured on the Log at 1440×900 from before typing to the menu being open:
PerformanceObserver)c), 1440 light/draft, 1440 lightDevice verification
Emulation only (390×844, DPR 2, touch) in Chromium: no hardware or simulator. On a phone the menu floats under the slash like the mention suggestions do, over the actions instead of pushing them below the fold.
Independent review
A fresh read-only reviewer, given the guidelines, the diff, the validation results and the captures, checked the move of the placement code, server rendering, the first paint, the dialog's outside-click and Escape handling, the keys and the tests. On base
0e09618a, head2828c49b: CODE: PASS, VISUAL: PASS. Applied inb85795ae, with tests:/draft doesn't leave it where the dialog was while zooming in (checked in the browser: it sits under the slash);·starts the hint after it, so none is left at the end of a line.Limitations
Summary by CodeRabbit