-
-
Notifications
You must be signed in to change notification settings - Fork 622
fix: Emoji picker issues #2092
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix: Emoji picker issues #2092
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
@blocknote/ariakit
@blocknote/code-block
@blocknote/core
@blocknote/mantine
@blocknote/react
@blocknote/server-util
@blocknote/shadcn
@blocknote/xl-ai
@blocknote/xl-docx-exporter
@blocknote/xl-email-exporter
@blocknote/xl-multi-column
@blocknote/xl-odt-exporter
@blocknote/xl-pdf-exporter
commit: |
withinPortal={false} | ||
opened={opened} | ||
position={position} | ||
zIndex={10000} |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
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
Additional Notes