Highlight collapsed diffs in MRs
What does this MR do?
For #249251 (closed)
Adds a taller warning and more apparent button for expanding collapsed files.
Notable
-
Because there's currently no clean way to differentiate between automatically and manually collapsed files, this MR doesn't fully address #16047 (closed).
-
Because of some Webpack shenanigans, the L10n strings cannot go in the
constants.js
file, so I've created a newi18n.js
file just for those strings. Considering how many I18n strings are in the diffs sub-directory, this is probably a better separation anyway.
Webpack shenanigans
vitallium: there is a WebWorker
TreeWorker
which causes problems.app/assets/javascripts/diffs/store/actions.js
imports it on line 10. Webpack processes this import and adds file with constants to the processing pipeline.TreeWorker
import your constants but our locale functions rely onwindow
where we store all locale phrases during initialization. Butwindow
is not available in Web Workers.
vitallium: Our webpack configuration instructs to load any file ending with
_worker
withworker-loader
vitallium: Here is the dependency graph for the
tree_worker.js
Screenshots
Before | After |
---|---|
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 - [-] 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