Implement archive review UI.
Review Request #10794 — Created Nov. 9, 2019 and updated
Currently there is no binary file support for RB, exluding my other
changes. With this arhive files can be posted and reviewed at a
basic level. Reviewers can look through a repersentation of the archive
proposed to be submitted. No support for commonenting or presenting the
actual changes is include in this PR as that was out of scope. The
archive is represented as a JSON file tree and does not have any css or
less changes to make it more unified with the rest of RB. These style
changes will need to be included in a later review request. The JSON
file tree is created using a library called JSTree and is currently
under a MIT license, https://github.com/vakata/jstree/. This feature
does require the changes from my other binary file PRs to function.
Specifically: r/10729, r/10728, and one change from r/10766.
Create a test repo and walked through the steps of a review process.
Posted change, look and interacted with change, then shipped change.
Also wrote tests for parsing the archive files; empty, one level,
and multi level archives.
Summary | ID |
---|---|
f992ac6290d7362341c0b2b8c5c093e819df4d40 | |
730b85ed79a0b37147f1893cf7ae5377ea7c8b95 | |
4c0eef1642bedf4762de12fe84ea2c2cbe085dde | |
2ec0d0c00038aa54cf5c8428d63de161210a5e06 | |
7cda64657498e5996b0bb6696e19ba23c42acebd | |
c4de14a0d5e5c0bdaf2c61ad580160e6ef24917a | |
5565f90571992d3ef0383f1e2e8889b416c6dc4c |
Description | From | Last Updated |
---|---|---|
E302 expected 2 blank lines, found 1 |
reviewbot | |
F841 local variable 'serialized_comments' is assigned to but never used |
reviewbot | |
W292 no newline at end of file |
reviewbot | |
Col: 46 Missing semicolon. |
reviewbot | |
Col: 29 'obj' is defined but never used. |
reviewbot | |
E401 multiple imports on one line |
reviewbot | |
E302 expected 2 blank lines, found 1 |
reviewbot | |
F841 local variable 'serialized_comments' is assigned to but never used |
reviewbot | |
W292 no newline at end of file |
reviewbot | |
Col: 13 Do not use 'new' for side effects. |
reviewbot | |
E501 line too long (95 > 79 characters) |
reviewbot | |
E401 multiple imports on one line |
reviewbot | |
E302 expected 2 blank lines, found 1 |
reviewbot | |
F841 local variable 'serialized_comments' is assigned to but never used |
reviewbot | |
E265 block comment should start with '# ' |
reviewbot | |
E303 too many blank lines (2) |
reviewbot | |
E226 missing whitespace around arithmetic operator |
reviewbot | |
Col: 39 Expected '===' and instead saw '=='. |
reviewbot | |
Col: 99 Expected '!==' and instead saw '!='. |
reviewbot | |
Col: 173 Expected an assignment or function call and instead saw an expression. |
reviewbot | |
Col: 174 Missing semicolon. |
reviewbot | |
Col: 677 Expected an assignment or function call and instead saw an expression. |
reviewbot | |
Col: 678 Missing semicolon. |
reviewbot | |
Col: 716 Missing semicolon. |
reviewbot | |
Col: 802 Expected an assignment or function call and instead saw an expression. |
reviewbot | |
Col: 803 Missing semicolon. |
reviewbot | |
Col: 999 Expected an assignment or function call and instead saw an expression. |
reviewbot | |
Col: 1000 Missing semicolon. |
reviewbot | |
Col: 1111 Expected '{' and instead saw 'try'. |
reviewbot | |
Col: 1121 Missing semicolon. |
reviewbot | |
Col: 1149 Expected '{' and instead saw 'try'. |
reviewbot | |
Col: 1196 Missing semicolon. |
reviewbot | |
Col: 1385 Missing semicolon. |
reviewbot | |
Col: 1389 Missing semicolon. |
reviewbot | |
Col: 1431 Expected '===' and instead saw '=='. |
reviewbot | |
Col: 1500 Confusing use of '!'. |
reviewbot | |
Col: 1688 Confusing use of '!'. |
reviewbot | |
Col: 1728 Missing semicolon. |
reviewbot | |
Col: 1757 Missing semicolon. |
reviewbot | |
Col: 1887 Missing semicolon. |
reviewbot | |
Col: 1888 Missing semicolon. |
reviewbot | |
Col: 2267 Expected an assignment or function call and instead saw an expression. |
reviewbot | |
Col: 2268 Missing semicolon. |
reviewbot | |
Col: 2331 Expected an assignment or function call and instead saw an expression. |
reviewbot | |
Col: 2332 Missing semicolon. |
reviewbot | |
Col: 2403 Expected '{' and instead saw 'this'. |
reviewbot | |
Col: 2558 Expected an assignment or function call and instead saw an expression. |
reviewbot | |
E302 expected 2 blank lines, found 1 |
reviewbot | |
W292 no newline at end of file |
reviewbot | |
E226 missing whitespace around arithmetic operator |
reviewbot | |
Col: 39 Expected '===' and instead saw '=='. |
reviewbot | |
Col: 99 Expected '!==' and instead saw '!='. |
reviewbot | |
Col: 173 Expected an assignment or function call and instead saw an expression. |
reviewbot | |
Col: 677 Expected an assignment or function call and instead saw an expression. |
reviewbot | |
Col: 678 Missing semicolon. |
reviewbot | |
Col: 716 Missing semicolon. |
reviewbot | |
Col: 802 Expected an assignment or function call and instead saw an expression. |
reviewbot | |
Col: 803 Missing semicolon. |
reviewbot | |
Col: 999 Expected an assignment or function call and instead saw an expression. |
reviewbot | |
Col: 1000 Missing semicolon. |
reviewbot | |
Col: 1111 Expected '{' and instead saw 'try'. |
reviewbot | |
Col: 1121 Missing semicolon. |
reviewbot | |
Col: 1149 Expected '{' and instead saw 'try'. |
reviewbot | |
Col: 1196 Missing semicolon. |
reviewbot | |
Col: 174 Missing semicolon. |
reviewbot | |
Col: 1385 Missing semicolon. |
reviewbot | |
Col: 1389 Missing semicolon. |
reviewbot | |
Col: 1431 Expected '===' and instead saw '=='. |
reviewbot | |
Col: 1500 Confusing use of '!'. |
reviewbot | |
Col: 1688 Confusing use of '!'. |
reviewbot | |
Col: 1728 Missing semicolon. |
reviewbot | |
Col: 1757 Missing semicolon. |
reviewbot | |
Col: 1888 Missing semicolon. |
reviewbot | |
Col: 2267 Expected an assignment or function call and instead saw an expression. |
reviewbot | |
Col: 2268 Missing semicolon. |
reviewbot | |
Col: 2331 Expected an assignment or function call and instead saw an expression. |
reviewbot | |
Col: 2332 Missing semicolon. |
reviewbot | |
Col: 2403 Expected '{' and instead saw 'this'. |
reviewbot | |
Col: 2558 Expected an assignment or function call and instead saw an expression. |
reviewbot | |
Col: 1887 Missing semicolon. |
reviewbot | |
The rest of this file is sorted. |
brennie | |
I think you copied this docstring and did update it. |
brennie | |
Missing docstring. |
brennie | |
Missing docstring. |
brennie | |
Missing docstring. |
brennie | |
Missing docstring. |
brennie | |
Missing file-level docstring. |
brennie | |
Missing class docstring. |
brennie | |
Missing docstring. |
brennie | |
TODO. |
brennie | |
nit: blank line between these. |
brennie | |
Missing docstring. |
brennie | |
nit: blank line between these. |
brennie | |
Missing docstring. Typo: "recurse" |
brennie | |
nit: blank line between these. |
brennie | |
nit: add a trailing comma |
brennie | |
Col: 39 Expected '===' and instead saw '=='. |
reviewbot | |
Col: 99 Expected '!==' and instead saw '!='. |
reviewbot | |
Col: 173 Expected an assignment or function call and instead saw an expression. |
reviewbot | |
Col: 174 Missing semicolon. |
reviewbot | |
Col: 677 Expected an assignment or function call and instead saw an expression. |
reviewbot | |
Col: 678 Missing semicolon. |
reviewbot | |
Col: 716 Missing semicolon. |
reviewbot | |
Col: 802 Expected an assignment or function call and instead saw an expression. |
reviewbot | |
Col: 803 Missing semicolon. |
reviewbot | |
Col: 999 Expected an assignment or function call and instead saw an expression. |
reviewbot | |
Col: 1000 Missing semicolon. |
reviewbot | |
Col: 1111 Expected '{' and instead saw 'try'. |
reviewbot | |
Col: 1121 Missing semicolon. |
reviewbot | |
Col: 1149 Expected '{' and instead saw 'try'. |
reviewbot | |
Col: 1196 Missing semicolon. |
reviewbot | |
Col: 1385 Missing semicolon. |
reviewbot | |
Col: 1389 Missing semicolon. |
reviewbot | |
Col: 1431 Expected '===' and instead saw '=='. |
reviewbot | |
Col: 1500 Confusing use of '!'. |
reviewbot | |
Col: 1688 Confusing use of '!'. |
reviewbot | |
Col: 1728 Missing semicolon. |
reviewbot | |
Col: 1757 Missing semicolon. |
reviewbot | |
Col: 1887 Missing semicolon. |
reviewbot | |
Col: 1888 Missing semicolon. |
reviewbot | |
Col: 2267 Expected an assignment or function call and instead saw an expression. |
reviewbot | |
Col: 2268 Missing semicolon. |
reviewbot | |
Col: 2331 Expected an assignment or function call and instead saw an expression. |
reviewbot | |
Col: 2332 Missing semicolon. |
reviewbot | |
Col: 2403 Expected '{' and instead saw 'this'. |
reviewbot | |
Col: 2558 Expected an assignment or function call and instead saw an expression. |
reviewbot | |
We don't need to specify empty initialize methods |
brennie | |
nit: remove this line. |
brennie | |
nit: remove this line. |
brennie | |
Leftover debug logging? |
brennie | |
Since reviewboard already uses fontawesome which has its own loading spinners, it may be better to replace the occurrences of … |
amalik2 | |
I'm most likely wrong about this since I know very little about licensing but I think that even for permissive … |
amalik2 | |
Col: 39 Expected '===' and instead saw '=='. |
reviewbot | |
Col: 99 Expected '!==' and instead saw '!='. |
reviewbot | |
Col: 173 Expected an assignment or function call and instead saw an expression. |
reviewbot | |
Col: 174 Missing semicolon. |
reviewbot | |
Col: 677 Expected an assignment or function call and instead saw an expression. |
reviewbot | |
Col: 678 Missing semicolon. |
reviewbot | |
Col: 716 Missing semicolon. |
reviewbot | |
Col: 802 Expected an assignment or function call and instead saw an expression. |
reviewbot | |
Col: 803 Missing semicolon. |
reviewbot | |
Col: 999 Expected an assignment or function call and instead saw an expression. |
reviewbot | |
Col: 1000 Missing semicolon. |
reviewbot | |
Col: 1111 Expected '{' and instead saw 'try'. |
reviewbot | |
Col: 1121 Missing semicolon. |
reviewbot | |
Col: 1149 Expected '{' and instead saw 'try'. |
reviewbot | |
Col: 1196 Missing semicolon. |
reviewbot | |
Col: 1385 Missing semicolon. |
reviewbot | |
Col: 1389 Missing semicolon. |
reviewbot | |
Col: 1431 Expected '===' and instead saw '=='. |
reviewbot | |
Col: 1500 Confusing use of '!'. |
reviewbot | |
Col: 1688 Confusing use of '!'. |
reviewbot | |
Col: 1728 Missing semicolon. |
reviewbot | |
Col: 1757 Missing semicolon. |
reviewbot | |
Col: 1887 Missing semicolon. |
reviewbot | |
Col: 1888 Missing semicolon. |
reviewbot | |
Col: 2267 Expected an assignment or function call and instead saw an expression. |
reviewbot | |
Col: 2268 Missing semicolon. |
reviewbot | |
Col: 2331 Expected an assignment or function call and instead saw an expression. |
reviewbot | |
Col: 2332 Missing semicolon. |
reviewbot | |
Col: 2403 Expected '{' and instead saw 'this'. |
reviewbot | |
Col: 2558 Expected an assignment or function call and instead saw an expression. |
reviewbot | |
diffAgainstArchiveMetadata should also be mentioned in the docstring |
amalik2 | |
Should this be mode? The subclasses of BaseArchiveView define mode instead of node. |
amalik2 | |
Did you define CSS classes anywhere for the different subclasses of BaseArchiveView? I can't find anything by doing a search … |
amalik2 | |
I'm curious as to how this works... does jstree modify the String prototype to add a jstree method to it? |
amalik2 | |
Single quotes should be used |
amalik2 | |
Where/how is this used? I don't see any usages in this file |
amalik2 | |
Where/how is this used? I don't see any usages in this file |
amalik2 | |
Where/how is this used? I don't see any usages in this file |
amalik2 | |
What is this used for? |
amalik2 | |
Is there a revision selector slider that gets rendered somewhere? (the text/image based review UIs have it) |
amalik2 | |
Not a huge deal but in general, using Boolean(value) is easier to understand than !!value |
amalik2 | |
Wouldn't this crash if there is a diff type mismatch? this._archiveView looks like it would be undefined in that situation. |
amalik2 | |
To be more consistent with the other CSS files, it would be better to rename the css file to something … |
amalik2 | |
Col: 39 Expected '===' and instead saw '=='. |
reviewbot | |
Col: 99 Expected '!==' and instead saw '!='. |
reviewbot | |
Col: 173 Expected an assignment or function call and instead saw an expression. |
reviewbot | |
Col: 174 Missing semicolon. |
reviewbot | |
Col: 677 Expected an assignment or function call and instead saw an expression. |
reviewbot | |
Col: 678 Missing semicolon. |
reviewbot | |
Col: 716 Missing semicolon. |
reviewbot | |
Col: 802 Expected an assignment or function call and instead saw an expression. |
reviewbot | |
Col: 803 Missing semicolon. |
reviewbot | |
Col: 999 Expected an assignment or function call and instead saw an expression. |
reviewbot | |
Col: 1000 Missing semicolon. |
reviewbot | |
Col: 1111 Expected '{' and instead saw 'try'. |
reviewbot | |
Col: 1121 Missing semicolon. |
reviewbot | |
Col: 1149 Expected '{' and instead saw 'try'. |
reviewbot | |
Col: 1196 Missing semicolon. |
reviewbot | |
Col: 1385 Missing semicolon. |
reviewbot | |
Col: 1389 Missing semicolon. |
reviewbot | |
Col: 1431 Expected '===' and instead saw '=='. |
reviewbot | |
Col: 1500 Confusing use of '!'. |
reviewbot | |
Col: 1688 Confusing use of '!'. |
reviewbot | |
Col: 1728 Missing semicolon. |
reviewbot | |
Col: 1757 Missing semicolon. |
reviewbot | |
Col: 1887 Missing semicolon. |
reviewbot | |
Col: 1888 Missing semicolon. |
reviewbot | |
Col: 2267 Expected an assignment or function call and instead saw an expression. |
reviewbot | |
Col: 2268 Missing semicolon. |
reviewbot | |
Col: 2331 Expected an assignment or function call and instead saw an expression. |
reviewbot | |
Col: 2332 Missing semicolon. |
reviewbot | |
Col: 2403 Expected '{' and instead saw 'this'. |
reviewbot | |
Col: 2558 Expected an assignment or function call and instead saw an expression. |
reviewbot |
- Commits:
-
Summary ID 8cde8e072e6ecb8b89fbbf5f1c8dff80c79d4482 a124db6397d047737a4c049f59ba4e667963bfbe 8dd1f82aaca9f468f7dc25a8be8b2b87677961a1
- Commits:
-
Summary ID a124db6397d047737a4c049f59ba4e667963bfbe 8dd1f82aaca9f468f7dc25a8be8b2b87677961a1 a124db6397d047737a4c049f59ba4e667963bfbe 8dd1f82aaca9f468f7dc25a8be8b2b87677961a1 ff10db2261cb13ad5e52bd56240b8cce0564e70e - Diff:
-
Revision 3 (+5730 -5144)
Checks run (2 failed)
flake8
JSHint
-
Warning: Showing 30 of 51 failures.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Summary:
-
WIP: Archive Review UIArchive Review UI
- Description:
-
~ base framework for archive review ui
~ Currently there is no binary file support for RB, exluding my other changes. With this arhive files can be posted and reviewed at a basic level. Reviewers can look through a repersentation of the archive proposed to be submitted. No support for commonenting or presenting the actual changes is include in this PR as that was out of scope. The archive is represented as a JSON file tree and does not have any css or less changes to make it more unified with the rest of RB. These style changes will need to be included in a later review request. The JSON file tree is created using a library called JSTree and is currently under a MIT license, https://github.com/vakata/jstree/. This feature does require the changes from my other binary file PRs to function. Specifically: r/10729, r/10728, and one change from r/10766.
- Testing Done:
-
+ Create a test repo and walked through the steps of a review process. Posted change, look and interacted with change, then shipped change. Also wrote tests for parsing the archive files; empty, one level, and multi level archives.
- Commits:
-
Summary ID a124db6397d047737a4c049f59ba4e667963bfbe 8dd1f82aaca9f468f7dc25a8be8b2b87677961a1 ff10db2261cb13ad5e52bd56240b8cce0564e70e f992ac6290d7362341c0b2b8c5c093e819df4d40 730b85ed79a0b37147f1893cf7ae5377ea7c8b95 4c0eef1642bedf4762de12fe84ea2c2cbe085dde 2ec0d0c00038aa54cf5c8428d63de161210a5e06 - Diff:
-
Revision 4 (+5847 -5165)
Checks run (2 failed)
flake8
JSHint
-
Warning: Showing 30 of 51 failures.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Commits:
-
Summary ID f992ac6290d7362341c0b2b8c5c093e819df4d40 730b85ed79a0b37147f1893cf7ae5377ea7c8b95 4c0eef1642bedf4762de12fe84ea2c2cbe085dde 2ec0d0c00038aa54cf5c8428d63de161210a5e06 f992ac6290d7362341c0b2b8c5c093e819df4d40 730b85ed79a0b37147f1893cf7ae5377ea7c8b95 4c0eef1642bedf4762de12fe84ea2c2cbe085dde 2ec0d0c00038aa54cf5c8428d63de161210a5e06 7cda64657498e5996b0bb6696e19ba23c42acebd - Diff:
-
Revision 5 (+5851 -5167)
Checks run (1 failed, 1 succeeded)
JSHint
-
Warning: Showing 30 of 51 failures.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Description:
-
~ Currently there is no binary file support for RB, exluding my other changes. With this arhive files can be posted and reviewed at a basic level. Reviewers can look through a repersentation of the archive proposed to be submitted. No support for commonenting or presenting the actual changes is include in this PR as that was out of scope. The archive is represented as a JSON file tree and does not have any css or less changes to make it more unified with the rest of RB. These style changes will need to be included in a later review request. The JSON file tree is created using a library called JSTree and is currently under a MIT license, https://github.com/vakata/jstree/. This feature does require the changes from my other binary file PRs to function. Specifically: r/10729, r/10728, and one change from r/10766.
~ Currently there is no binary file support for RB, exluding my other
+ changes. With this arhive files can be posted and reviewed at a + basic level. Reviewers can look through a repersentation of the archive + proposed to be submitted. No support for commonenting or presenting the + actual changes is include in this PR as that was out of scope. The + archive is represented as a JSON file tree and does not have any css or + less changes to make it more unified with the rest of RB. These style + changes will need to be included in a later review request. The JSON + file tree is created using a library called JSTree and is currently + under a MIT license, https://github.com/vakata/jstree/. This feature + does require the changes from my other binary file PRs to function. + Specifically: r/10729, r/10728, and one change from r/10766. - Testing Done:
-
~ Create a test repo and walked through the steps of a review process. Posted change, look and interacted with change, then shipped change. Also wrote tests for parsing the archive files; empty, one level, and multi level archives.
~ Create a test repo and walked through the steps of a review process.
+ Posted change, look and interacted with change, then shipped change. + Also wrote tests for parsing the archive files; empty, one level, + and multi level archives.
- Commits:
-
Summary ID f992ac6290d7362341c0b2b8c5c093e819df4d40 730b85ed79a0b37147f1893cf7ae5377ea7c8b95 4c0eef1642bedf4762de12fe84ea2c2cbe085dde 2ec0d0c00038aa54cf5c8428d63de161210a5e06 7cda64657498e5996b0bb6696e19ba23c42acebd f992ac6290d7362341c0b2b8c5c093e819df4d40 730b85ed79a0b37147f1893cf7ae5377ea7c8b95 4c0eef1642bedf4762de12fe84ea2c2cbe085dde 2ec0d0c00038aa54cf5c8428d63de161210a5e06 7cda64657498e5996b0bb6696e19ba23c42acebd c4de14a0d5e5c0bdaf2c61ad580160e6ef24917a - Diff:
-
Revision 6 (+5907 -5187)
Checks run (1 failed, 1 succeeded)
JSHint
-
Warning: Showing 30 of 51 failures.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Since reviewboard already uses fontawesome which has its own loading spinners, it may be better to replace the occurrences of
background:url("throbber.gif")
in this CSS file with the fontawesome equivalent. That way, you wouldn't need to add in the throbber.gif file -
I'm most likely wrong about this since I know very little about licensing but I think that even for permissive licenses like MIT, you need to put the entire license text where you use the code. You probably should verify this with the mentors
-
-
-
Did you define CSS classes anywhere for the different subclasses of BaseArchiveView? I can't find anything by doing a search for 'archive-diff-'
-
I'm curious as to how this works... does jstree modify the String prototype to add a
jstree
method to it? -
-
-
-
-
-
Is there a revision selector slider that gets rendered somewhere? (the text/image based review UIs have it)
-
-
Wouldn't this crash if there is a diff type mismatch?
this._archiveView
looks like it would be undefined in that situation. -
To be more consistent with the other CSS files, it would be better to rename the css file to something like
jstree.min.css
, and then move it outside of thejstree
folder (and remove thejstree
folder altogether)
- Commits:
-
Summary ID f992ac6290d7362341c0b2b8c5c093e819df4d40 730b85ed79a0b37147f1893cf7ae5377ea7c8b95 4c0eef1642bedf4762de12fe84ea2c2cbe085dde 2ec0d0c00038aa54cf5c8428d63de161210a5e06 7cda64657498e5996b0bb6696e19ba23c42acebd c4de14a0d5e5c0bdaf2c61ad580160e6ef24917a f992ac6290d7362341c0b2b8c5c093e819df4d40 730b85ed79a0b37147f1893cf7ae5377ea7c8b95 4c0eef1642bedf4762de12fe84ea2c2cbe085dde 2ec0d0c00038aa54cf5c8428d63de161210a5e06 7cda64657498e5996b0bb6696e19ba23c42acebd c4de14a0d5e5c0bdaf2c61ad580160e6ef24917a 5565f90571992d3ef0383f1e2e8889b416c6dc4c - Diff:
-
Revision 7 (+5903 -5199)
- Added Files:
Checks run (1 failed, 1 succeeded)
JSHint
-
Warning: Showing 30 of 51 failures.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-