Skip to content

WIP: Integrate with single_mr_diff_view feature flag for the frontend

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.

  1. helpers/merge_requests_helper.rb and views/projects/merge_requests/show.html.haml get the feature flag into the JavaScript
  2. assets/javascripts/diffs/store/mutations.js, assets/javascripts/diffs/store/mutation_types.js, assets/javascripts/diffs/store/modules/diff_state.js, and assets/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.
  3. assets/javascripts/diffs/components/app.vue and assets/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.
  4. 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

Availability and Testing

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

Merge request reports