-
Notifications
You must be signed in to change notification settings - Fork 91
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(editor): Add support for collapsible sections #6251
Conversation
Very nice โค๏ธ
Just a thought here, persisting would likely also mean that toggling would propagate to all people during collaboration with I would not expect. |
After some more testing I managed to support nested details in the markdown-it plugin, and I don't see a reason any longer to not support nested details. |
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.
Very nice! :) Just some details:
- A better icon for the actions entry would be https://fonts.google.com/icons?icon.set=Material+Symbols&icon.size=24&icon.color=%235f6368&selected=Material+Symbols+Outlined:unfold_more:FILL@1;wght@400;GRAD@0;opsz@24&icon.query=collapse
- There is more padding on the bottom than at the top when opened, making it look a bit unbalanced
- The code block does not have rounded corners here?
Thanks for the feedback @jancborchardt โค๏ธ
That's a separate issue unrelated to this PR. |
@@ -322,6 +323,16 @@ export default [ | |||
}, | |||
priority: 17, | |||
}, | |||
{ |
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.
@jancborchardt Keeping #2836 into consideration should we take action for this one right now and instead of adding this as yet another menu bar entry try to group them in the callout menu as listed in the issue?
Blockquote and code block go into the callouts menu
In the end the details is just another "block style"
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.
Though one argument against would be that you could still have a callout nested in a details block which is then not very obvious from the active indication in the menu bar
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.
In the end the details is just another "block style"
Yeah, good point, makes sense to directly group it properly.
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 agree, but then we probably should move block quote and code blocks into this submenu as well straight away, right? What icon should be used for the "block style" submenu?
@jancborchardt @nimishavijay do you have a good idea how to support nested details UX-wise? Usually the menu items toggle the feature on/off depending on whether it's currently active or not. If we just always make the menu item create a new details section, there would be no way to turn the details off. I'm also fine with not supporting nested details in the UI for now as I don't expect this to be used this a lot. People who really need nested details will have to manually add it in their markdown source then. |
@mejo- I agree itโs best to skip nested details for now. :) |
9d73c45
to
a816980
Compare
Uses `<details>` and `<summary>` summary both for markdown and HTML serialization. Fixes: #3646 Signed-off-by: Jonas <[email protected]>
Signed-off-by: Jonas <[email protected]>
Good catch, fixed now. |
is it added now? can i use it by cloning? |
๐ Summary
Uses
<details>
and<summary>
summary both for markdown and HTML serialization.Fixes: #3646
๐ผ๏ธ Screenshots
๐ง TODO
toMarkdown()
in Tiptap plugin not)@nextcloud/designers for feedback
๐ Checklist
npm run lint
/npm run stylelint
/composer run cs:check
)