Detail: Remove duplicate copy affordance on tracking number (code onClick + CopyButton) #32
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The tracking number in the Shipment Detail metadata grid has two overlapping copy triggers:
<code>element has anonClick={copyTracking}handler withcursor-pointer<CopyTrackingButton>component renders next to itThis results in two separate copy state variables (
copiedTrackingfromuseStateand the internal state ofCopyTrackingButton), so clicking the code element shows "Copied!" fromcopiedTrackingstate but the button icon doesn't change, and vice versa. It's redundant and inconsistent.Implementation
File:
frontend/src/pages/ShipmentDetail.tsx— around line 410.Remove the
onClickandcursor-pointerfrom the<code>element, keep only theCopyTrackingButton:copiedTrackingstate andsetCopiedTrackingentirely (lines ~174, ~281-286)copyTrackingfunction (lines ~281-286){copiedTracking && <span>Copied!</span>}JSXselect-allto the code element so users can triple-click to select itAcceptance criteria
copiedTrackingstate variable is removedBrand identity alignment
Tracking IDs are technical identifiers and should be copy-friendly, selectable, and visibly distinct. The brand brief calls for monospace treatment and clear copy affordances without duplicate controls.
Brand-compliant implementation notes
select-allor equivalent behavior so the identifier remains user-owned and portable.Additional acceptance criteria
Migrated from GitHub issue #11: https://github.com/bullitt186/trackbox/issues/11
Original author: @bullitt186
Original created: 2026-06-27T13:23:45Z
Original labels: ux
Implemented in commit
bd6b0e7. Removed theonClick={copyTracking}handler andcursor-pointerclass from the<code>element, removed thecopiedTrackingstate variable and thecopyTrackingfunction. Addedselect-allclass to the tracking number code element for easy text selection. The CopyTrackingButton remains as the single copy affordance with unified feedback.