diplodoc-platform / diplodoc-platform/components

Preserve ToC State Across Section Navigation

Open
#329 0 comments 0 reactions 0 assignees View on GitHub
good first issue
Dominant language
TypeScript
Stars
14
Forks
35
Avg merge
10h 6m
Merged PRs (30d)
17

Description

The current side navigation (ToC) in the documentation closes all other sections when a user navigates to a specific section, leaving only the selected one open. We need to enhance the ToC component to ensure that the state is preserved, allowing all previously opened sections to remain open when a user navigates to a section.

https://github.com/user-attachments/assets/e9b5cd66-f26a-4300-84cd-24fb1bffc946

**Task:**
- Update the ToC component to maintain the open/close state of sections across navigation.
- Ensure that multiple sections can be open simultaneously after navigation.
- Test the updated functionality to confirm state persistence.

**Location of the code where changes need to be made:**
https://github.com/diplodoc-platform/components/blob/master/src/components/Toc/Toc.tsx

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.