Design update - #1
Conversation
[no ci]
[no ci]
The file is a machine-specific yarn artifact (it stores systemParams like darwin-arm64-141), so it produced a spurious diff on every machine. There is no package.json and yarn.lock is empty, so it recorded nothing. Also adds /node_modules/ to .gitignore, which had no entry for it.
base.html.twig loaded https://cdn.tailwindcss.com plus an inline v3-format tailwind.config, bypassing symfonycasts/tailwind-bundle entirely. The theme now lives in assets/styles/app.css as a v4 @theme block, and the custom component rules moved there too, inside @layer components so utilities can override them. {% block javascripts %} is back to holding only importmap('app'), matching the Symfony recipe. Also adds the missing viewport meta, lang="en", and a {% block title %} the child templates can override. Dropped three theme entries with no uses anywhere: accent.light, boxShadow.glow and fontFamily.body, along with the .item-card rules.
The six items were hardcoded six times over in index.html.twig and show.html.twig
rendered a single unrelated item. They now live in a private const ITEMS keyed
by id, standing in for the Item entity until Doctrine takes over. show() looks
one up and 404s on a miss instead of ignoring its {id}.
Template fixes: three cards linked to the wrong item; index.html.twig emitted a
nested <body> and a trailing </html>; a dead <script src="data.js"> populated an
empty #item-grid via an undefined LOST_ITEMS; show.html.twig had a literal
${item.colorClass}, no image at all, and two href="index.html" links. The card
grid is now a list with per-item aria-labels and an empty state.
|
@kbond I added data fixtures to the project, but I got a bit confused about the difference between "factories" and "stories". I chose stories, but I'd like your opinion on which one fits better in this case |
| @@ -0,0 +1,4 @@ | |||
| # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | |||
| use function Zenstruck\Foundry\Persistence\persist; | ||
|
|
||
| #[AsFixture(name: 'items', groups: ['dev'])] | ||
| final class ItemStory extends Story |
There was a problem hiding this comment.
A story is a collection of factories.
I suggest a single AppStory for simple apps like this (what the recipe gives you). Then a factory for each entity.
See https://github.com/SymfonyCasts/symfony7/tree/ep6-security/src/Factory and https://github.com/SymfonyCasts/symfony7/tree/ep6-security/src/Story
| @@ -0,0 +1,116 @@ | |||
| # CLAUDE.md | |||
There was a problem hiding this comment.
How are we going to reconcile this with the course? The course should start without a CLAUDE.md, correct?
There was a problem hiding this comment.
I actually need it for writing the tutorial. I think I will just remove it from the start step after we've finished
There was a problem hiding this comment.
Ok perfect, I want the start of this to not have any whiff of ai
Full design update for course project