WIP: Integrate with single_mr_diff_view feature flag for the frontend
requested to merge 33183-request-inline-or-parallel-diffs-instead-fetching-all-data-from-backend-in-one-request-2 into master
What does this MR do?
This MR is the first set of changes for #33183 (closed).
It integrates the frontend with the feature flag and passes the appropriate value down to the Diffs Vue app root.
-
helpers/merge_requests_helper.rb
andviews/projects/merge_requests/show.html.haml
get the feature flag into the JavaScript -
assets/javascripts/diffs/store/mutations.js
,assets/javascripts/diffs/store/mutation_types.js
,assets/javascripts/diffs/store/modules/diff_state.js
, andassets/javascripts/diffs/store/actions.js
make Vuex aware of the new property and provides a mutation for modifying it. An existing action is also updated to use a new query parameter to integrate with the backend. -
assets/javascripts/diffs/components/app.vue
andassets/javascripts/diffs/index.js
ensure that the Diffs Vue app is aware of the new property coming from the HAML and set it to the Vuex state as soon as possible. - Everything else is to update existing Ruby/RoR tests and features to integrate with the now-enabled feature flag.
Note: The MR diffs view will not work if the feature flag is turned on, this is just integrating with the flag itself. Updating the UI behavior will be in a later MR.
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
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
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
Edited by Thomas Randolph