Scaffold generator with combined edit + view?

I love how quick it is to scaffold out a CRUD interface with Redwood, but the resulting scaffold feels a bit outdated. These days admin UIs barely ever have a single item “view” page separate from “edit”- the two views are generally combined and you can edit things inline as needed (and as permissions allow).

Has anyone built out a scaffold generator like this or is there any appetite for shifting in that direction with the built-in Redwood generator?

1 Like

Hi @jason-curtis do you mean a slide over UI as shown in TailwindUI here: Slide-overs - Official Tailwind CSS UI Components?

It’s completely doable - the action to edit would not be a navigation link, but “some event” that would reveal the slide over and pass the id or so to the component that would then fetch the data and present the form.

I think if you implement it, it would need a change to the and Cell and EditCell and s components – but I’m not sure where the slide over might go. Maybe it’s generic and in a layout and the action of editing puts the edit cell and form there? I’m not the best react developer … but I’d try to manually implement it first and then reverse back into the component types to modify the generator templates.

I was catching up on my Syntax.FM listening and they were interviewing the guy behind: Payload. Payload is Rails for JS with TypeScript, React and Drizzle (James Mikrut) - Syntax #700

I wonder if we could leverage off that somehow…

Maybe it’s generic and in a layout and the action of editing puts the edit cell and form there

I was thinking of something more like this - just an edit view that feels like a view view until you try to edit something. It would remove the need for a separate Cell.

If I end up trying something out I’ll share it and you can help convert it to a scaffold.

Or maybe this would be against the intent of the scaffold code - is it helpful to generate a Cell even if the EditCell functionally has the superset of the Cell and EditCell functionality?