Implement Dynamic Overridden Indicator for Approval Rules
Implement Dynamic Overridden
indicator
Currently the Overridden
only appears after it's saved. Let's make it dynamic so it's a better user experience.
Background
This means the indicator will update when it senses changes to the form dynamically. But we think this will lead to confusing user experience. Because the user might infer that something is happening because the status has changed and assume the form is saved. Our MR form is currently built so that it is saved on submit NOT on change. So having a dynamic indicator doesn't feel consistent with the form's behavior.
Dynamic vs static indicator: I still believe that the dynamic indicator is the right way, because it provides feedback that will be helpful if the user want's to revert their changes (when we implement #212754 (closed) to reset to project defaults). I don't agree with the assumption that changing something on the form dynamically communicates that it's saved. When users add a new “local” rule, or edit an existing rule, the changes are instantaneous. But that doesn't mean they are saved.
Update !29315 (comment 321573898)
I know I mentioned that in this first iteration, the indicator would be static (only appear after save). And only in the next iteration would it be dynamic. However, because of how the FE is setup, I actually can have the indicator for Local Rules
Added for this merge request
to appear right away when the user adds it. Let me know if this is okay with you. But if you're worried if this is confusion (since theOverridden
is not dynamic), I can remove this -- so when it is first added, there will be no indicator. Have a look and let me know what you think😀
Reviewers dropdown
Let's also update the reviewer's dropdown to ensure the approval rules being displayed is dynamically updated.
Yes, that's because the reviewer is only populated during the first load. And doesn't get re-populated when rules are changed
😖 So you do have to save it first in order for the change to go through. But you raised a good point and it should be addressed👍 This will require a change to the
reviewers
implementation. We will probably have to implement some kind of temporary copy that is reactive to the changes from the approval rules. Since we can't simply just do another call to the BE, as the changes have yet been saved🤔 Definitely a bit more work involved, this will have to be handled in a follow-up 🥶