Review UI for SVG Vector Graphics files

Review Request #11846 — Created Oct. 8, 2021 and updated — Latest diff uploaded

Information

Review Board
release-4.0.x

Reviewers

Currently ReviewBoard has a limited way of rendering SVG files and does
not allow for proper scaling and zooming. We are now attempting to utilize
SVG potential to full extent and allow users to inifinitely scale/zoom SVG images.

The new solution utilizes viewBox attribute of SVGs and attempts to manipulate it
in order to create zoom-in ability and ability to span SVG. Moreover, the solution
also dynamically rescales and adjusts comment boxes based on the viewBox.

Currently, the new features only apply to a single image, i.e. no diffs view.
The diff view with SVGs will behave the same way as with the bitmap images.
However, there is no ability to zoom in/out or span the SVG.

The UI was tested using Google Chrome and Safari.

Unit tests were but no additional tests were added.

Diff Revision 5

This is not the most recent revision of the diff. The latest diff is revision 21. See what's changed.

orig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

Commits

First Last Summary ID Author
wip initial
2570c36b4c1cd76fcefc9b869ac25065dfef62ba aruslanov@fispan.com
mousewheel works in parent view
48cb0d906cb2bec1390c1f6296c8bb161cfac556 aruslanov@fispan.com
clean up
753647f2c2d2688b96cd18dd421d114e37b4238f aruslanov@fispan.com
fixed event handling
e75fb177bb8e7094fbbb4bae97c8731335799bd7 aruslanov@fispan.com
onload question
1dfdaf59151afa2452efbd34176085d7082c408b aruslanov@fispan.com
reviewboard/static/rb/js/views/imageReviewableView.es6.js
Loading...