chore(kno-15036): add support for anchor link copy on accordions - #1651
Open
cellomatt wants to merge 4 commits into
Open
chore(kno-15036): add support for anchor link copy on accordions#1651cellomatt wants to merge 4 commits into
cellomatt wants to merge 4 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
cellomatt
marked this pull request as ready for review
August 28, 2026 21:42
There was a problem hiding this comment.
Risk HIGH: Adds a copy-link affordance to accordions with anchorSlug, modifying the shared Accordion component and global CSS.
Reasons
- Modifies
components/ui/Accordion.tsx, a shared UI component used across documentation pages (HIGH trigger). - Modifies
styles/global.cssin thestyles/directory (HIGH trigger). - Adds clipboard API usage,
history.pushState, and new React state/effects that change runtime behavior site-wide. - Introduces new Telegraph UI dependencies (
Button,Tooltip) and interactive hover/focus CSS selectors tied to accordion markup. - Author is a known team member (
cellomatt), but risk is HIGH so this does not qualify for auto-approval.
Notes
- Verify the copy-link button appears on header hover for closed accordions and stays visible when open.
- Test keyboard accessibility — the copy button is intentionally a sibling of the header button to avoid nested interactive elements.
- Confirm SSR safety (URL is built at click time rather than during render).
- Check accordions without
anchorSlugare unaffected. - Consider the author's note about shipping a docs-wide
anchorSlugupdate before merge to avoid inconsistent link-copy behavior.
Sent by Cursor Automation: Docs PR classifier
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.


Description
This PR adds a new affordance for copying the link to a given
<Accordion>when it has ananchorSlug. It shows on hover for a closed accordion, and persists when it's open.There are currently only two accordions that have an
anchorSlug, but you can see one of them on the preview deploy here.Loom
https://www.loom.com/share/d82eaa3437664a68ada46d868d0dd005
TODO
We may want to ship a docs-wide update to add
anchorSlugto all of our accordions before we merge this, to avoid confusion about items that do have links vs. those that don't.