Skip to content

fix: show copy buttons in grouped code examples - #263

Open
x-n2o wants to merge 1 commit into
openclaw:mainfrom
x-n2o:fix/grouped-code-copy-button
Open

x-n2o wants to merge 1 commit into
openclaw:mainfrom
x-n2o:fix/grouped-code-copy-button

Conversation

@x-n2o

@x-n2o x-n2o commented Oct 4, 2026

Copy link
Copy Markdown

Related: openclaw/openclaw#165115

What Problem This Solves

Fixes missing copy buttons when readers select a tabbed code example, including the Slack app manifests.

User Impact

Readers can copy the selected example with a visible, keyboard-accessible control and receive the existing copy feedback.

Why This Change Was Made

Expose grouped captions in the docs layout while hiding only their duplicate label. Keep the existing clipboard runtime and tab behavior.

Evidence

  • Bounded Slack setup and component-fixture previews built successfully on Node 24.19.0.
  • Browser verification passed in light/dark at 390, 667, and 1440px: tab switching, one visible copy control, keyboard Enter, exact clipboard content, and copied feedback.
  • Executed the new grouped-copy visual regression against the bounded fixture; passed. Existing code-fence tests: 5 passed.
  • Structured autoreview: no accepted/actionable findings.
  • Wider renderer/Worker test run is not green locally: failures include browser-history restoration, Windows path separators, and process-spawn checks. Full publishing/locale smoke was not run for this bounded UI change.

Before

Grouped example without a visible copy button

After

Grouped example with an accessible copy button

Screenshots use a local 667px dark preview. Before restores the original caption-hiding CSS; JSON indentation is intentionally unchanged in this PR and tracked separately in #165114. Screenshot assets live on a separate evidence branch and are excluded from this PR's diff.

Copilot AI balanced review requested due to automatic review settings October 4, 2026 21:32
@x-n2o
x-n2o requested a review from a team as a code owner October 4, 2026 21:32

Copilot AI 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.

Copilot review overview

🟢 Approval recommended

The focused styling fix matches the reported behavior and has comprehensive regression coverage.

Review effort: Balanced
Findings: None

What changed in this PR

Exposes copy controls for grouped code examples while hiding duplicate labels.

Changes:

  • Adds targeted grouped-code caption styling.
  • Adds smoke coverage across themes, viewports, tabs, keyboard activation, and clipboard feedback.
File Description
scripts/​docs-site/​docs-layout.css Shows grouped copy controls and hides duplicate labels.
scripts/​docs-site/​smoke.mjs Verifies the generated CSS contract.
scripts/​docs-site/​visual-smoke.mjs Tests grouped copying across responsive layouts and themes.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

This branch has not been deployed

No deployments
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.

2 participants