Only expose 1 diff style in diffs endpoint
What does this MR do?
When enabling the single_mr_diff_view
feature flag, the backend will
only render one kind of diff: inline or parallel. The feature is
disabled for now until the frontend has been updated.
To switch the view, the frontend can pass a view
param containing
either inline
or parallel
. That will get written to a cookie. The
response for diff files will then contain either
highlighted_diff_lines
or parallel_diff_lines
but no longer both.
This is the backend part of #33183 (closed)
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry: Adding the changelog when the feature is enabled by default
- [-] Documentation created/updated or follow-up review issue created
-
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 🤖 GitLab Bot 🤖