Skip to content

Conversation

@matthewlipski
Copy link
Collaborator

Summary

This PR fixes an issue where if the suggestion menu was displayed above the trigger character (when there was not enough space to display it below), and only showed a few items, there would be a large gap between the menu and trigger character. This was because the suggestion menu had a hard-coded minimum height, which wasn't filled when displaying a small number of items.

Also, the positioning has generally been improved to better take advantage of the available screen space.

Rationale

This issue has made the suggestion menu feel janky in some situations.

Changes

  • Removed minimum height being set in SuggestionMenuController Floating UI options size middleware.
  • Replaced flip middleware with autoPlacement. The difference is that autoPlacement always displays the menu on the side that has more space, whereas flip only changes the side when there is not enough available space for the menu.

Impact

N/A

Testing

Updated Notion UI testing doc.

Screenshots/Video

N/A

Checklist

  • Code follows the project's coding standards.
  • Unit tests covering the new feature have been added.
  • All existing tests pass.
  • The documentation has been updated to reflect the new feature

Additional Notes

@vercel
Copy link

vercel bot commented Dec 4, 2025

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

Project Deployment Preview Updated (UTC)
blocknote Ready Ready Preview Dec 4, 2025 5:15pm
blocknote-website Ready Ready Preview Dec 4, 2025 5:15pm

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 4, 2025

Open in StackBlitz

@blocknote/ariakit

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/ariakit@2232

@blocknote/code-block

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/code-block@2232

@blocknote/core

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/core@2232

@blocknote/mantine

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/mantine@2232

@blocknote/react

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/react@2232

@blocknote/server-util

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/server-util@2232

@blocknote/shadcn

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/shadcn@2232

@blocknote/xl-ai

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-ai@2232

@blocknote/xl-docx-exporter

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-docx-exporter@2232

@blocknote/xl-email-exporter

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-email-exporter@2232

@blocknote/xl-multi-column

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-multi-column@2232

@blocknote/xl-odt-exporter

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-odt-exporter@2232

@blocknote/xl-pdf-exporter

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-pdf-exporter@2232

commit: e2d8ffd

Object.assign(elements.floating.style, {
maxHeight: `${availableHeight - 10}px`,
});
apply(p) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about this, maybe @nperez0111 can double check when he's back

@YousefED YousefED requested a review from nperez0111 December 5, 2025 21:11
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.

3 participants