-
Notifications
You must be signed in to change notification settings - Fork 34
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
PLANET-7539: Add button to convert the ToC block into a List block #2395
Conversation
- Add convert button
- Add convert function
- Create recursive function for subitems
- Fix JS Docs
- Fix lint issue
/unhold 9bd6d4fa-1760-4a27-8d3f-f4b2d4b9d54f
Test instance is ready 🚀🌑 venus | admin | blocks report | CircleCI | composer-local.json ⌚ 2024.10.07 10:29:08 |
Hey @mardelnet, are we meant to completely lose the CSS styles when converting to a static list? I see that currently clicking on that option makes the block look like this both in backend and frontend, but I think this block shouldn't be using our typical link styles. |
Thanks, @mleray |
Ideally we should preserve our block styling. I see that after the conversion it's just a list with a For the scope of this PR/ticket, we would just need to check that it's feasible. Then we can check with the design team if they are fine with the "Convert to static" workflow. |
- Add convert button
- Add convert function
- Create recursive function for subitems
- Fix JS Docs
- Fix lint issue
- Add styles - Add header
…m/greenpeace/planet4-master-theme into PLANET-7539_submenu-block-wysiwyg
- Add more styles - Add constant values
/unhold bc835bae-e1df-40e2-8f58-93148bbbeb24
/unhold efec7eee-56c0-4f8d-87f8-5f2cbba97184
- Fix styles - Fix lint issues
387c3b7
to
17cbc64
Compare
/unhold c51304f6-6c45-4ba1-9c52-4c1c770f12cf
@mleray @comzeradd |
@mardelnet I personally think it looks good enough like this, except maybe the fact that it's full width! |
Maybe there is a way to have a |
Closing this PR since the secondary navigation will be a different block. |
Ref: https://jira.greenpeace.org/browse/PLANET-7539
DESCRIPTION:
This PR adds a "Convert to static list" button to the Table of Content block (formerly the Submenu block).
Editors can click on it to convert the Table of Content block into a native List block and edit the block content.
This is the first step in investigating how to add WYSIWYG features to the Table of Content block.
Additionally, some JSDocs were added to make our future selves' work lighter.