Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Issue 2352293002: MD History: Replace app-route with a custom router (Closed)

Created:
4 years, 3 months ago by tsergeant
Modified:
4 years, 3 months ago
Reviewers:
calamity, Dan Beam
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org, asanka, dbeam+watch-polymer_chromium.org, michaelpg+watch-polymer_chromium.org, Patrick Dubroy, michaelpg+watch-md-ui_chromium.org, dbeam+watch-history_chromium.org, pam+watch_chromium.org, arv+watch_chromium.org, oshima+watch_chromium.org, dbeam+watch-downloads_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MD History: Replace app-route with a custom router app-route is a fairly heavy-weight element, supporting complex routing patterns designed for large pages. This is unnecessary for MD History, which currently has one routing pattern and one query parameter. This CL replaces app-route with a custom router, <history-router>, which is responsible for two-way binding between the page state and the page URL. This also refactors handling of search terms elsewhere in the app to ensure that changes to the search term are reflected correctly across the page. This CL has a small positive impact on load time (~20ms on a Z620), code health (all routing is handled in one place) and binary size (app-route can be deleted from the binary). BUG=629710 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/73e5d0ee1756905fbb7d9ca932394735ac2a2f67 Cr-Commit-Position: refs/heads/master@{#420590}

Patch Set 1 #

Patch Set 2 : Rebase, cleanup #

Patch Set 3 : More minor cleanup #

Total comments: 15

Patch Set 4 : Rebase #

Patch Set 5 : calamity@ review #

Patch Set 6 : More calamity@ review #

Patch Set 7 : Rebase #

Total comments: 2

Patch Set 8 : Delete stray newline #

Unified diffs Side-by-side diffs Delta from patch set Stats (+722 lines, -963 lines) Patch
M chrome/browser/browser_resources.grd View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/resources/md_history/app.html View 1 2 3 4 5 6 4 chunks +9 lines, -11 lines 0 comments Download
M chrome/browser/resources/md_history/app.js View 1 2 3 4 5 6 10 chunks +12 lines, -63 lines 0 comments Download
M chrome/browser/resources/md_history/app.crisper.js View 1 2 3 4 5 6 17 chunks +527 lines, -819 lines 0 comments Download
M chrome/browser/resources/md_history/app.vulcanized.html View 1 2 3 4 5 6 5 chunks +16 lines, -17 lines 0 comments Download
M chrome/browser/resources/md_history/compiled_resources2.gyp View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/resources/md_history/history_toolbar.js View 1 2 3 4 5 4 chunks +16 lines, -20 lines 0 comments Download
M chrome/browser/resources/md_history/list_container.js View 1 2 3 4 5 6 7 3 chunks +13 lines, -1 line 0 comments Download
A chrome/browser/resources/md_history/router.html View 1 2 3 4 1 chunk +13 lines, -0 lines 0 comments Download
A chrome/browser/resources/md_history/router.js View 1 2 3 4 1 chunk +63 lines, -0 lines 0 comments Download
M chrome/browser/resources/md_history/side_bar.html View 1 2 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/browser/resources/md_history/side_bar.js View 1 2 2 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/ui/webui/md_history_ui.cc View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/test/data/webui/md_history/history_routing_test.js View 1 2 3 4 5 6 2 chunks +32 lines, -24 lines 0 comments Download
M third_party/polymer/v1_0/find_unused_elements.py View 1 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 33 (23 generated)
tsergeant
https://codereview.chromium.org/2352293002/diff/40001/chrome/browser/resources/md_history/app.js File chrome/browser/resources/md_history/app.js (right): https://codereview.chromium.org/2352293002/diff/40001/chrome/browser/resources/md_history/app.js#newcode273 chrome/browser/resources/md_history/app.js:273: if (this.$.content.selectedItem) { These guards are necessary because of ...
4 years, 3 months ago (2016-09-21 07:57:47 UTC) #9
calamity
lgtm. https://codereview.chromium.org/2352293002/diff/40001/chrome/browser/resources/md_downloads/vulcanized.html File chrome/browser/resources/md_downloads/vulcanized.html (right): https://codereview.chromium.org/2352293002/diff/40001/chrome/browser/resources/md_downloads/vulcanized.html#newcode3157 chrome/browser/resources/md_downloads/vulcanized.html:3157: <g id="delete"><path d="M6 19c0 1.1.9 2 2 2h8c1.1 ...
4 years, 3 months ago (2016-09-22 05:12:26 UTC) #12
tsergeant
+dbeam@ for find_unused_elements.py. I've got a follow-up patch to delete app-route ready to go, I ...
4 years, 3 months ago (2016-09-22 23:57:42 UTC) #14
tsergeant
Actually +dbeam this time.
4 years, 3 months ago (2016-09-22 23:58:02 UTC) #16
tsergeant
Whoops, I totally missed a couple of comments. I'm not having a good run with ...
4 years, 3 months ago (2016-09-23 00:37:44 UTC) #17
Dan Beam
lgtm https://codereview.chromium.org/2352293002/diff/140001/chrome/browser/resources/md_history/list_container.js File chrome/browser/resources/md_history/list_container.js (right): https://codereview.chromium.org/2352293002/diff/140001/chrome/browser/resources/md_history/list_container.js#newcode155 chrome/browser/resources/md_history/list_container.js:155: ^H
4 years, 3 months ago (2016-09-23 05:50:46 UTC) #26
tsergeant
Thanks! https://codereview.chromium.org/2352293002/diff/140001/chrome/browser/resources/md_history/list_container.js File chrome/browser/resources/md_history/list_container.js (right): https://codereview.chromium.org/2352293002/diff/140001/chrome/browser/resources/md_history/list_container.js#newcode155 chrome/browser/resources/md_history/list_container.js:155: On 2016/09/23 05:50:46, Dan Beam wrote: > ^H ...
4 years, 3 months ago (2016-09-23 06:59:19 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2352293002/160001
4 years, 3 months ago (2016-09-23 06:59:38 UTC) #30
commit-bot: I haz the power
Committed patchset #8 (id:160001)
4 years, 3 months ago (2016-09-23 11:27:57 UTC) #31
commit-bot: I haz the power
4 years, 3 months ago (2016-09-23 11:29:57 UTC) #33
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/73e5d0ee1756905fbb7d9ca932394735ac2a2f67
Cr-Commit-Position: refs/heads/master@{#420590}

Powered by Google App Engine
This is Rietveld 408576698