Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Slider Component #25

Closed
2 tasks done
traviskaufman opened this issue Dec 5, 2016 · 6 comments
Closed
2 tasks done

Implement Slider Component #25

traviskaufman opened this issue Dec 5, 2016 · 6 comments

Comments

@traviskaufman
Copy link
Contributor

traviskaufman commented Dec 5, 2016

@sgomes already doing some work on this.

Notes

Step values need to be able to be quantized to decimal places, e.g. min = 0, max = 5, step = .2. Possible algorithm: Take the raw value, divide it by step, round that number, and then multiply the original step value by the rounded number. E.g.

function quantize(val, min, max, step) {
  const numSteps = Math.round(val / step);
  const quantizedVal = numSteps * step;
  return Math.max(min, Math.min(max, quantizedVal));
}

const min = 0, max = 5, step = .2;
quantize(3.56, min, max, step); // 3.6
quantize(2.148692, min, max, step) // 2.2
quantize(1.061733, min, max, step) // 1

Copied from google/material-design-lite#4494

@traviskaufman traviskaufman added this to the Beta milestone Dec 5, 2016
@sgomes sgomes changed the title Implement Slider v2 Component Implement Slider Component Dec 19, 2016
@chriscox
Copy link

Is this slider currently in the roadmap? Any ETA?

@traviskaufman
Copy link
Contributor Author

@chriscox take a look in our Pivotal Tracker!

@traviskaufman
Copy link
Contributor Author

cc @pgbross this is where we're tracking work for sliders.

If you're interested in migrating your work from #487 over to our implementation, we usually first want to see a visual prototype (which we actually already have), as well as an eng outline doc detailing how you plan on building the component. Would this be something you're interested in looking into?

If so, let us know before starting any work on the eng outline and I'll port over my visual prototype to codepen :). I worked pretty closely alongside the design team on the visual prototype so it should take away a lot of the ambiguity around the subtle design interactions that sliders require. Thanks!

@pgbross
Copy link
Contributor

pgbross commented Apr 11, 2017

@traviskaufman thank you for your feedback on #487.

I am interested in looking into sliders further and am willing to have a go based on your visual prototype and beginning with the engineering outline document. Are there any eng outline documents for existing MDC-Web components or a worked example that could be used to see the style and level of detail expected in the different sections?

I will wait until you have time to port your visual prototype to codepen and look forward to seeing it in due course.

@traviskaufman
Copy link
Contributor Author

Eng outline: https://docs.google.com/document/d/1gSZO62mZNjBpSZMyT0K3gNRjOJ6xCiDFa3VaupOdgmE/edit

@MarcMcIntosh
Copy link

https://docs.google.com/document/d/1gSZO62mZNjBpSZMyT0K3gNRjOJ6xCiDFa3VaupOdgmE/edit
that's a good way of defining what's needed :)

traviskaufman added a commit that referenced this issue Jun 2, 2017
- Add continuous slider component
- Check in `package-lock.json`, part of npm5/node8
- Disable stylelint for `demos.css`

Part of #25
traviskaufman added a commit that referenced this issue Jun 2, 2017
- Add continuous slider component
- Check in `package-lock.json`, part of npm5/node8
- Disable stylelint for `demos.css`

Part of #25
traviskaufman added a commit that referenced this issue Jun 2, 2017
- Add continuous slider component
- Check in `package-lock.json`, part of npm5/node8
- Disable stylelint for `demos.css`

Part of #25
traviskaufman added a commit that referenced this issue Jun 8, 2017
- Add continuous slider component
- Check in `package-lock.json`, part of npm5/node8
- Disable stylelint for `demos.css`

Part of #25
traviskaufman added a commit that referenced this issue Jun 8, 2017
- Add continuous slider component
- Check in `package-lock.json`, part of npm5/node8
- Disable stylelint for `demos.css`

Part of #25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants