Skip to content

Show image file size in diff view

Thomas Randolph requested to merge 202196-show-image-file-size-in-diff-view into master

What does this MR do?

For #202196 (closed)

This change adds the file size to the single-image diff viewer, which is used when an image is added or deleted. In theory, it could also be used when a file is renamed, but in practice no image diff is rendered for a renamed file, and instead the text File moved is used instead.

Karma vs. Jest

When I first submitted this MR, a random Karma test was failing only on CI.
As a result of this, I moved the tests to Jest, as @jboyson indicated that had worked to a solve a similar problem of his.
After a bunch of pipeline failures across Karma over the last few days, I'm not confident this move was absolutely necessary - it may have just needed a bunch of rebase and pushes and it would have eventually worked.

That said, the move to Jest didn't introduce too many changes, and it's on our list of things to do anyway, so it would be intentionally creating tech debt to revert it.

Screenshots

Before After
image image

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 🤖 GitLab Bot 🤖

Merge request reports

Loading