Skip to content

fix: update copy text to include icon for better visibility#2482

Merged
CommanderStorm merged 6 commits intomaplibre:mainfrom
nyurik:copy-icon
Jan 4, 2026
Merged

fix: update copy text to include icon for better visibility#2482
CommanderStorm merged 6 commits intomaplibre:mainfrom
nyurik:copy-icon

Conversation

@nyurik
Copy link
Copy Markdown
Member

@nyurik nyurik commented Jan 4, 2026

This adds a ⧉ Click to copy text.

My only concern (possibly todo in another PR) is that Click to copy text is bigger than the label text. I'm not a designer, but it seems the label should be bigger and more pronounced than the command hint, which should be grayer and smaller.

Copilot AI review requested due to automatic review settings January 4, 2026 05:50
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the copy functionality visibility by adding a "⧉" (TWO JOINED SQUARES) Unicode icon to all "Click to copy" text throughout the UI. The change improves user experience by providing a visual indicator alongside the text instruction.

  • Adds the "⧉" icon prefix to all "Click to copy" tooltip text
  • Updates component files and corresponding test snapshots
  • Maintains consistency across the TooltipCopyText and SpriteCanvas components

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
martin/martin-ui/src/components/ui/tooltip-copy-text.tsx Adds copy icon to the main reusable tooltip component's "Click to copy" text
martin/martin-ui/src/components/sprite/SpriteCanvas.tsx Adds copy icon to both sprite canvas tooltip instances (preview and full view modes)
martin/martin-ui/__tests__/components/catalogs/__snapshots__/sprite.test.tsx.snap Updates test snapshots to reflect the icon addition in rendered output

Comment on lines +44 to +46
<div className="text-xs">{text}</div>
<br />
<div className="text-sm">Click to copy</div>
<div className="text-sm">Click to copy</div>
Copy link

Copilot AI Jan 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The visual hierarchy appears inverted: the actual content (line 44, text-xs) is smaller than the instructional hint (line 46, text-sm). The primary content that the user wants to copy should be more prominent than the secondary "Click to copy" instruction. Consider making the content text larger (text-sm or text-base) and the instruction smaller (text-xs) with reduced opacity to establish proper visual hierarchy.

Copilot uses AI. Check for mistakes.
@nyurik nyurik requested a review from CommanderStorm January 4, 2026 06:04
</code>
<br />
<span className="text-xs text-gray-500">Click to copy</span>
<span className="text-xs text-gray-500">Click to copy</span>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to have

https://lucide.dev/icons/copy

Plus import { Copy } from 'lucide-react'; at the top

Suggested change
<span className="text-xs text-gray-500"> Click to copy</span>
<span className="text-xs text-gray-500"><Copy /> Click to copy</span>

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While it does look cleaner, do you really want to have a separate dependency and an image just for this? Unicode symbol is so much simpler

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P.S. This is totally up to you - feel free to drive it any way you feel is better if you feel strongly

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are already using proper icons for all proper icons, I would like to not add a second class of icons.

@CommanderStorm CommanderStorm enabled auto-merge (squash) January 4, 2026 17:42
Copy link
Copy Markdown
Member

@CommanderStorm CommanderStorm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also took the liberty to clean up the tests surounding this a bit

@CommanderStorm CommanderStorm merged commit 5ec6eec into maplibre:main Jan 4, 2026
37 checks passed
@CommanderStorm CommanderStorm mentioned this pull request Jan 4, 2026
@nyurik nyurik deleted the copy-icon branch January 5, 2026 02:44
@nyurik
Copy link
Copy Markdown
Member Author

nyurik commented Jan 5, 2026

@CommanderStorm is this what you wanted? I got this by running just start && just run

image

I think the icon and the text should be smaller than the name of the label, and the icon might be best to be placed on the same line as the instruction text... Perhaps left align it too? Or what would be best?

@CommanderStorm
Copy link
Copy Markdown
Member

jikes..

@CommanderStorm
Copy link
Copy Markdown
Member

defintively 100% intentional

CommanderStorm added a commit that referenced this pull request Jan 28, 2026
## 🤖 New release

* `martin-tile-utils`: 0.6.8 -> 0.6.9 (✓ API compatible changes)
* `mbtiles`: 0.15.0 -> 0.15.1 (✓ API compatible changes)
* `martin-core`: 0.2.5 -> 0.2.6 (✓ API compatible changes)
* `martin`: 1.2.0 -> 1.3.0

<details><summary><i><b>Changelog</b></i></summary><p>


## `mbtiles`

<blockquote>

##
[0.15.1](mbtiles-v0.15.0...mbtiles-v0.15.1)
- 2026-01-27

### Added

- add MLT decoding support
([#2512](#2512))
- migrate our log library to tracing
([#2494](#2494))

### Other

- unignore `diff_and_patch_bsdiff` test with unique SQLite database
names ([#2480](#2480))
- *(mbtiles)* remove the prefix-ism around how files are named for
binary diff copy and simpify their naming
([#2478](#2478))
- *(mbtiles)* add assertion messages what we are checking to the copy
tests ([#2477](#2477))
</blockquote>

## `martin-core`

<blockquote>

##
[0.2.6](martin-core-v0.2.5...martin-core-v0.2.6)
- 2026-01-27

### Added

- migrate our log library to tracing
([#2494](#2494))
- *(martin-core)* Allow glyph ranges more than 0xFFFF
([#2438](#2438))

### Fixed

- *(perf)* Remove FontSources.masks as they were consuming large amounts
of memory even when no font sources were set
([#2519](#2519))
- improve error message if no SVG sprite files are present
([#2516](#2516))

### Other

- move our imports to tracing
([#2500](#2500))
- *(deps)* shear our dependencys
([#2497](#2497))
</blockquote>

## `martin`

<blockquote>

##
[1.3.0](martin-v1.2.0...martin-v1.3.0)
- 2026-01-27

### Added

- *(srv)* Add `route_prefix` configuration for native subpath support
without the need of a reverse proxy override
([#2523](#2523))
- add MLT decoding support
([#2512](#2512))
- migrate our log library to tracing
([#2494](#2494))
- improve martin-cp progress output time estimate
([#2491](#2491))
- *(pg)* include ID column info for tables
([#2485](#2485))
- *(pg)* support PostgreSQL materialized views
([#2279](#2279))
- *(martin-core)* Allow glyph ranges more than 0xFFFF
([#2438](#2438))

### Fixed

- *(ui)* clipboard copy for http://0.0.0.0:3000 and unify
implementations ([#2487](#2487))
- the `Copy` icon displaying nicely, next to the text and with enough
padding ot all items
([#2483](#2483))
- update copy text to include icon for better visibility
([#2482](#2482))
- *(perf)* Remove FontSources.masks as they were consuming large amounts
of memory even when no font sources were set
([#2519](#2519))
- improve error message if no SVG sprite files are present
([#2516](#2516))

### Other

- move our request logging to tracing
([#2508](#2508))
- move our imports to tracing
([#2500](#2500))
- *(deps)* shear our dependencys
([#2497](#2497))
- *(ui)* adjust margin for copy icon in URL component
([#2489](#2489))
- unignore `diff_and_patch_bsdiff` test with unique SQLite database
names ([#2480](#2480))
- *(mbtiles)* remove the prefix-ism around how files are named for
binary diff copy and simpify their naming
([#2478](#2478))
- *(mbtiles)* add assertion messages what we are checking to the copy
tests ([#2477](#2477))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.

3 participants