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

Issue 611949 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocked on:
issue 598879

Blocking:
issue 425627



Sign in to add a comment

Polymer slider element

Project Member Reported by michae...@chromium.org, May 14 2016

Issue description

<cr-slider> to wrap a <paper-slider>, providing common logic around mapping from
slider indices to real values.
 

Comment 1 by dbeam@chromium.org, May 17 2016

I'm still skeptical that "providing common logic" should be handled by "wrap a <paper-thing>"
I tried it two ways because http://i.imgur.com/LpAf5re.png

https://codereview.chromium.org/1967913002/#ps1
https://codereview.chromium.org/1967913002/#ps80001

It's not easy when the amount of logic is non-trivial, but still less than the amount of data and UI to wrap/behaviorize/bind.
Labels: Hotlist-MD-Settings-General
Project Member

Comment 4 by bugdroid1@chromium.org, Jun 2 2016

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

commit d326605487da452867181c1fe0dc7c6580b0d714
Author: michaelpg <michaelpg@chromium.org>
Date: Thu Jun 02 21:43:23 2016

Material WebUI: cr-slider element for intelligent range mapping

Most sliders don't correspond 1:1 with a range of values. For instance,
we curate a range of valid values for pointer sensitivity, then map these
to a linear slider.

<cr-slider> takes an array of values corresponding to slider indices, and
binds the value of the <paper-slider> it wraps to the host element's property.

This simplifies the logic that was duplicated in keyboard.html and
appearance_fonts_page.html. It also fixes a rare edge case when a pref value
updates while the slider is being dragged.

BUG= 611949 
TEST=CrElementsBrowserTest.CrElements
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:closure_compilation

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

[modify] https://crrev.com/d326605487da452867181c1fe0dc7c6580b0d714/chrome/browser/resources/settings/appearance_page/appearance_fonts_page.html
[modify] https://crrev.com/d326605487da452867181c1fe0dc7c6580b0d714/chrome/browser/resources/settings/appearance_page/appearance_fonts_page.js
[modify] https://crrev.com/d326605487da452867181c1fe0dc7c6580b0d714/chrome/browser/resources/settings/device_page/compiled_resources2.gyp
[modify] https://crrev.com/d326605487da452867181c1fe0dc7c6580b0d714/chrome/browser/resources/settings/device_page/keyboard.html
[modify] https://crrev.com/d326605487da452867181c1fe0dc7c6580b0d714/chrome/browser/resources/settings/device_page/keyboard.js
[modify] https://crrev.com/d326605487da452867181c1fe0dc7c6580b0d714/chrome/browser/resources/settings/settings_shared_css.html
[modify] https://crrev.com/d326605487da452867181c1fe0dc7c6580b0d714/chrome/chrome_tests.gypi
[add] https://crrev.com/d326605487da452867181c1fe0dc7c6580b0d714/chrome/test/data/webui/cr_elements/cr_elements_browsertest.js
[add] https://crrev.com/d326605487da452867181c1fe0dc7c6580b0d714/chrome/test/data/webui/cr_elements/cr_slider_tests.js
[add] https://crrev.com/d326605487da452867181c1fe0dc7c6580b0d714/chrome/test/data/webui/cr_elements/cr_toolbar_search_field_tests.js
[delete] https://crrev.com/a8ea9274d69b2209ea4e4f996069274cd08a1a24/chrome/test/data/webui/cr_elements_browsertest.js
[modify] https://crrev.com/d326605487da452867181c1fe0dc7c6580b0d714/chrome/test/data/webui/settings/device_page_tests.js
[modify] https://crrev.com/d326605487da452867181c1fe0dc7c6580b0d714/ui/webui/resources/cr_elements/compiled_resources2.gyp
[add] https://crrev.com/d326605487da452867181c1fe0dc7c6580b0d714/ui/webui/resources/cr_elements/cr_slider/compiled_resources2.gyp
[add] https://crrev.com/d326605487da452867181c1fe0dc7c6580b0d714/ui/webui/resources/cr_elements/cr_slider/cr_slider.html
[add] https://crrev.com/d326605487da452867181c1fe0dc7c6580b0d714/ui/webui/resources/cr_elements/cr_slider/cr_slider.js
[modify] https://crrev.com/d326605487da452867181c1fe0dc7c6580b0d714/ui/webui/resources/cr_elements_resources.grdp

Status: Fixed (was: Started)
this exists now, but note  issue 598879 

Sign in to add a comment