Repository navigation
feat(ui): use datum-ui Badge, ButtonGroup and Spinner in inventory - #233
Merged
kevwilliams merged 2 commits intoDec 1, 2026
Merged
Conversation
Replace hand-built pieces with the datum-ui components staff-portal already ships (its Tailwind scans all of datum-ui, so every variant's classes are present in the host): - Discovery chips, the rack's issue badges and the Filter count are Badges: red light for a disagreement, amber light to check, outline when OK. - The rack face switch and the Catalog toggle are ButtonGroups; the chosen option is a light primary button. - The two plain "Loading…" lines show a Spinner. Their custom CSS goes. PageTitle stays out: it renders the title as a plain span and takes only a string, so the record header would lose its focusable h1 and icon. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scotwells
approved these changes
Nov 27, 2026
scotwells
left a comment
Contributor
There was a problem hiding this comment.
The inventory pages' discovery chips, rack issue badges, filter count, face and catalog toggles and loading lines now use the same datum-ui Badge, ButtonGroup and Spinner as the rest of staff-portal. Checked against datum-ui 3.7.0 from the lockfile: every type and theme used exists, Badge and ButtonGroup pass through the title, data attributes and group role the tests and screen readers rely on, and nothing else depends on the removed CSS. Nit: physical-inventory.css now ends with an orphaned "Rack face toggle" comment.
Resolve physical-inventory.css: keep the new Device power rules and drop the face-switch pill rules this branch replaced with a ButtonGroup. The new PowerOutcomeBadge reused the discovery-chip styling this branch removed, so it becomes a datum-ui Badge too: red failed or unknown, amber cancelled, blue outline in progress, plain outline when it succeeded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Follow-up to #204: replaces hand-built inventory pieces with the datum-ui components staff-portal already ships.
Changes
Button asChild.The plugin has no CSS build of its own, but staff-portal's Tailwind scans all of datum-ui (
@source "../**/*.mjs"in datum-ui'sstyles/root.css), so every variant's classes are in the host.Left as is
<span>and takes only a string, so the record header would lose its focusableh1and icon.DataTable.Paginationreads "Showing 1 to 50 of 200 rows" with page numbers; ours matches staff-portal's "1–50 of 200 devices" footer.DataTable.Search/SelectFilterwith the nuqs adapter touches the URL-driven counts, return links and the session boundary, so it is a separate change if wanted.Testing
pnpm typecheck,pnpm test(992 passed) andpnpm buildpass inui/provider.chips()helper now returns the Badge inside each list item; its assertions are unchanged.🤖 Generated with Claude Code