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

Issue 598516 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Feature



Sign in to add a comment

replace paper-material with div styled via paper-material-shared-styles

Project Member Reported by michae...@chromium.org, Mar 29 2016

Issue description

in accordance with https://docs.google.com/spreadsheets/d/1m0SleaDfRTPzDvlnInip9x4FXT6O98M2W8jwZyHmNp8/edit#gid=1938185096 we should remove <paper-material> usage from WebUI, including settings-section. it's an unnecessary custom element that can be replaced with a styled <div> to gain performance.
 

Comment 1 by dbeam@chromium.org, Mar 29 2016

this is conveniently pre-done for you in downloads ;)
Labels: Proj-MaterialDesign-WebUI
#1: yep but you still have it thanks to <paper-button>. https://github.com/PolymerElements/paper-button/pull/114
Project Member

Comment 4 by bugdroid1@chromium.org, May 5 2016

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

commit 2477b855edc8e00fbeb180b0e6011b83bbaf94a5
Author: michaelpg <michaelpg@chromium.org>
Date: Thu May 05 23:18:09 2016

MD Settings: replace paper-material with paper-material-shared-styles

The cards don't need to be custom elements.

BUG= 598516 
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:closure_compilation

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

[delete] https://crrev.com/538ae9a2b661a9b40ab259d0f34b41ddb668ec75/chrome/browser/resources/settings/settings_page/settings_section.css
[modify] https://crrev.com/2477b855edc8e00fbeb180b0e6011b83bbaf94a5/chrome/browser/resources/settings/settings_page/settings_section.html
[modify] https://crrev.com/2477b855edc8e00fbeb180b0e6011b83bbaf94a5/chrome/browser/resources/settings/settings_resources.grd

Labels: Hotlist-MD-Settings-General
Blocking: -589681
Components: -UI>Settings Internals>Plugins>PDF
Labels: -Hotlist-MD-Settings-General
Summary: replace paper-material with div styled via paper-material-shared-styles (was: kill paper-material with fire)
Components: UI>Settings
Owner: ----
Status: Available (was: Assigned)
un-assigning

Comment 8 by dbeam@chromium.org, Jan 6 2017

Labels: Hotlist-MD-Settings-General

Comment 9 by dpa...@chromium.org, May 18 2017

Cc: dpa...@chromium.org
Labels: -Type-Bug OS-All Type-Feature
There are two remaining occurrences of paper-material (only one of them in MD Settings), see https://cs.chromium.org/search/?q=%22%3Cpaper-material%22+-appengine+-catapult+-luci-go&type=cs.

Comment 10 by dbeam@chromium.org, May 18 2017

I think <paper-material> can generally be changed with something like <div> + @apply(--shadow-elevation-2dp);

Comment 11 by dbeam@chromium.org, May 18 2017

Cc: tsergeant@chromium.org
It seems that our usage of paper-material is broken in Vulcanized mode, unfortunately.

Applying elevation=1 attribute at [1] is supposed to trigger a box-shadow from paper-material-shared-styles at [2], but in Vulcanized mode, I don't see it being applied. Perhaps the problem is that at [2] we use two separate <style> tags and somehow the 1st one is being dropped from polymer-css-build?

[1] https://cs.chromium.org/chromium/src/chrome/browser/resources/settings/device_page/display_layout.html?l=64
[2] https://cs.chromium.org/chromium/src/third_party/polymer/v1_0/components-chromium/paper-material/paper-material.html?l=31,32
elevation_not_applied.png
213 KB View Download
paper_material_missing_style.png
23.3 KB View Download
paper_material_missing_exists_non_vulcanized.png
54.9 KB View Download
Cc: steve...@chromium.org
Did some further investigation. The vulcanized output is correct if I merge the two <style> includes at [1]. I believe this is a bug either in polymer-css-build, or in vulcanize itself. Will try to come up with a minimal repro and forward accordingly.

Having said that, we should audit all our elements (both Chrome and third_party/polymer) to see if there are more places where multiple <style> tags per-element are being used.

[1] https://cs.chromium.org/chromium/src/third_party/polymer/v1_0/components-chromium/paper-material/paper-material.html?l=31,32
FYI, filed bug with minimal repro at https://github.com/Polymer/polymer-css-build/issues/13. It does not block the removal of paper-material though.
Project Member

Comment 17 by bugdroid1@chromium.org, May 23 2017

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

commit 43417886667f8c68d74056371a61845cdaddd4a9
Author: dpapad <dpapad@chromium.org>
Date: Tue May 23 01:51:57 2017

MD Settings: Remove usage of paper-material.

Instead replace it with an appropriately styled div.

As a fortunate side-effect, this CL makes the box-shadow effect work
in Vulcanized mode, because it side-steps https://github.com/Polymer/polymer-css-build/issues/13

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

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

[modify] https://crrev.com/43417886667f8c68d74056371a61845cdaddd4a9/chrome/browser/resources/settings/device_page/display_layout.html

Project Member

Comment 18 by bugdroid1@chromium.org, Jun 2 2017

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

commit 0b67b20f22a94c5b47e1c1c18db39a7296f8b399
Author: Dan Beam <dbeam@chromium.org>
Date: Fri Jun 02 03:40:05 2017

Polymer: update a couple node-based tools

* polymer-css-build: 0.0.9 -> 0.1.2
* vulcanize: 1.15.2 -> 1.15.4

Updating vulcanize allows us to trim our local patch.  I also renamed
patch_vulcanize.diff to chromium_vulcanize.patch as "chromium.patch"
seems like a more common file name for applying Chromium-specific
changes to third_party code.

BUG= 598516 
R=dpapad@chromium.org

Change-Id: Ib0b4234a1e497bad7ea930c1f14b841e723a60bc
Reviewed-on: https://chromium-review.googlesource.com/521883
Commit-Queue: Dan Beam <dbeam@chromium.org>
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#476552}
[add] https://crrev.com/0b67b20f22a94c5b47e1c1c18db39a7296f8b399/third_party/node/chromium_vulcanize.patch
[modify] https://crrev.com/0b67b20f22a94c5b47e1c1c18db39a7296f8b399/third_party/node/node_modules.tar.gz.sha1
[modify] https://crrev.com/0b67b20f22a94c5b47e1c1c18db39a7296f8b399/third_party/node/package.json
[delete] https://crrev.com/38610ad5a07527b89be3116610c2c3bff822d5e8/third_party/node/patch_vulcanize.diff
[modify] https://crrev.com/0b67b20f22a94c5b47e1c1c18db39a7296f8b399/third_party/node/update_npm_deps

FYI, CL to remove remaining usage of paper-material is at https://codereview.chromium.org/2924443002.
Project Member

Comment 20 by bugdroid1@chromium.org, Jun 6 2017

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

commit c4689b08719e552c8f361a35ce0c3a31935606d7
Author: dpapad <dpapad@chromium.org>
Date: Tue Jun 06 03:26:10 2017

WebUI: Remove last usage of <paper-material>.

This CL also removes the last usage of paper-material-shared-styles,
because it is not really needed. Instead its usage can be replaced
with the already existing paper-styles/shadow.html

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

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

[modify] https://crrev.com/c4689b08719e552c8f361a35ce0c3a31935606d7/chrome/browser/resources/chromeos/login/controller-pairing-screen.html
[modify] https://crrev.com/c4689b08719e552c8f361a35ce0c3a31935606d7/chrome/browser/resources/settings/device_page/display_layout.html

Status: Started (was: Available)
FYI, I have a CL attempting to remove <paper-material> from being shipped with Chrome at https://codereview.chromium.org/2925993002, since it seems that it is not being used anywhere anymore.
Owner: dpa...@chromium.org
\o/
Project Member

Comment 24 by bugdroid1@chromium.org, Jun 7 2017

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

commit 93bd3b4b2f3930c82b0287b2f475594a8947f898
Author: dpapad <dpapad@chromium.org>
Date: Wed Jun 07 23:22:42 2017

Polymer: Remove <paper-material> from polymer_resources.grdp file.

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

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

[modify] https://crrev.com/93bd3b4b2f3930c82b0287b2f475594a8947f898/third_party/polymer/v1_0/reproduce.sh
[modify] https://crrev.com/93bd3b4b2f3930c82b0287b2f475594a8947f898/ui/webui/resources/polymer_resources.grdp

Status: Fixed (was: Started)

Sign in to add a comment