Skip to content

🎨 Palette: [UX improvement] Add "Copy link to section" to documentation#23

Open
MilakyS wants to merge 1 commit into
mainfrom
palette/docs-copy-link-ux-3980513492076432300
Open

🎨 Palette: [UX improvement] Add "Copy link to section" to documentation#23
MilakyS wants to merge 1 commit into
mainfrom
palette/docs-copy-link-ux-3980513492076432300

Conversation

@MilakyS
Copy link
Copy Markdown
Member

@MilakyS MilakyS commented May 19, 2026

🎨 Palette: Add "Copy link to section" to documentation headers

💡 What:

Added an interactive "Copy link to section" button to documentation cards on docs.html. The button appears when a card is hovered or focused, allowing users to copy the direct URL hash to their clipboard.

🎯 Why:

Documentation sections are often long, and users frequently need to share specific parts of the reference. Previously, there was no easy way to get a direct link to a specific <h2> section. This enhancement makes sharing and bookmarking specific documentation sections effortless.

♿ Accessibility:

  • ARIA Labels: Added localized aria-label and title to the icon button.
  • Keyboard Navigation: Used :focus-within on the parent card to ensure the button is visible and accessible to keyboard users when they tab through the page.
  • Visual Feedback: Uses a high-contrast checkmark and color shift (var(--accent)) to provide clear confirmation of the copy action.

🛠️ Implementation Details:

  • Styling: Added scoped styles in docs.css for the .docs-copy-link button.
  • Rendering: Updated docs-page.js to inject the button markup during section generation.
  • Logic: Added a delegated click handler in docs.js using navigator.clipboard with a 1500ms feedback loop.
  • i18n: Added docs.copy_link keys to site.json for technical parity.

PR created automatically by Jules for task 3980513492076432300 started by @MilakyS

- Implemented a "Copy link" button for all documentation section headers.
- Added visual feedback (icon swap to checkmark, color change to green) on success.
- Ensures accessibility with ARIA labels and focus-reveal triggers.
- Added localization for English and Russian.

Co-authored-by: MilakyS <155958485+MilakyS@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 19, 2026

Deploy Preview for melodious-queijadas-3cc817 ready!

Name Link
🔨 Latest commit 8e1895a
🔍 Latest deploy log https://app.netlify.com/projects/melodious-queijadas-3cc817/deploys/6a0bffc73f70ec0008bbb589
😎 Deploy Preview https://deploy-preview-23--melodious-queijadas-3cc817.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

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