-
-
Notifications
You must be signed in to change notification settings - Fork 620
feat: Mantine v8 upgrade #2028
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
feat: Mantine v8 upgrade #2028
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: |
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.
Pretty straightforward! Nice
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 think you need to update the .bnblock config file or whatever it is called. So that pnpm run gen doesn't overwrite these changes
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.
Is it not correct as is? In the .bnexample.json
file, I updated the Mantine package version under dependencies
, which pnpm gen
uses to update the dependencies in the corresponding package.json
. Or am I misunderstanding?
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.
Ah maybe I missed it then
@import url("@mantine/core/styles/TypographyStylesProvider.css"); | ||
@import url("@mantine/core/styles/Typography.css"); | ||
|
||
/* Mantine baseline styles, scoped to .bn-mantine element. */ |
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.
are you sure we don't need the other styles from global.css?
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.
Yes, the global.css
file does have some styling for focused elements, but they aren't necessary and in some cases where we use non-Mantine components (like regular divs with FloatingUI), they can look broken:
The other styles in global.css
are unused within BlockNote.
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.
Looks good to me
* Added `withMantineProvider` prop * Ran `pnpm gen` * Made separate component instead of boolean flag * Updated naming * Made `BlockNoteView` render `MantineProvider` only if it's not already within a `MantineContext`
This PR updates the Mantine version to v8. There are 2 notable changes with this:
global.css
has now been split into several files, from which we only needbaseline.css
. The styles from that file have been copied and scoped to.bn-mantine
.