-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(explorer): highlight current path in explorer #1800
base: v4
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This PR implements a feature to highlight the current path in the explorer interface.
- Adds DOM logic in the inline script to assign a highlight CSS class to the current path element.
- Extends Explorer components and options to support a new highlightCurrentPath property.
- Updates documentation to detail the new behavior.
Reviewed Changes
File | Description |
---|---|
quartz/components/scripts/explorer.inline.ts | Adds logic to retrieve the current path and apply a highlight class if enabled. |
quartz/components/Explorer.tsx | Updates default options and embeds the highlightCurrentPath option into data attributes. |
docs/features/explorer.md | Documents the new highlightCurrentPath feature. |
quartz/components/ExplorerNode.tsx | Extends the options interface to include highlightCurrentPath. |
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Good bot. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i believe we can do this purely via css
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jk but instead we should just compare data-for on the a tag and data-slug on the body
Alright, but do we still want it to be configurable through the |
Closes #1799