deepchem / deepchem/deepchem.github.io

[Enhancement]: TOC lacks active section highlighting and auto-scroll

Open
#53 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
4
Forks
19
PR merge metrics
No merged PRs in 30d

Description

## Description

On the tutorial pages for example, [The Basic Tools of the Deep Life Sciences,](https://deepchem.io/tutorials/the-basic-tools-of-the-deep-life-sciences/) the right-hand sidebar containing the Table of Contents (TOC) for the current page has two usability issues:

1. **No Active Section Highlighting (Scrollspy)**: As the user scrolls through the main document, the TOC does not highlight or indicate which section is currently being read.
2. **No Auto-scrolling**: The TOC does not scroll automatically to keep the active section in view or as the user progresses deep into the document.

Image

## Enhancement

- **Active state**: The section currently in the viewport on the main page should be highlighted in the right TOC ( a scrollspy feature).
- **Auto-scroll**: The TOC should ideally scroll to ensure the currently active section remains visible within the sidebar.

## Expected Outcome

It will look something like this (TOC on the right):

https://github.com/user-attachments/assets/874d7019-45e9-4af0-b587-4e726c4dfca1

## Why it matters

Adding this would:

- Make it easier for users to navigate long tutorials without losing their place.
- Improve the overall usability and polish of the tutorials, which are often a new user's first hands-on introduction to DeepChem.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.