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 18

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
fixed jshint problems
9be62ebc9f064d77463e3d958cdbb383dd5e32a3 aruslanov@fispan.com
dragging ability added; new button to switch between spanning and commenting ...
1ca946ca853b4c18f6be2032dcc607a1ee6a71c9 aruslanov@fispan.com
fixed dragging issue; reviewing the bug with scaling and dragging
8d0966d5ca11e4b18e6306fe7c0a1b1ed569681c aruslanov@fispan.com
fixed jshint issues
686ee924c529be45913ccd98be573922e2fea000 aruslanov@fispan.com
figuring out fetching within render
b4d94dc327afb9e25218d290576546b8bc0014eb aruslanov@fispan.com
finished transferring to SVGElementsAPI; buttons flushed out
8766e47c39664558f544aaf7bce3f6c9b1e5025e aruslanov@fispan.com
fixing some jshint issues
8debba864495af432a5fcbe60790abb4ece4b277 aruslanov@fispan.com
added documentation; cleaned up code
be17d29350ea52b0ebdd64b9d8b01379456c5ec3 aruslanov@fispan.com
fixed whitespace; added a method to stringify viewBox
009fbd5cf143509802c7b134ebceec40af20c982 aruslanov@fispan.com
fixed more whitespaces
80be40ed63dbe7eabf8ae06e853b374a27583d90 aruslanov@fispan.com
small bug with new method
befa38482a9ed08523e51f500dfffd1d73712644 aruslanov@fispan.com
mend
cbaea543b76976a7077252f4085eba1550c7949e aruslanov@fispan.com
Changes according to David's comments; made sure everything wraps nicely with...
32439633178192f77065896b91aae703ece28e99 aruslanov@fispan.com
missed out on some small whitespaces and semicolons
36ebf8bb1450f9afb7b34ba7e4eba62d934f463a aruslanov@fispan.com
comments are scaled with SVGs
695325381aae48ddf9dc8aa1ce7861c7a8333182 aruslanov@fispan.com
reviewboard/static/rb/css/pages/image-review-ui.less
reviewboard/static/rb/js/views/imageReviewableView.es6.js
reviewboard/static/rb/js/views/regionCommentBlockView.es6.js
Loading...