Adds a 'rule state' section to the form, indicating whether a rule is draft, live, archived, as well as whether it has unpublished changes.
'Unpublished changes' means that the rule is published, and the draft rule has a different revision ID to the latest live rule. There's an edge case here – it means that someone may make and revert an edit, and the rule will still be marked as having unpublished changes. I think that's preferable to having to diff every 'contentful' field in a rule to figure this out (it's slower, and we must maintain that list as we add fields to our rules), but others may reasonably disagree!
To make room in the UI, we've consolidated the rule content and metadata parts of the form into a single section. This has the advantage of making the last updated time – updated 3 minutes ago – relate more clearly to the content of the rule (rather than e.g. its publication time.)
Before
After
How to test
Running locally or in code, move a rule between different states – archived, draft, published. Does the status respond accordingly? Does the layout change make sense?
co-authored-by: @Fweddi
What does this change?
Adds a 'rule state' section to the form, indicating whether a rule is draft, live, archived, as well as whether it has unpublished changes.
'Unpublished changes' means that the rule is published, and the draft rule has a different revision ID to the latest live rule. There's an edge case here – it means that someone may make and revert an edit, and the rule will still be marked as having unpublished changes. I think that's preferable to having to diff every 'contentful' field in a rule to figure this out (it's slower, and we must maintain that list as we add fields to our rules), but others may reasonably disagree!
To make room in the UI, we've consolidated the rule content and metadata parts of the form into a single section. This has the advantage of making the last updated time –
updated 3 minutes ago
– relate more clearly to the content of the rule (rather than e.g. its publication time.)How to test
Running locally or in code, move a rule between different states – archived, draft, published. Does the status respond accordingly? Does the layout change make sense?