Skip to content

chore(kno-15036): add support for anchor link copy on accordions - #1651

Open
cellomatt wants to merge 4 commits into
mainfrom
mk-kno-15036
Open

chore(kno-15036): add support for anchor link copy on accordions#1651
cellomatt wants to merge 4 commits into
mainfrom
mk-kno-15036

Conversation

@cellomatt

@cellomatt cellomatt commented Aug 28, 2026

Copy link
Copy Markdown
Member

Description

This PR adds a new affordance for copying the link to a given <Accordion> when it has an anchorSlug. 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 anchorSlug to all of our accordions before we merge this, to avoid confusion about items that do have links vs. those that don't.

@linear-code

linear-code Bot commented Aug 28, 2026

Copy link
Copy Markdown

KNO-15036

@vercel

vercel Bot commented Aug 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Aug 28, 2026 9:53pm

Request Review

@cellomatt
cellomatt marked this pull request as ready for review August 28, 2026 21:42

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.css in the styles/ 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 anchorSlug are unaffected.
  • Consider the author's note about shipping a docs-wide anchorSlug update before merge to avoid inconsistent link-copy behavior.
Open in Web View Automation 

Sent by Cursor Automation: Docs PR classifier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant