Improvements to the code quality badge in the MR diff file header
What does this MR do?
This MR builds on !56710 (merged) to make improvements to the way we load the code quality data into the MR file diffs app and how we decide whether to show the code quality badge in the header when the MR makes changes to the code quality of a file.
Still need to:
-
address !56710 (comment 546815897):
I wonder if its better to access the
codequalityDiff
state directly in the component seeing as getters that return methods don't cache the result (https://vuex.vuejs.org/guide/getters.html#method-style-access)
-
rewrite ee/spec/frontend/diffs/components/diff_file_spec.js
now thatdiff_file
no longer gets passed acodequalityDiff
prop (and maybe other specs too) -
come up with a better error message for the createFlash
that is displayed when something goes wrong while loading the code quality diff data
Screenshots (strongly suggested)
There should be no visual changes, but here is the badge we're talking about:
Does this MR meet the acceptance criteria?
Conformity
-
📋 Does this MR need a changelog?-
I have included a changelog entry. -
I have not included a changelog entry because this is behind the :codequality_mr_diff
feature flag.
-
-
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Related to #267612 (closed)