Skip to content

Abilities Explorer: Fix "copy" button placement.#245

Merged
jeffpaul merged 2 commits intoWordPress:developfrom
juanfra:tweak/abilities-fix-copy-styles
Feb 23, 2026
Merged

Abilities Explorer: Fix "copy" button placement.#245
jeffpaul merged 2 commits intoWordPress:developfrom
juanfra:tweak/abilities-fix-copy-styles

Conversation

@juanfra
Copy link
Member

@juanfra juanfra commented Feb 20, 2026

What?

Fixes layout issues with the "Copy" button in ability code blocks and improves the copy feedback UX.

Why?

The "Copy" button was breaking out of the code block and appearing as a separate column instead of overlaying the <pre> element. Additionally, the "Copied to clipboard" text caused an abrupt button size change and felt redundant.

How?

  • Fixed Copy button positioning to properly overlay the code block
  • Added icons to success and failure states for better visual feedback
  • Changed "Copied to clipboard" to just "Copied" to reduce button size shift

Testing Instructions

  1. Go to Tools > Abilities Explorer
  2. Click on "View" for any ability.
  3. Then see any of the schema fields and confirm the placement of the button is correct.
  4. Click on the button, see the success/failure message changed and has an icon now.
  5. Confirm that's still copying into the clipboard.

Screenshots or screencast

Before

abilities-copy-before.mp4

With the fix

abilities-fix-copy-styles.mp4
Open WordPress Playground Preview

@github-actions
Copy link

github-actions bot commented Feb 20, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: juanfra <juanfra@git.wordpress.org>
Co-authored-by: dkotter <dkotter@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@codecov
Copy link

codecov bot commented Feb 20, 2026

Codecov Report

❌ Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.69%. Comparing base (4fbb197) to head (9f42461).
⚠️ Report is 3 commits behind head on develop.

Files with missing lines Patch % Lines
...udes/Experiments/Abilities_Explorer/Admin_Page.php 0.00% 6 Missing ⚠️
...eriments/Abilities_Explorer/Abilities_Explorer.php 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             develop     #245   +/-   ##
==========================================
  Coverage      56.69%   56.69%           
  Complexity       505      505           
==========================================
  Files             32       32           
  Lines           2568     2568           
==========================================
  Hits            1456     1456           
  Misses          1112     1112           
Flag Coverage Δ
unit 56.69% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jeffpaul jeffpaul requested a review from dkotter February 20, 2026 21:12
@jeffpaul jeffpaul moved this to Needs review in WordPress AI Planning & Roadmap Feb 20, 2026
@jeffpaul jeffpaul added this to the 0.4.0 milestone Feb 20, 2026
@jeffpaul jeffpaul added the [Type] Bug Something isn't working label Feb 20, 2026
@jeffpaul jeffpaul added the props-bot Manually triggers Props Bot to ensure the list of props is up to date. label Feb 23, 2026
@github-actions github-actions bot removed the props-bot Manually triggers Props Bot to ensure the list of props is up to date. label Feb 23, 2026
@jeffpaul jeffpaul merged commit 23e968d into WordPress:develop Feb 23, 2026
20 of 27 checks passed
@github-project-automation github-project-automation bot moved this from Needs review to Done in WordPress AI Planning & Roadmap Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Bug Something isn't working

Projects

Development

Successfully merging this pull request may close these issues.

3 participants