Make sections foldable (collapsible headings)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 659
- Forks
- 133
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 110
Description
Spoilers/foldable details sections are tracked separately in https://github.com/nextcloud/text/issues/3646
This ticket remains about making existing sections like headings foldable.
Initial report
Is your feature request related to a problem? Please describe.
For large pages, it is hard to have a vision of the structure, or to navigate within the page to find the right section / paragraph.
Describe the solution you'd like
It would be great to be able to collapse (fold) and open (unfold) sections, thanks to a small arrow on the left. Sections would be based on headers (H1, H2, ...), with subsections that would also be collapsible (foldable). In addition, a button on the top would fold/unfold all.
Describe alternatives you've considered
Having a menu on the top or on the right sidebar (also with collapsible sections)
Additional context
- An example is described in the following link: https://gist.github.com/pierrejoubert73/902cc94d79424356a8d20be2b382e1ab
- Microsoft describes its own solution here: https://support.microsoft.com/en-us/office/video-collapsible-headings-c7b03e92-a397-479d-b989-57393daf2d65
- This other issue mentions a collapsible section for a specific file type: https://github.com/nextcloud/text/issues/145
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No implementation file, test, or entry point is named. Start by locating the heading and editor handling in this JavaScript Tiptap/ProseMirror project, then clarify nested folding and fold/unfold-all behavior; done means existing headings can collapse and expand without including the separately tracked details-section work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100