Global: Extract ScrapeStatusIcon into a brand-consistent shared status component #47
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
ScrapeStatusIconcomponent is defined twice with identical logic:frontend/src/pages/ShipmentDetail.tsxline ~104:function ScrapeStatusIconfrontend/src/pages/Settings.tsxline ~401:function SettingsScrapeStatusIconBoth switch on the same status values (
success,no_change,error,timeout,disabled) and return the same icons. If a new status is added, both must be updated in sync. One will inevitably drift.Implementation
Create a new shared component file:
frontend/src/components/ScrapeStatusIcon.tsx:Then in both
ShipmentDetail.tsxandSettings.tsx:ScrapeStatusIcon/SettingsScrapeStatusIconfunction definitionsimport { ScrapeStatusIcon } from "@/components/ScrapeStatusIcon"<ScrapeStatusIcon status={...} />Acceptance criteria
ScrapeStatusIconis defined once infrontend/src/components/ScrapeStatusIcon.tsxShipmentDetail.tsxandSettings.tsximport and use the shared componentBrand identity alignment
Sync/scrape status is a recurring data-transparency signal. A shared component ensures consistent semantic color, iconography, labels, and accessibility across Detail and Settings.
Brand-compliant implementation notes
CheckCircle2,MinusCircle,AlertTriangle,Clock,CircleOff,HelpCircle) over mixed text emoji symbols.title/aria-labelso status is not color-only.h-4 w-4).Additional acceptance criteria
Migrated from GitHub issue #26: https://github.com/bullitt186/trackbox/issues/26
Original author: @bullitt186
Original created: 2026-06-27T13:26:10Z
Original labels: ux
Global: Extract duplicated ScrapeStatusIcon into a shared componentto Global: Extract ScrapeStatusIcon into a brand-consistent shared status componentImplemented in commit
bd6b0e7. ExtractedScrapeStatusIconintosrc/components/ScrapeStatusIcon.tsxusing lucide icons (CheckCircle2, MinusCircle, AlertTriangle, Clock, Ban) with semantic colors andtitleattributes via wrapper spans. BothShipmentDetail.tsxandSettings.tsxnow import the shared component. Local duplicates (ScrapeStatusIconin ShipmentDetail andSettingsScrapeStatusIconin Settings) have been removed.