Tutorial feedback: styling for scaffolded /posts not working

I love the project and the tutorial was a blast. Very well done!

One thing that irritated me a lot is that screenshots of /posts was looking different than mine.

The styling of the layout in /posts or later /admin/posts is not working at all, instead they are unstyled like the rest of the app.

The scaffold.css file exists and PostLayout.js references the classes.

However in the resulting app the .css is empty

Maybe it’s just me since I had to rollback changes of scaffolding onces.

Other tutorial feedback

  • in Visual studio code running yarn rw db save for the first time will ask about creating the db and then hang (instead of continuing to ask for migration name). I had to terminate it and run yarn rw db save again
  • the code samples are great and easy to copy, for the longer ones it would be amazing to have a highlight of the changed parts like a diff
  • I was unable to make the Standard HTML required: validation show up both in FF and Chrome

Hi @janmechtel thanks for the feedback!

Your scaffolded posts pages should definitely be styled. Can you check and see if you got a scaffold.css file created in web/src and is that file imported in web/src/index.js?

We are looking at showing some kind of “only this code changed” in our code blocks.

So the standard required HTML attribute wasn’t showing the browser-specific warning about a field being required? When we do the first version of required that goes outside of the validation prop, it’s a regular HTML attribute, correct? Only when we start showing Redwood form validation does it now go inside validiation: { required: true }. Are you sure that’s the case in your code?

Yes it exists.

No it’s not mentioned. Maybe i lost that in some revert? Adding it there fixed it.

Yes and yes.
(I guess this probably doesn’t belong here then. It just irritated me for a while because the simple required seemed to have no effect at all.)

Yes, from here everything was working normal again.

Hi @janmechtel Thanks for the kind words and truly appreciate the feedback + info about trip ups. A few things you mentioned have me wondering as well about possible bugs.

From your RedwoodBlog App directory, could you run yarn rw info and then paste the output here? Thanks!

yarn rw info

OS: Windows 10 10.0.18362
Node: 13.12.0 - C:\Users\JANMEC~1\AppData\Local\Temp\yarn–1585825816555-0.9549785516405065\node.CMD
Yarn: 1.22.0 - C:\Users\JANMEC~1\AppData\Local\Temp\yarn–1585825816555-0.9549785516405065\yarn.CMD
Edge: 44.18362.449.0

1 Like

I did the tutorial again to setup my real project.

This error did not happen again and import scaffold.css was correctly added to index.js

So all good.

However the “yarn rw db save” was stuck (after the first prompt whether to create dev.db) and has to be run again to trigger the prompt for migration name.

Hi @janmechtel Checking back here – thanks for reporting the issue with yarn rw db save We believe this is an issue with Prisma on Windows but has hopefully been fixed in a new release since you experienced it. But please let us know if not.

1 Like