Issue 468
tech-debt: Fixes the component gallery found: Button loading on the server, Media fill warning, planned variants in the docs
Back to our planOpen
frontendtech-debtpriority: medium
Summary
Building the component gallery (#466) turned up three problems in shared components, and a fourth smaller gap. None is visible to visitors today, but each one will bite the next person who uses these components.
Details
<Button loading>crashes any server component that renders it.src/platform/ui/Button.tsxhas no'use client', and the loading state adds anonClickguard. React can't pass that from a server component, so the page returns a 500: "Event handlers cannot be passed to Client Component props".- Today
loadingonly works inside client components, and nothing warns about it. - Fix: move the loading button's behavior into a small client part, so
Buttonworks anywhere, and add a test that renders<Button loading>from a server component.
Mediawithfilllogs a next/image warning on every use ("parent element with invalid position… static"). The<picture>it wraps the image in has no positioning. The image still lands in the right place, but everyfilluse warns:PageHeader · imageand the media cards.docs/ui/component-set.mdlists variants the code doesn't have.Media:cover,background,thumbnail,framed,video,aspect,fallback. The component hasfill,resourceandsrc.RichText:prose,compact,inverse. It hasenableProseandenableGutter.- Either build them where a screen needs them or mark them as planned, so the doc says what exists.
ThemeSelectorexists but nothing renders it (knip.jsoncignores it on purpose). Add it to the gallery, or decide where it belongs.
Acceptance criteria
- Not done:
<Button loading>renders from a server component, with a test. - Not done: No next/image
fillwarning in the console on a post page with a photo. - Not done:
docs/ui/component-set.mdmarks every planned variant as planned, or the variant exists. - Not done:
ThemeSelectoris used or removed, andknip.jsoncdrops its ignore.
Generated by Claude Code, opens in a new tab