Add a way to see the diff for the currently edited rule #3597
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
One thing that bothered me recently while editing rules is that the form is very unhelpful wrt what got modified already. There's no way to know if you misclicked on a
xand no way to see the final state of the rule before you save it. This adds a button at the bottom showing you the number of changes and when clicked, pops a RuleCard comparing the current state of the rule with the one pre-edition.Worth noting that when editing a rule with scheduled changes, it will compare it against the currently used one instead of the one containing the scheduled changes.
The one thing that is a bit unfortunate is that I had to rewrite how the fabs work on this page to avoid having a third CSS rule to align a button... That's because the SpeedDial really wants its place in the bottom right and if we don't force the fab container 10rem to the right when it's present then it will be displayed below the speed dial.
Screenshots (taken on a tiny window to save space here...)
No changes to the rule:
With some changes:
When clicking on the "preview changes" button: