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(color): allow color input nudging by using ⬆ ⬇ (+shift) keys #1295

Merged
merged 2 commits into from
Nov 23, 2020

Conversation

jcfranco
Copy link
Member

Related Issue: #866

Summary

This enhances calcite-color and calcite-color-hex-input to allow nudging values when using the arrow keys. Values are nudged by 1 or by 10 if the shift key is pressed alongside an arrow key.

Note that for the hex input, each channel value will be nudged. This is follows how Figma's hex input works, which is referenced in the related issue.

@jcfranco jcfranco added enhancement Issues tied to a new feature or request. a11y Issues related to Accessibility fixes or improvements. labels Nov 23, 2020
@jcfranco jcfranco added this to the v1.0.0-beta.47 milestone Nov 23, 2020
@jcfranco jcfranco requested a review from a team as a code owner November 23, 2020 19:51
Copy link
Member

@driskull driskull left a comment

Choose a reason for hiding this comment

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

👍

@macandcheese
Copy link
Contributor

macandcheese commented Nov 23, 2020

Rad! Thanks for adding these. Looking at it, it seems like the "H" channel allows you to loop through values continuously without stopping at the top limit. Doesn't seem to happen on other HSV channels or any RGB:

Screencast 2020-11-23 at 12 05 24 PM (1)

Edit: I understand why this might be intentional due to hue being able to cycle, but seemed a bit unexpected, if we keep it you should also be able to cycle “backwards” past 0, right now it limits to 0 when decrementing.

Copy link
Contributor

@macandcheese macandcheese left a comment

Choose a reason for hiding this comment

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

Approved with comment above!

@jcfranco
Copy link
Member Author

I understand why this might be intentional due to hue being able to cycle, but seemed a bit unexpected, if we keep it you should also be able to cycle “backwards” past 0, right now it limits to 0 when decrementing.

I'll create a separate issue to discuss how to approach this. The current behavior is more of a side effect.

@jcfranco jcfranco merged commit de83fa8 into master Nov 23, 2020
@jcfranco jcfranco deleted the jcfranco/866-allow-stepped-input-channel-adjustments branch November 23, 2020 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y Issues related to Accessibility fixes or improvements. enhancement Issues tied to a new feature or request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants