Skip to content

fix(react): flip the suggestion menu above earlier - #3198

Merged
YousefED merged 1 commit into
mainfrom
fix/slash-menu-flip-earlier
Oct 14, 2026
Merged

YousefED merged 1 commit into
mainfrom
fix/slash-menu-flip-earlier

Conversation

@YousefED

@YousefED YousefED commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

The suggestion menu now goes above its trigger when there is less than 300px of room below (about five items), instead of 200px. With 200px, a menu just above that threshold stayed below and showed only three or four items, even with plenty of room above. A new placement test covers this case.

Summary by CodeRabbit

  • Bug Fixes
    • Suggestion menus now move above the trigger when there’s limited space below and more room above, helping ensure more menu items remain visible.

@vercel

vercel Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
blocknote Ready Ready Preview Oct 14, 2026 10:15am UTC
blocknote-website Ready Ready Preview Oct 14, 2026 10:15am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f109a05f-ef85-4ee1-b9fb-3204b10b5943
📥 Commits

Reviewing files that changed from the base of the PR and between 9c4a000 and ed61f76.

📒 Files selected for processing: 2
  • packages/react/src/components/SuggestionMenu/suggestionMenuMiddleware.ts
  • tests/src/end-to-end/slashmenu/suggestionMenuPlacement.test.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

📝 Walkthrough

The suggestion menu’s minimum placement threshold increases from 200px to 300px. The placement tests now check that the menu stays below with about 380px of space and moves above with about 250px.

Changes: Suggestion menu placement

Layer / File(s) Summary
Placement threshold and test coverage
packages/react/src/components/SuggestionMenu/suggestionMenuMiddleware.ts, tests/src/end-to-end/slashmenu/suggestionMenuPlacement.test.tsx
The minimum height threshold increases to 300px. Tests check below placement with about 380px of space and above placement with about 250px.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to ed61f

The menu placement change and its tests show no identified merge-blocking risk.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description explains the threshold change and mentions the added placement test, but it omits most required template sections, including Impact, Testing details, Screenshots/Video, Checklist, and … Expand the description to follow the repository template. Add the required sections and provide testing details, impact analysis, checklist status, and any applicable screenshots or additional notes.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: the suggestion menu flips above the trigger earlier.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the threshold change and mentions the added placement test, but it omits most required template sections, including Impact, Testing details, Screenshots/Video, Checklist, and Additional Notes.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

A rabbit checks the menu’s space,
Three hundred pixels set the pace.
With room below, it stays in sight,
With less, it hops above just right.
The tests confirm each measured place.

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

@pkg-pr-new

pkg-pr-new Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@blocknote/ariakit

npm i https://pkg.pr.new/@blocknote/ariakit@3198

@blocknote/code-block

npm i https://pkg.pr.new/@blocknote/code-block@3198

@blocknote/core

npm i https://pkg.pr.new/@blocknote/core@3198

@blocknote/diagram-block

npm i https://pkg.pr.new/@blocknote/diagram-block@3198

@blocknote/mantine

npm i https://pkg.pr.new/@blocknote/mantine@3198

@blocknote/math-block

npm i https://pkg.pr.new/@blocknote/math-block@3198

@blocknote/react

npm i https://pkg.pr.new/@blocknote/react@3198

@blocknote/server-util

npm i https://pkg.pr.new/@blocknote/server-util@3198

@blocknote/shadcn

npm i https://pkg.pr.new/@blocknote/shadcn@3198

@blocknote/xl-ai

npm i https://pkg.pr.new/@blocknote/xl-ai@3198

@blocknote/xl-docx-exporter

npm i https://pkg.pr.new/@blocknote/xl-docx-exporter@3198

@blocknote/xl-email-exporter

npm i https://pkg.pr.new/@blocknote/xl-email-exporter@3198

@blocknote/xl-multi-column

npm i https://pkg.pr.new/@blocknote/xl-multi-column@3198

@blocknote/xl-odt-exporter

npm i https://pkg.pr.new/@blocknote/xl-odt-exporter@3198

@blocknote/xl-pdf-exporter

npm i https://pkg.pr.new/@blocknote/xl-pdf-exporter@3198

@blocknote/xl-typst-exporter

npm i https://pkg.pr.new/@blocknote/xl-typst-exporter@3198

commit: ed61f76

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-10-14 10:23 UTC

@YousefED
YousefED merged commit 62c6807 into main Oct 14, 2026
37 checks passed
@YousefED
YousefED deleted the fix/slash-menu-flip-earlier branch October 14, 2026 10:23

This branch was successfully deployed

2 active deployments
Preview – blocknote-website — ed61f761 Deployed Oct 14, 2026 by vercel[bot]
Preview – blocknote — ed61f761 Deployed Oct 14, 2026 by vercel[bot]
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.

1 participant