Repository navigation
Restyle the k8s-pods view and drop the demo-data copy - #13
Merged
Merged
Conversation
The page was a bare title, a select and an unstyled table. Rework it into something presentable: - A summary row of CalloutValue cards (pods, running, needs attention, restarts) that recomputes against the active filters. - StatusPill per pod phase, graded by severity, instead of a flat Badge — and Pending no longer reads as an error. - A pod-name search alongside the namespace select. - Unhealthy pods sort to the top so the rows needing action come first. - Icon-only delete buttons with per-pod aria-labels, which also keeps the actions column narrow enough that the table fits an 800px pane. - MessageBox for the delete confirmation, and a TableEmptyState with the pod glyph in place of the bare "No pods in this namespace." line. Two DRUIDS notes worth recording: InputSearch's leading magnifier occupies the same slot as `floatingLabel`, so a label there renders clipped — the placeholder carries it instead. And the Status column must not set `shouldShrink`, or "CrashLoopBackOff" truncates to "CRASHLO…". The header no longer says "Demo view using mock data". The `mockPods` identifier and its comment stay as they are: the data is still a static fixture, and that belongs in the code even when it is not in the UI. Version goes to 0.0.3 so this deploy gets its own error-tracking releaseVersion; lockfile regenerated through the root gate. Verified in the browser against the dev server: search, namespace filter, delete, dismiss and empty state all behave, no horizontal overflow at 800px, and npm ci / typecheck / lint / build all pass. Co-Authored-By: Claude Opus 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.
What changed
The page was a bare title, a select and an unstyled table. It now has some structure:
CalloutValuecards — pods, running, needs attention, restarts — recomputed against the active filtersBadge,default/warning/dangeronlyStatusPillgraded per pod phase, soPendingreads as a warning rather than an errorDeletebuttonaria-label<Text>lineMessageBoxTableEmptyStatewith the pod glyph, title and subtitleRestarts and Age are right-aligned, pod names are monospace with ellipsis, and the table gets
stickyHeaders+hasInnerBorders.Copy
The header no longer says "Demo view using mock data" — it now reads "Pod health across namespaces. Unhealthy pods can be deleted from the list." No user-facing string mentions demo or mock data anymore.
The
mockPodsidentifier and its comment are deliberately unchanged. The data is still a static fixture with no Kubernetes integration behind it, and that fact belongs in the code even when it is not in the UI — the next person to open this file should not have to discover it.Two DRUIDS gotchas found on the way
InputSearch's leading magnifier occupies the same slot asfloatingLabel, so a label set there renders as a clipped sliver above the input. The placeholder carries it instead.Select'sfloatingLabelworks fine and is kept.shouldShrink, orCrashLoopBackOfftruncates toCRASHLO….Both were caught in the browser, not by types or lint.
Verification
Driven against the dev server in a real browser:
checkout→ 2 rows, summary follows), namespace filter (database→ 2 rows), delete →MessageBox+ summary updates, dismiss → collapses and clears state, next delete mounts a fresh messageUNSAFE_componentWill*StrictMode warnings from a minified DRUIDS dependency (react-select), which this change does not touchRoot-gate checks:
npm install --package-lock-only --ignore-scripts, thennpm ci --ignore-scripts,npm run typecheck -w apps/k8s-pods,npm run lint,npm run build -w apps/k8s-pods— all pass.apps/k8s-podsrecord andnode_modules/k8s-podslink both present in the root lockfile.Version goes to
0.0.3so this deploy gets its own error-trackingreleaseVersion.Note on the theme
main.tsxpinsdefaultThemePreference="light", so the app stays light regardless of the host colour scheme. Untouched here — worth a separate look if it should follow the Datadog theme in App Builder.