Skip to content

Conversation

matthewlipski
Copy link
Collaborator

Summary

This PR makes a few changes to the emoji picker, mostly related to overflow handling. A few minor styling changes have also been made for the comments & thread examples.

Closes #2053

Rationale

To deal with longer threads, consumers may set a may height on them and make them scrollable. In this case, the emoji picker gets cut off, leading to bad UX.

Changes

The Mantine popover component now gets auto-sized based on the available space. Most UI elements that use this component are small and don't really need it, but it's useful for the emoji picker which can overflow more often (especially on the small website example boxes).

The popover for the emoji picker now also gets rendered in a portal which attaches it to the editor element (.bn-container). To ensure it remains on top, the z-index of popover components has been increased. This shouldn't have much of an effect outside the emoji picker. The emoji picker in the threads sidebar also still works as expected with these changes.

Finally, the logic for keeping the action toolbar open while picking emojis has been updated to work with the portal.

Impact

Z-index of popovers has been increased, but this shouldn't have a noticable impact on other elements that use popovers like the create link button of replace file button.

Testing

N/A

Screenshots/Video

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

Copy link

vercel bot commented Oct 10, 2025

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

Project Deployment Preview Updated (UTC)
blocknote Ready Ready Preview Oct 10, 2025 0:19am
blocknote-website Ready Ready Preview Oct 10, 2025 0:19am

Copy link

pkg-pr-new bot commented Oct 10, 2025

Open in StackBlitz

@blocknote/ariakit

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

@blocknote/code-block

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

@blocknote/core

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

@blocknote/mantine

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

@blocknote/react

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

@blocknote/server-util

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

@blocknote/shadcn

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

@blocknote/xl-ai

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

@blocknote/xl-docx-exporter

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

@blocknote/xl-email-exporter

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

@blocknote/xl-multi-column

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

@blocknote/xl-odt-exporter

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

@blocknote/xl-pdf-exporter

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

commit: d7fa0c7

withinPortal={false}
opened={opened}
position={position}
zIndex={10000}
Copy link
Contributor

Choose a reason for hiding this comment

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

I prefer more reasonable values for z-index, but I've not seen what this is compared to

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Each of the UI elements is a multiple of 1000 (1000 for side menu, 3000 for formatting toolbar, etc), so this is continuing that pattern.

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.

Comments: EmojiPicker clipped in the Thread modal

2 participants