Skip to content

fix(icons): operation copy-to-clipboard icon visibility - #11050

Merged
robert-hebel-sb merged 3 commits into
mainfrom
fix/copy-to-clipboard-icon-visibility
Sep 16, 2026
Merged

robert-hebel-sb merged 3 commits into
mainfrom
fix/copy-to-clipboard-icon-visibility

Conversation

@robert-hebel-sb

Copy link
Copy Markdown
Contributor

Description

Cherry-pick of #11047 plus a TypeScript migration of the affected component.

Changes

  • fix: Removes the inner <CopyIcon> SVG element from CopyToClipboardBtn — the icon was being rendered twice (once via React component, once via CSS background-image). The button is now self-closing; CSS remains the sole icon source.
  • fix: Removes unused CopyIcon component (src/core/plugins/icons/components/copy.jsx) and its export from the icons plugin.
  • refactor: Migrates copy-to-clipboard-btn.jsx to TypeScript (copy-to-clipboard-btn.tsx) — class component converted to functional component with a typed Props interface, PropTypes removed in favour of TypeScript types.

Motivation and Context

The doubled icon caused visual glitches (duplicate copy icon). The a11y fixes from #10999 (aria-label/title on wrapper and button) are preserved — those were already merged before this branch.

How Has This Been Tested?

  • ESLint passes with zero warnings on modified files
  • No remaining references to CopyIcon or copy-to-clipboard-btn.jsx in source

Checklist

My PR contains...

  • No code changes (src/ is unmodified: changes to documentation, CI, metadata, etc.)
  • Dependency changes (any modification to dependencies in package.json)
  • Bug fixes (non-breaking change which fixes an issue)
  • Improvements (misc. changes to existing features)
  • Features (non-breaking change which adds functionality)

My changes...

  • are breaking changes to a public API (config options, System API, major UI change, etc.)
  • are breaking changes to a private API (Redux, component props, utility functions, etc.)
  • are breaking changes to a developer API (npm script behavior changes, new dev system dependencies, etc.)
  • are not breaking changes.

Documentation

  • My changes do not require a change to the project documentation.

Automated tests

  • My changes can not or do not need to be tested.

🤖 Generated with Claude Code

Azquelt and others added 3 commits September 16, 2026 09:01
Fix the doubling of the copy-to-clipboard icon by removing the inner svg
element, and just leaving the button background.

Allow the copy button to shrink to being invisible by removing its
padding.

Clean up the unused CopyIcon component.
Convert class component to functional component with typed Props interface.
Remove PropTypes in favour of TypeScript types.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
React.FC is unnecessary since React 18 removed implicit children prop.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@robert-hebel-sb robert-hebel-sb changed the title fix: Operation copy-to-clipboard icon visibility fix(icons): operation copy-to-clipboard icon visibility Sep 16, 2026
@robert-hebel-sb
robert-hebel-sb merged commit 45119d8 into main Sep 16, 2026
9 checks passed
swagger-bot pushed a commit that referenced this pull request Sep 16, 2026
# [5.33.0](v5.32.15...v5.33.0) (2026-09-16)

### Bug Fixes

* **icons:** operation copy-to-clipboard icon visibility ([#11050](#11050)) ([45119d8](45119d8))

### Features

* add virtualization for schemas and operations ([#11019](#11019)) ([0ad38e9](0ad38e9))
@swagger-bot

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 5.33.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants