feat(queue-tracker): mirror GitHub Primer Toast shell#37
Merged
Conversation
Repaint ProcessCard shell in src/features/queue-tracker.tsx to match GitHub native Primer .Toast bulk-update tracker: 12px padding, "Label · N items" title format with U+00B7 separator, semibold fraction count, rgp-tracker-in slide-up + fade entry animation with prefers-reduced-motion guard, role="status", aria-live="polite", and data-testid="rgp-queue-tracker-card" on each card. Factor the shared Toast shell into a reusable primerCss.toastShell preset in src/lib/primer-css-helper.ts. Behaviour unchanged: Spinner icon, rate-limit Flash, failed-items expander, pulsing left-accent status footer, bottom-right placement, 380px width. Add src/features/__tests__/queue-tracker.test.tsx covering the title formatter, ARIA attrs, data-testid count, and done-state fraction hide. OpenSpec: queue-tracker-github-toast-parity
6eb4c2b to
02b4143
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/features/queue-tracker.tsxso eachProcessCardmirrors GitHub's native Primer.Toastbulk-update tracker (shell, padding, header composition, motion, ARIA)primerCss.toastShellpreset insrc/lib/primer-css-helper.tsso future toast-like surfaces stay DRYsrc/features/__tests__/queue-tracker.test.tsxcovering the new title formatter, ARIA attributes,data-testidcount, and done-state fraction hideChanges
Queue tracker (
src/features/queue-tracker.tsx)formatTrackerTitle(entry)producingLabel · N itemswith U+00B7 separator (Label · 1 itemsingular, plainLabelwhentotal === 0)Boxnow usesprimerCss.toastShell({...}):canvas.overlaybg,border.default1px border,borderRadius: 2, noboxShadow, tightened to12pxpadding (was Primerp: 3= 16px)${completed}/${total}fraction both render infontWeight: 'semibold'; × dismiss button stays at the end of the outer flex rowrgp-tracker-inkeyframe (slide-up + fade, 180mscubic-bezier(0.4, 0, 0.2, 1)) co-located in the outersxwith a@media (prefers-reduced-motion: reduce)guard. No exit animationrole="status",aria-live="polite", anddata-testid="rgp-queue-tracker-card"Spinner/CheckIconicon column, linearProgressBarwith status-drivenbgcolour, rate-limitFlashcountdown, failed-items expander (Retry Failed,Copy Error Log), pulsing left-accent status footer, bottom-right placement, 380px widthPrimer CSS helper (
src/lib/primer-css-helper.ts)toastShellpreset exposing the shared Toast tokens throughmakePreset, callable asprimerCss.toastShell({...overrides})Tests (
src/features/__tests__/queue-tracker.test.tsx)total === 0→ plain label,total === 1→ singular noun,total > 1→ plural noun, separator is U+00B7role="status"andaria-live="polite"[data-testid="rgp-queue-tracker-card"]nodesentry.done === truehides then/totalfraction;entry.done === falseshows itOpenSpec change
openspec/changes/queue-tracker-github-toast-parity/proposal, design, spec, and tasksTest Plan
pnpm installcompletes without errorspnpm test— all suites pass (newqueue-tracker.test.tsxincluded)pnpm typecheckreports zero TS errorspnpm build:chromecompletes without errorspnpm build:firefoxcompletes without errorspnpm build:edgecompletes without errorsLabel · N items), entry animation, and accessibility attributes match the GitHub.Toastreferenceprefers-reduced-motion: reducedisables the entry animationSummary by cubic
Repaints the queue tracker to match GitHub’s Primer Toast and adds a reusable
primerCss.toastShell. Improves accessibility and motion while keeping behavior unchanged.ProcessCardwithprimerCss.toastShell(12px padding, overlay bg, 1px border, radius 2, no shadow).formatTrackerTitlefor "Label · N items" (U+00B7); semibold header; hiden/totalwhen done.role="status",aria-live="polite", anddata-testid="rgp-queue-tracker-card".Written for commit 02b4143. Summary will update on new commits.