Convert the view and model for the diff viewer page to ES6.
Review Request #9152 — Created Aug. 25, 2017 and submitted
This updates the diff viewer page's view and model to ES6 and fixes up
the docs for our modern standards. The logic for these classes remains
the same, but the code has been streamlined by the usage of template
literals, consts/lets, and fat arrow functions.Upcoming work will build upon this to simplify the view further.
Unit tests pass.
Tested all functionality of the diff viewer (revision selection,
interdiffs, pagination, anchor navigation, commenting) to ensure
nothing broke.
Description | From | Last Updated |
---|---|---|
Args/Returns? |
david | |
Trailing comma? |
david | |
Args? |
david | |
Instead of a function-scoped variable created at the top, how about just setting const parts here? |
david | |
"Return". |
david | |
Convert this to a .forEach loop? |
david | |
forEach? |
david | |
This can be const [base, tip] = revisions; |
david | |
forEach? This can also be a lot more terse: this.diffReviewableViews.forEach(view => view.remove()); |
david | |
Trailing comma. |
david |
- Change Summary:
-
- Fixed some doc issues.
- Added missing trailing commas.
- Converted some
_.each()
statements to.forEach()
. - Changed the scope of a variable declaration.
- Commit:
-
73fe38b021e6bffd340eed22f95fb01d664128c50acc7cbf7b6cbac70939d267fa4d4c714fb51b5d