Skip to content

The copy-to-clipboard button is not visible after long coordinates. #89#158

Open
manishpatel00 wants to merge 4 commits intomeshery-extensions:masterfrom
manishpatel00:fix/copy-button-visibility
Open

The copy-to-clipboard button is not visible after long coordinates. #89#158
manishpatel00 wants to merge 4 commits intomeshery-extensions:masterfrom
manishpatel00:fix/copy-button-visibility

Conversation

@manishpatel00
Copy link
Copy Markdown
Contributor

Notes for Reviewers

Summary

The copy button was positioned outside the textarea (right: -25px),
causing it to disappear when coordinates were long enough to trigger
a scrollbar. Button is now anchored inside the textarea boundary and
always visible.

After fix

Screenshot 2026-04-12 at 7 05 03 PM

Changes

  • Updated site/src/components/ShapeBuilder/shapeBuilder.styles.js
    • CopyButton: changed from right: -25px to right: 8px with
      border, background, and z-index: 1 so it stays visible inside
      the textarea at all times
    • textarea: added padding-right: 2.5rem so text never overlaps
      the button

Signed commits

  • Yes, I signed my commits.

When a user finishes designing a polygon (via Close Shape, double-click,
Enter, or Esc), the normalized SVG coordinates are now displayed in a
focused modal overlay on the canvas instead of being shown in the textbox
below where they can easily be missed.

Modal features:
- Inline copy button with 'Copied' feedback
- 'Done' action to dismiss and keep shape
- 'Clear & Start Over' action to reset canvas
- Overlay click-to-close for quick dismissal
- 'View Coordinates' button to re-open modal after close
- Full keyboard and screen-reader accessibility
- Dark/light theme support

The fallback textarea is retained for accessibility and non-JS contexts.

Fixes meshery-extensions#148

Signed-off-by: MANISH KUMAR <146671113+manishpatel00@users.noreply.github.com>
The 'View Coordinates' button text was invisible in dark mode because
MUI's outlined variant inherits text color from the background theme.

Fixed by explicitly setting:
- color: "#00B39F" (Meshery brand color)
- borderColor: "#00B39F"
- Hover state with subtle background tint

Button now clearly visible in both light and dark themes.

Signed-off-by: MANISH KUMAR <146671113+manishpatel00@users.noreply.github.com>
Fixes meshery-extensions#89

Repositioned CopyButton from right: -25px (outside textarea) to
right: 8px (inside textarea) with z-index: 1. Added padding-right
to textarea so coordinate text does not overlap the button.

The button now includes a visible background and border to maintain
consistency and visibility within the textarea bounds.

Signed-off-by: MANISH KUMAR <146671113+manishpatel00@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 12, 2026

🚀 Preview deployment for PR #158

🌐 Preview URL: https://meshery-extensions.github.io/shape-builder/pr-preview/pr-158/

This preview is updated automatically when commits are pushed to this PR.

Signed-off-by: MANISH KUMAR <146671113+manishpatel00@users.noreply.github.com>
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.

The copy-to-clipboard button is not visible after long coordinates.

1 participant