-
-
Notifications
You must be signed in to change notification settings - Fork 626
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
Linked headlines #3540
Linked headlines #3540
Conversation
✅ Deploy Preview for volto ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Passing run #5860 ↗︎
Details:
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. |
@sneridagh This works, but the cypress and a11y tests need to be fixed. I'll need assistance on this, also maybe the CSS needs to be redone. |
Hmm. This breaks the Table of contents block as it is generated based on the blocks uids. Also, @razvanMiu confirmed that the block uids are used somewhere within the Link widget to link to sections within the page. Thus, I think it's safer for now to go with the block UIDs in order not to introduce it as a breaking change and in a separate PR/PLIP we can talk about changing the heading ids to more friendly names (maybe the same way we do with the Override the TOC entry checkbox). |
"breaking the toc" is not a blocker, we can fix the toc block. It would represent a major breaking change for Volto, though. |
@tiberiuichim I checked out this branch and I quite like it! I guess we always thought too hard about how an editor could enter the anchor ID in the UI. Though, this solution is both elegant and simple. The only possible downside that I see is that links can break easily when editors change a headline. |
@tisto This feature is also available as an add-on until it hits Volto Core. See: https://github.com/eea/volto-anchors |
I was also thinking about the adaptability of this feature, whether make it available per content-type, or per block? |
Yes, it's a downside. But I would argue that we shouldn't focus too much on this type of scenario, it's counterproductive. Honestly, because this PR is modeled after the github readmes, it happened to me many times that I arive at a document where the link is no longer valid. And it's frustrating, yes, but in reality I could scan the destination document to find the info I was looking for. Or I could look at the URL fragment and understand what the new section would be. Or the document was fully refactored, split into multiple pages, so the link would no longer be valid anyway. What we're gaining is simplicity for the "happy case". |
@tiberiuichim would it be possible to enable/disable this via a feature toggle? This would give us some flexibility in which Volto version we could ship this feature. |
@tisto sure! Even in its current form, it's ultimately configurable, as we're replacing the way the hx elements are rendered, in the config: |
@tiberiuichim awesome! |
Co-authored-by: Alin Voinea <contact@avoinea.com>
🎉 |
* master: Release 17.0.0-alpha.14 Linked headlines (#3540) Release notes for 16.20.8 16.21.0 16.21.1 (#4910) Spanish translation (#4896) Refactor Anontools (#4845) Update to plone-backend 6.0.5 (#4897) Release 17.0.0-alpha.13 Enforce max upload size (#4868) Fix and improve the `addStyling` helper (#4880) Release 17.0.0-alpha.12 Fix regression in horizontal scroll in contents view, add it back (#4872) Configurable Container component from registry for some key route views. (#4871) Allow to deselect color in ColorPickerWidget. (#4839) Release 17.0.0-alpha.11 Pagination with router params (#4698) Release 17.0.0-alpha.10 feat(slate): Add css identifier to slate style menu options (#4847) Update Brazilian Portuguese translations (Fixes #4853) Convert header class to function (#4767)
* master: (29 commits) Remove anonymous function calls. Remove default exports from. (#4917) Release 17.0.0-alpha.14 Linked headlines (#3540) Release notes for 16.20.8 16.21.0 16.21.1 (#4910) Spanish translation (#4896) Refactor Anontools (#4845) Update to plone-backend 6.0.5 (#4897) Release 17.0.0-alpha.13 Enforce max upload size (#4868) Fix and improve the `addStyling` helper (#4880) Release 17.0.0-alpha.12 Fix regression in horizontal scroll in contents view, add it back (#4872) Configurable Container component from registry for some key route views. (#4871) Allow to deselect color in ColorPickerWidget. (#4839) Release 17.0.0-alpha.11 Pagination with router params (#4698) Release 17.0.0-alpha.10 feat(slate): Add css identifier to slate style menu options (#4847) Update Brazilian Portuguese translations (Fixes #4853) Convert header class to function (#4767) ...
No description provided.