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(Search|Dropdown): Improve arrow navigation #701

Merged
merged 2 commits into from
Oct 19, 2016

Conversation

jeffcarbs
Copy link
Member

@jeffcarbs jeffcarbs commented Oct 19, 2016

This improves arrow navigation in both the dropdown and search menus.

Previously
When pressing "arrow-down" to move through results once an item was past the bottom the menu's scrollTop would move to that item's scrollTop, which was kinda jarring. It was almost as if you were moving to the next "page" of items, which is pretty non-standard:
before

After
When an item is past the bottom, the menu adjusts so that the bottom of the menu is at the item's bottom:
after

This also fixes the specs that were testing this functionality - they weren't actually testing anything 😐

@codecov-io
Copy link

codecov-io commented Oct 19, 2016

Current coverage is 99.47% (diff: 100%)

Merging #701 into master will increase coverage by <.01%

@@             master       #701   diff @@
==========================================
  Files           132        132          
  Lines          2108       2112     +4   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits           2097       2101     +4   
  Misses           11         11          
  Partials          0          0          

Powered by Codecov. Last update 145b868...1c0d50c

@levithomason
Copy link
Member

Awesome, any chance we can get this update in the Dropdown in this PR as well (being it's so small)?

@jeffcarbs
Copy link
Member Author

This includes the change for both search and dropdown. The title doesn't reflect that because I wasn't sure how to do that within the PR naming convention.

@jeffcarbs jeffcarbs changed the title feat(Search): Improve arrow navigation feat(Search|Dropdown): Improve arrow navigation Oct 19, 2016
@levithomason levithomason merged commit d2dc3cc into master Oct 19, 2016
@levithomason levithomason deleted the feature/search-scroll branch October 19, 2016 16:41
@levithomason
Copy link
Member

That's what I get for reviewing tired, sorry about that! Released in semantic-ui-react@0.56.8.

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.

3 participants