Closed jonathonherbert closed 1 year ago
Works really well, feels intuitive to me, and code looks good.
I think one bit of functionality missing now that I try it is an equivalent of the discard functionality, or an undo. As an example user story:
Compounding that, it looks as if the changes are published to them, because the status says 'Live'
For example, a unpublished replacement:
For an unpublished draft the current setup is probably fine but it does feel like a reset (perhaps on a field basis?) should be possible when there's a published version. The 'has unpublished changes status' card would help (a bit) with the 'unpublished changes appearing to be live' problem. Though better still would be some kind of 'unpublished change indicator' alongside the specific fields that have been updated.
What does this change?
Adds autosave on rule edit for every field. Adds 'updated at' text that's refreshed on update, and periodically rerendered to ensure it doesn't get stale.
Removes the 'update' button, which is no longer needed.
How to test
Have a go at editing a rule. It should update as expected after a short delay, and the updated time should change as expected, even when not editing (currently it refreshes every 10 seconds, which felt about right, not too distracting!)