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(timepicker): use arrow keys to increment/decrement values #2912

Merged

Conversation

jnizet
Copy link
Member

@jnizet jnizet commented Dec 7, 2018

Mousewheel support is more controversial, and would probably
need an additional input + config to enable/disable it, as it's used by
users which are not proficient keyboard users to scroll the page.
But I think keyboard support is a must, and can be turned on always.

refs #459

Before submitting a pull request, please make sure you have at least performed the following:

  • read and followed the CONTRIBUTING.md guide.
  • built and tested the changes locally.
  • added/updated any applicable tests.
  • added/updated any applicable API documentation.
  • added/updated any applicable demos.

@codecov-io
Copy link

codecov-io commented Dec 7, 2018

Codecov Report

Merging #2912 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2912   +/-   ##
=======================================
  Coverage   92.43%   92.43%           
=======================================
  Files          91       91           
  Lines        2962     2962           
  Branches      474      474           
=======================================
  Hits         2738     2738           
  Misses        163      163           
  Partials       61       61
Flag Coverage Δ
#e2e 60.06% <ø> (ø) ⬆️
#unit 90.97% <ø> (ø) ⬆️
Impacted Files Coverage Δ
src/timepicker/timepicker.ts 98.8% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0874fb1...0a39086. Read the comment docs.

@maxokorokov
Copy link
Member

Looks like its a simpler alternative to #2053

@maxokorokov maxokorokov added this to the 4.1 milestone Dec 13, 2018
Copy link
Member

@maxokorokov maxokorokov left a comment

Choose a reason for hiding this comment

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

Hi @jnizet!

Two comments:

I think @pkozlowski-opensource meant in his comment #1334 (comment) that timepicker is broken beyond repair :) And we should decide how to redesign it (among the questions: accessibility, tab navigation, keyboard handling, input type=number, forms integration, {updateOn: blur}, etc)

Still, I think the current timepicker could still benefit from:

  • adding arrow up/down support
  • removing ability to focus UI arrows, so Tab would switch between inputs

@jnizet
Copy link
Member Author

jnizet commented Dec 20, 2018

Hi @maxokorokov Sorry I missed your comment, and also missed this previous PR.

Regarding your first comment, I agree that it looks a bit weird, but it doesn't look like a deal breaker to me either (and I'm not sure how to change it either). What does look like a deal breaker is the lack of keyboard support :-)

Your second comment I also agree with, but I have the feeling that fixing it would require quite a lot of dirty browser-dependant code for a small benefit.

Since these two issues (IMHO) are cosmetic issues, but the lack of keyboard support is a big functional issue, can't we at least start with this and fix those issues later if necessary?

Mousewheel support is more controversial, and would probably
need an additional input + config to enable/disable it, as it's used by
users which are not proficient keyboard users to scroll the page.
But I think keyboard support is a must, and can be turned on always.

refs ng-bootstrap#459
Copy link
Member

@maxokorokov maxokorokov left a comment

Choose a reason for hiding this comment

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

LGTM, as a starting point!

Thanks @jnizet, I took the liberty to rebase.

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

Successfully merging this pull request may close these issues.

None yet

3 participants