Repository navigation
fix(markdown): theme the table-of-contents scrollbar - #18328
Closed
CodeHourra wants to merge 2 commits into
Closed
CodeHourra wants to merge 2 commits into
CodeHourra wants to merge 2 commits into
Conversation
9 tasks done
Contributor
|
Closing as superseded by #36561, which fixes the built-in color defaults (WCAG AA pairs, light-mode active tab and the TOC scrollbar). Thank you for this PR, it shaped the design. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
Long Markdown tables of contents currently show a bright native scrollbar track in dark mode. This change makes the heading list use Orca's existing thin, themed scrollbar, so it matches the surrounding navigation UI.
What Changed
scrollbar-sleekclass to the shared table-of-contents scroll container.The shared component covers both Markdown preview and rich-text editing. No new CSS, dependencies, or navigation logic is introduced.
Why
The list already scrolls correctly, but it does not opt into any of the scrollbar styles required by
docs/STYLEGUIDE.md. Reusing the standard list scrollbar fixes its appearance and keeps theme and hover behavior in one place.Linked Issue
Fixes #18327
Visual Proof
Before and after, at the same viewport size, using synthetic headings in an isolated Electron rendering of the real shared component with repository styles. These are component-level captures, not full-application screenshots. Click an image to inspect it at full size.
Testing
Local checks on macOS arm64:
node_modules/.bin/vitest run --config config/vitest.config.ts src/renderer/src/components/editor/MarkdownTableOfContentsPanel.test.tsx— passed (1 test). The added assertion failed before the fix and passes afterward.pnpm typecheck— passed on this feature branch.oxlintandoxfmt --checkon both changed files — passed.Reviewer reproduction: open a Markdown document with enough headings to overflow the table of contents; enable the table of contents in preview or rich-text editing mode, switch between light and dark themes, hover the list, and scroll to its last heading.
Full
pnpm lint, the fullpnpm testsuite, andpnpm buildon this feature branch have not been run locally and are left to repository CI. Windows, Linux, SSH sessions, and mobile were not runtime-tested locally.AI Disclosure
OpenAI Codex assisted with diagnosis, implementation, regression checks, visual inspection, and this PR description. The exact model identifier is not exposed in this session.
Author
GitHub: @CodeHourra
X/Twitter: codeJump (@CodeGod9)
Review
AI self-review:
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
No mobile-specific code or shared protocol changes. PR file diff contains only the table-of-contents component and its test; screenshots are GitHub attachments, not committed assets.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)