feat(web): PLAN §4.7 shadcn-solid adoption and Tailwind theme#20
Merged
feat(web): PLAN §4.7 shadcn-solid adoption and Tailwind theme#20
Conversation
…idge Migrate app shell, home, recipe cards, and recipe detail to registry-style UI components (card, alert, skeleton, separator) plus shared layout, typography, and loading primitives. Replace bespoke Page.css and AppShell.css with Tailwind and @theme-mapped semantic tokens. Document adoption in COMPONENT_LIBRARY and tick §4.7 in PLAN. Add VS Code Tailwind IntelliSense settings and CSS custom data for v4 at-rules. Made-with: Cursor
There was a problem hiding this comment.
Pull request overview
This PR completes PLAN §4.7 for apps/web by finishing the migration to shadcn-solid-style “registry” components and Tailwind v4 utilities, replacing bespoke CSS with semantic Tailwind theme tokens bridged from existing :root bread variables.
Changes:
- Replaced page/app-shell styling from
AppShell.css/Page.csswith Tailwind utilities and new UI primitives (card/alert/skeleton/separator/typography/layout). - Added a Tailwind v4
@themebridge insrc/index.cssto map existing bread CSS variables to semantic Tailwind utilities. - Updated docs and editor settings to reflect the new component library and Tailwind v4 workflow.
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| PLAN.md | Marks PLAN §4.7 as complete. |
| apps/web/src/pages/Home.tsx | Migrates Home page to new typography, loading, alert, and list primitives. |
| apps/web/src/pages/RecipePage.tsx | Migrates recipe detail page to new back-link, loading, and alert primitives. |
| apps/web/src/pages/Page.css | Removes legacy page CSS in favor of Tailwind/utilities. |
| apps/web/src/layout/AppShell.tsx | Switches app chrome to Shell layout primitives. |
| apps/web/src/layout/AppShell.css | Removes legacy shell CSS in favor of Tailwind/utilities. |
| apps/web/src/index.css | Adds Tailwind v4 @theme mapping for semantic utilities. |
| apps/web/src/components/ui/button.tsx | Updates button tokens to semantic Tailwind utilities. |
| apps/web/src/components/ui/card.tsx | Adds Card primitives for consistent panels/surfaces. |
| apps/web/src/components/ui/alert.tsx | Adds Alert primitives for error states. |
| apps/web/src/components/ui/skeleton.tsx | Adds Skeleton primitives for loading states. |
| apps/web/src/components/ui/separator.tsx | Adds Separator primitive used in recipe detail. |
| apps/web/src/components/ui/loading-region.tsx | Adds loading status wrapper for accessible skeleton regions. |
| apps/web/src/components/ui/cover-image.tsx | Adds reusable framed cover/hero image component. |
| apps/web/src/components/ui/typography.tsx | Adds shared typography components used across pages. |
| apps/web/src/components/RecipeList.tsx | Adds wrapper for recipe list <ul> styling. |
| apps/web/src/components/RecipeCard.tsx | Rebuilds recipe card using Card/CoverImage/Typography primitives. |
| apps/web/src/components/recipe-detail/RecipeDetailPanel.tsx | Introduces shared card panel wrapper for ingredients/steps sections. |
| apps/web/src/components/recipe-detail/RecipeDetailIngredients.tsx | Migrates ingredients section to RecipeDetailPanel + Tailwind list styling. |
| apps/web/src/components/recipe-detail/RecipeDetailSteps.tsx | Migrates steps section to RecipeDetailPanel + Tailwind list styling. |
| apps/web/src/components/recipe-detail/RecipeDetailHero.tsx | Migrates hero image to Card + CoverImage. |
| apps/web/src/components/recipe-detail/RecipeDetailHeader.tsx | Migrates header to new typography + RecipeTimes. |
| apps/web/src/components/recipe-detail/RecipeDetailBody.tsx | Inserts Separator between ingredients and steps. |
| apps/web/src/components/layout/shell.tsx | Adds Tailwind-based shell primitives + site brand block. |
| apps/web/src/components/layout/PageBackLink.tsx | Adds standardized back-navigation row using buttonVariants. |
| apps/web/README.md | Updates documentation to reflect Tailwind-based shell styling. |
| apps/web/COMPONENT_LIBRARY.md | Updates adoption + theme-token documentation for §4.7 completion. |
| .vscode/tailwind-css-v4-custom-data.json | Adds Tailwind v4 at-rule metadata for editor IntelliSense. |
| .vscode/settings.json | Adds Tailwind/CSS editor settings for v4 + apps/web CSS association. |
| .vscode/extensions.json | Recommends Tailwind CSS VS Code extension. |
Comments suppressed due to low confidence (1)
apps/web/src/pages/RecipePage.tsx:24
- There are page-level tests for
Home, butRecipePagehas no coverage for its key states (missing id -> error, API error -> alert, success -> renders detail). Adding aRecipePage.test.tsxsimilar toHome.test.tsxwould help prevent regressions while the UI is being refactored to shadcn-solid components.
export const RecipePage = (): JSX.Element => {
const params = useParams<{ id: string }>();
const [recipe] = createResource(
() => params.id,
async (id: string | undefined) => {
if (!id) {
throw new Error('Missing recipe id.');
}
const { data } = await getRecipeById({
path: { recipe_id: id },
throwOnError: true,
});
return data;
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…n, and related UI Made-with: Cursor
…age tests - Separator: aria-orientation when role=separator (non-decorative). - RecipePage: move aria-labelledby to a section around loaded detail only. - LoadingRegion: ComponentProps<div>, splitProps, merge class, spread rest. - Add RecipePage.test.tsx (success + API error) with MemoryRouter. Made-with: Cursor
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
Completes PLAN §4.7 for
apps/web: full shadcn-solid-style registry components, Tailwind utilities, a@themebridge to existing bread:roottokens, shared layout/typography primitives, editor settings for Tailwind v4, and follow-up refactors plus review-driven fixes.Scope
UI and styling
AppShell.cssandPage.css; app shell and pages use Tailwind and shared components.card,alert,skeleton,separator, and semantic token updates onbutton.typography(headings, body, muted text, recipe times),layout/shell(Shell*,SiteBrand,ShellFooterNote),PageBackLink,RecipeList,CoverImage,LoadingRegion,RecipeDetailPanel.HomeandRecipePageuse alerts, skeletons/loading regions, and the components above;RecipeCardrebuilt onCard+CoverImage.Separatorbetween ingredients and steps;RecipeDetailBodycomposes sections.Theme
src/index.css: Tailwind v4@thememaps bread CSS variables to semantic utilities (text-foreground,bg-card,border-border,text-primary,font-heading,shadow-bread,bg-header,bg-footer, etc.); dark mode still swaps:rootvalues.Documentation
PLAN.md: §4.7 marked complete.apps/web/COMPONENT_LIBRARY.md: adoption table, theme bridge, tooling notes.apps/web/README.md: shell styling points atAppShell.tsx(no separate shell CSS file).Editor (VS Code / Cursor)
.vscode/settings.json:css.customData,css.lint.unknownAtRules, Tailwindfiles.associationsforapps/webCSS,tailwindCSS.experimental.configFile, recommended extension list updated..vscode/tailwind-css-v4-custom-data.json: registers Tailwind v4 at-rules for the built-in CSS language service..vscode/extensions.json: recommends Tailwind CSS IntelliSense.Refactors (follow-up commits)
shell,PageBackLink,LoadingRegion,RecipeList,typographywhere applicable.Review-driven fixes (Copilot)
Separator:aria-orientationwhendecorative={false}androle="separator"(with a Biome note where the linter cannot infer conditional role).RecipePage:aria-labelledby="recipe-title"only on a<section>wrapping loaded content so the id reference is valid (not onarticleduring loading/error).LoadingRegion:ComponentProps<'div'>,splitProps, mergedclass,...reston the root element.RecipePage.test.tsx:MemoryRouter+createMemoryHistory, mockedgetRecipeById— success (heading) and API error (alert).Verification
pnpm exec biome check .andpnpm testinapps/web(Vitest: Home, App, RecipePage).