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

feat(forms): allow multi-thumb range to allow track mouse interaction #727

Merged
merged 2 commits into from
Apr 27, 2020

Conversation

austingreendev
Copy link
Contributor

@austingreendev austingreendev commented Apr 23, 2020

Description

This PR adds the ability to interact with the MultiThumbRange through clicking the range track. It determines the closest thumb from the selection and updates the value along with focusing the thumb for additional keyboard interaction.

This also supports the step property by rounding new values.

Checklist

  • 👌 design updates are Garden Designer approved (add the
    designer as a reviewer)
  • 🌐 Styleguidist demo is up-to-date (yarn start)
  • ⬅️ renders as expected with reversed (RTL) direction
  • ♿ analyzed via axe and evaluated using VoiceOver
  • 💂‍♂️ includes new unit tests
  • 📝 tested in Chrome, Firefox, Safari, Edge, and IE11

Copy link
Member

@jzempel jzempel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Austin94 lookin' good. Please publish a demo and add selected designers as Reviewers. 🙏

@austingreendev
Copy link
Contributor Author

Copy link
Member

@jzempel jzempel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clicking in the spacing area (whenever the cursor changes to "pointer") of <Range> affects the thumb. However, the same is only effective on MultiThumbRange when the mouse is over the track.

@austingreendev
Copy link
Contributor Author

austingreendev commented Apr 24, 2020

@jzempel good catch. I've moved the onMouseDown event from the track to the parent slider element. This now matches the native <input /> interaction.

@ginnywood
Copy link

Awesome! 🙌Great improvement, thanks for doing this.

Copy link

@ginnywood ginnywood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.04%) to 97.878% when pulling 61b90e4 on agreen/range-click into 4b17136 on master.

@zendesk-garden zendesk-garden temporarily deployed to staging April 24, 2020 19:34 Inactive
Copy link
Member

@jzempel jzempel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice.

@austingreendev austingreendev merged commit c21ee15 into master Apr 27, 2020
@austingreendev austingreendev deleted the agreen/range-click branch April 27, 2020 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

6 participants