Improve error messages experience in pipeline editor
What does this MR do and why?
When multiple of the same error occurs in a row, the pipeline editor will scroll the user to the top of the file for each of them. However, if the user wants to fix the error by typing in the editor, then they will keep getting scrolled back to the top with each API call we do to validate CI configurations.
To avoid this, we only show errors and scroll to the top if a new type of error happens. This mean that if there is a 500 error, we show that error once. Then the user can keep working without any interruption. If they dismiss the alert and the same type of error occurs again, we won't show it (unless they refresh) because they have confirmed that they saw this error, so even if it occur again and is the same error, for the user it changes nothing.
If a new type of error occurs, then we show the new error. If the old error occurred again after, we will also show it again.
Screenshots or screen recordings
Before | After |
---|---|
scroll_before | scroll_after_1 |
How to set up and validate locally
- Go to Ci => Editor
- Type a snippet that triggers an error, for example:
include:
rules:
-
- Notice that the editor scrolls to the top and show an error message
- Go back to the editor and keep working
- Notice that the error is still there, but it doesn't scroll back to the top anymore
- Dismiss the alert
- Trigger another error with the same snippet as above
- Notice that no errors is shown
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.