cool front-end feature? has anyone implemented fancier "dynamic per-section form editing" via stimulus?

A feature I've always wanted to implement, but didn't due to complexity in Rails (pre-stimulus) is to have dynamic per-element or per-section editing on a form that doesnt affect the rest of the page or require a page redraw.

I'm wondering if now that JSP incorporates stimulus if anyone has tried to get that to work?

For example the "show" for the form looks like normal, but each "sub-section" (partial) has its own "edit" button, and clicking edit switches to an edit partial for that section but the rest of the page remains as-is.

User displays "show" for a form with 3 sections:

[show partial for Contact Info]
[show partial for Preferences]
[show partial for Cool stuff]

User clicks "edit" for preferences, no page redraw, dynamically replaces Preferences partial

[show partial for Contact Info]
[edit partial for Preferences]
[show partial for Cool stuff]

User clicks "save" for that partial:

[show partial for Contact Info]
[show partial for Preferences] # shows the newly added info
[show partial for Cool stuff]

And for completeness each section ought to be independent, eg you could open the edit for any/all at same time.


Notifications
You’re not receiving notifications from this thread.
Subscribe
© 2021 GoRails, LLC