New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 642200 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Not on Chrome
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Turn history-lazy-render into cr-lazy-render

Project Member Reported by tsergeant@chromium.org, Aug 30 2016

Issue description

We want to move history-lazy-render into the cr-elements suite so that it can be used by Settings and other MD WebUI.

There are two main parts to this work:

1. Move the element
2. Expand the element to cover the detach/reattach cases which dom-if covers, but were not needed in MD History
 
Project Member

Comment 1 by bugdroid1@chromium.org, Sep 15 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e2196439c06a665b58e24c1a6109639581a411b5

commit e2196439c06a665b58e24c1a6109639581a411b5
Author: tsergeant <tsergeant@chromium.org>
Date: Thu Sep 15 05:16:18 2016

MD WebUI: Move history-lazy-render into cr-elements

This is the first step in making this element usable by WebUI pages
other than MD History.

BUG= 642200 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2282403005
Cr-Commit-Position: refs/heads/master@{#418788}

[modify] https://crrev.com/e2196439c06a665b58e24c1a6109639581a411b5/chrome/browser/browser_resources.grd
[modify] https://crrev.com/e2196439c06a665b58e24c1a6109639581a411b5/chrome/browser/resources/md_history/app.crisper.js
[modify] https://crrev.com/e2196439c06a665b58e24c1a6109639581a411b5/chrome/browser/resources/md_history/app.vulcanized.html
[modify] https://crrev.com/e2196439c06a665b58e24c1a6109639581a411b5/chrome/browser/resources/md_history/compiled_resources2.gyp
[modify] https://crrev.com/e2196439c06a665b58e24c1a6109639581a411b5/chrome/browser/resources/md_history/externs.js
[modify] https://crrev.com/e2196439c06a665b58e24c1a6109639581a411b5/chrome/browser/resources/md_history/history_toolbar.html
[delete] https://crrev.com/0a388886e07037d76be02dbf656cc1eb35bb681d/chrome/browser/resources/md_history/lazy_render.html
[modify] https://crrev.com/e2196439c06a665b58e24c1a6109639581a411b5/chrome/browser/resources/md_history/list_container.html
[modify] https://crrev.com/e2196439c06a665b58e24c1a6109639581a411b5/chrome/browser/resources/md_history/synced_device_manager.html
[modify] https://crrev.com/e2196439c06a665b58e24c1a6109639581a411b5/chrome/browser/ui/webui/md_history_ui.cc
[modify] https://crrev.com/e2196439c06a665b58e24c1a6109639581a411b5/chrome/test/data/webui/cr_elements/cr_elements_browsertest.js
[add] https://crrev.com/e2196439c06a665b58e24c1a6109639581a411b5/chrome/test/data/webui/cr_elements/cr_lazy_render_tests.js
[delete] https://crrev.com/0a388886e07037d76be02dbf656cc1eb35bb681d/chrome/test/data/webui/md_history/lazy_render_test.js
[modify] https://crrev.com/e2196439c06a665b58e24c1a6109639581a411b5/chrome/test/data/webui/md_history/md_history_browsertest.js
[add] https://crrev.com/e2196439c06a665b58e24c1a6109639581a411b5/ui/webui/resources/cr_elements/cr_lazy_render/compiled_resources2.gyp
[add] https://crrev.com/e2196439c06a665b58e24c1a6109639581a411b5/ui/webui/resources/cr_elements/cr_lazy_render/cr_lazy_render.html
[rename] https://crrev.com/e2196439c06a665b58e24c1a6109639581a411b5/ui/webui/resources/cr_elements/cr_lazy_render/cr_lazy_render.js
[modify] https://crrev.com/e2196439c06a665b58e24c1a6109639581a411b5/ui/webui/resources/cr_elements_resources.grdp

Project Member

Comment 2 by bugdroid1@chromium.org, Sep 16 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/896eeb353419d5dc54facc98453bddf274573eca

commit 896eeb353419d5dc54facc98453bddf274573eca
Author: tsergeant <tsergeant@chromium.org>
Date: Fri Sep 16 00:38:53 2016

MD WebUI: Simplify usage of Templatizer in cr-lazy-render

This changes the template stamping parts of cr-lazy-render to look more
like iron-list. This simplifies the code and makes it play nicely with
Closure.

BUG= 642200 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2344803002
Cr-Commit-Position: refs/heads/master@{#419058}

[modify] https://crrev.com/896eeb353419d5dc54facc98453bddf274573eca/chrome/browser/resources/md_history/app.crisper.js
[modify] https://crrev.com/896eeb353419d5dc54facc98453bddf274573eca/ui/webui/resources/cr_elements/cr_lazy_render/cr_lazy_render.js

Project Member

Comment 3 by bugdroid1@chromium.org, Sep 19 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cede888c27275835e5aaadf5dac49379eb3ac106

commit cede888c27275835e5aaadf5dac49379eb3ac106
Author: tsergeant <tsergeant@chromium.org>
Date: Mon Sep 19 01:54:31 2016

MD WebUI: Make cr-lazy-render get() synchronous

dom-if and similar stamp their templates asynchronously, because it's
not a great idea to block execution to stamp out DOM as a result of
changes to properties. cr-lazy-render does not really share the same
concerns: it will only stamp when explicitly told to, and the caller
should be aware of how long this could take. As such, there is no
particular reason to prefer async stamping.

This CL changes all existing usage of cr-lazy-render to be synchronous,
which simplifies both application code and tests. An asynchronous API
could still be added in the future, if required.

BUG= 642200 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2341923005
Cr-Commit-Position: refs/heads/master@{#419407}

[modify] https://crrev.com/cede888c27275835e5aaadf5dac49379eb3ac106/chrome/browser/resources/md_history/app.crisper.js
[modify] https://crrev.com/cede888c27275835e5aaadf5dac49379eb3ac106/chrome/browser/resources/md_history/history_toolbar.js
[modify] https://crrev.com/cede888c27275835e5aaadf5dac49379eb3ac106/chrome/browser/resources/md_history/list_container.js
[modify] https://crrev.com/cede888c27275835e5aaadf5dac49379eb3ac106/chrome/browser/resources/md_history/synced_device_manager.js
[modify] https://crrev.com/cede888c27275835e5aaadf5dac49379eb3ac106/chrome/test/data/webui/cr_elements/cr_lazy_render_tests.js
[modify] https://crrev.com/cede888c27275835e5aaadf5dac49379eb3ac106/chrome/test/data/webui/md_history/history_grouped_list_test.js
[modify] https://crrev.com/cede888c27275835e5aaadf5dac49379eb3ac106/chrome/test/data/webui/md_history/history_list_test.js
[modify] https://crrev.com/cede888c27275835e5aaadf5dac49379eb3ac106/chrome/test/data/webui/md_history/history_overflow_menu_test.js
[modify] https://crrev.com/cede888c27275835e5aaadf5dac49379eb3ac106/ui/webui/resources/cr_elements/cr_lazy_render/cr_lazy_render.js

Is this fixed?
There's one specific piece of behavior from dom-if that isn't implemented yet: if the cr-lazy-render is moved or removed from the DOM tree, the child element should be moved/removed with it.

Is this something that is likely to be needed by Settings? If it is, I can probably implement it. Otherwise, we can call the bug fixed.
Status: Fixed (was: Started)
Marking as fixed. If the reattach behavior I mention above is ever needed, we can open a new bug then.

Sign in to add a comment