-
Notifications
You must be signed in to change notification settings - Fork 337
✨ Add a custom callout block to the editor #892
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
✨ Add a custom callout block to the editor #892
Conversation
Great job! Just small UI considerations here. |
Hey thanks for your feedback Made some changes on the callout. And the emoji's background color transition on hover |
e7dd4fa
to
1bc17a2
Compare
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.
Hey @ZouicheOmar this looks awesome ! Thanks a lot for your contribution.
Just one feedback, one thing I noticed in your screen capture is that by default the call out block has a white background.
How about we give it yellow background by default that people can change if they want to.
@ZouicheOmar |
Now the default bg for a callout is yellow. Democallout_default_bg.webmSolution is not quite elegant, would be cleaner with a custom side menu, or a change on blocknotejs. Will keep an eye on it. @virgile-dev I am definitely coming to the hack days ! Just waiting for my invite to be checked and I'll be all set. |
75adfd5
to
0a3f580
Compare
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.
Thank you a lot for the contribution.
I can see you still have some linting issues.
I use the extension https://marketplace.visualstudio.com/items/?itemName=dbaeumer.vscode-eslint to get informations about them.
Your last 3 commits seems more fixing your previous commits, consider using the fixup
commits instead of a new ones.
We are adding tests using Playwright, do you know it ?
If yes maybe you can add test here: https://github.com/suitenumerique/docs/blob/main/src/frontend/apps/e2e/__tests__/app-impress/doc-editor.spec.ts
Otherwise, no problem, I will add tests after your changes.
...frontend/apps/impress/src/features/docs/doc-editor/components/custom-blocks/CalloutBlock.tsx
Outdated
Show resolved
Hide resolved
...frontend/apps/impress/src/features/docs/doc-editor/components/custom-blocks/CalloutBlock.tsx
Outdated
Show resolved
Hide resolved
...frontend/apps/impress/src/features/docs/doc-editor/components/custom-blocks/CalloutBlock.tsx
Outdated
Show resolved
Hide resolved
...frontend/apps/impress/src/features/docs/doc-editor/components/custom-blocks/CalloutBlock.tsx
Outdated
Show resolved
Hide resolved
0a3f580
to
216e79f
Compare
@AntoLC Thank you very much for your suggestions ! I applied fixes according to your comments, plus other minor ones. |
b96b524
to
5b0d282
Compare
We need functionalities and data to implement a custom emoji picker component, as blocknote's emojipicker component triggers and uses cases are limited. add to package.json the following packages: - "emoji-mart": provides functions and components for displaying, searching and selecting emojis. - @emoji-mart-data: offers pre-configured sets of emojis. - @emoji-mart/react: React Picker component
Add a custom emoji picker component to use in the editor
Add a custom block to the editor, the callout block.
Adapt modal export to include PDF and Docx export for the callout block.
5b0d282
to
bd79f84
Compare
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.
Thank you a lot for your contribution ! 🎉
@ZouicheOmar we noticed with @rl-83 3 little things that need fixing
Do you think you could make a PR to fix it? |
Hey @virgile-dev, sorry for such a late response |
Purpose
This PR addresses issue #305. Add a new custom block to the editor, the callout block.
Proposal
emoji-mart
library, which is already used by blocknote. That's to have custom triggers and use of the component.Demo
callout.webm
PDF and Docx Exports
Would love any feedback if this needs improvements, corrections or any changes.