posit-dev / posit-dev/content-switcher

Blocked/cantdo: Heading always active/selected fix

Open
#6 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
2
Forks
1
Avg merge
4m
Merged PRs (30d)
2

Description

For whatever reason, the last "options" heading for the switcher is always highlighted /active in the mini toc (right). I wasn't able to only display the "selected" heading but maybe there is logic to add.


  • Is it better to leave these out of the TOC?
  • Is it better to have them included even if the wrong heading is active?
  • Is there a solution?

Currently, listing entires as unlisted as a workaround. To test and fix the issue, remove unlisted

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the mini TOC behavior after removing unlisted from the entries, then inspect the logic that marks a switcher heading as selected. The fix is done when only the active heading is highlighted in the mini TOC, with the intended treatment of the options headings clarified.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.