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

SDC: Allow Typing to filter for Dropdown component #1722

Merged
merged 8 commits into from
Dec 2, 2022

Conversation

nsabale7
Copy link
Collaborator

IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).*

Fixes #764

Description
This PR allows to filter options based on typing in the dropdown component.

Type
Choose one: Bug fix

Screenshots (if applicable)

dropdown.mp4

Checklist

  • I have read and acknowledged the Code of conduct.
  • I have read the Contributing page.
  • I have signed the Google Individual CLA, or I am covered by my company's Corporate CLA.
  • I have discussed my proposed solution with code owners in the linked issue(s) and we have agreed upon the general approach.
  • I have run ./gradlew spotlessApply and ./gradlew spotlessCheck to check my code follows the style guide of this project.
  • I have run ./gradlew check and ./gradlew connectedCheck to test my changes locally.
  • I have built and run the demo app(s) to verify my change fixes the issue and/or does not break the demo app(s).

…n_view.xml. Handled the inputs in QuestionnaireItemDropDownViewHolderFactory.kt
Copy link
Collaborator

@joiskash joiskash left a comment

Choose a reason for hiding this comment

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

Looks good to me, google team can review

cc: @omarismail94 @santosh-pingle

Copy link
Contributor

@omarismail94 omarismail94 left a comment

Choose a reason for hiding this comment

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

This looks great @nsabale7 !!

Can you add an Espresso Test in QuestionnaireItemDropDownViewHolderFactoryEspressoTest to assert the number of items in the menu for different scenarios, e.g. no filtering, filtering with results, filtering with no results?

@nsabale7 nsabale7 requested review from omarismail94 and removed request for omarismail94 November 17, 2022 15:05
@nsabale7 nsabale7 requested review from joiskash and omarismail94 and removed request for joiskash November 17, 2022 15:05
Copy link
Contributor

@omarismail94 omarismail94 left a comment

Choose a reason for hiding this comment

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

Great change @nsabale7 !

@jingtang10 jingtang10 self-assigned this Dec 1, 2022
@jingtang10
Copy link
Collaborator

@shelaghm please take a look at the video - it looks amazing!

thanks @nsabale7

@shelaghm
Copy link

shelaghm commented Dec 1, 2022

@nsabale7 great work!

@jingtang10 One question I have is if the dropdown component always allow people to type to filter or if it is something that is configurable and needs to be activated? Asking so I can document it properly in my design guidelines.

@jingtang10
Copy link
Collaborator

@nsabale7 great work!

@jingtang10 One question I have is if the dropdown component always allow people to type to filter or if it is something that is configurable and needs to be activated? Asking so I can document it properly in my design guidelines.

it would always allow filtering by typing.

@jingtang10 jingtang10 enabled auto-merge (squash) December 2, 2022 17:37
@codecov
Copy link

codecov bot commented Dec 2, 2022

Codecov Report

Merging #1722 (c4178bc) into master (8acbeb3) will increase coverage by 0.56%.
The diff coverage is 50.00%.

@@             Coverage Diff              @@
##             master    #1722      +/-   ##
============================================
+ Coverage     41.79%   42.35%   +0.56%     
  Complexity      384      384              
============================================
  Files           150      150              
  Lines          5405     5411       +6     
  Branches        971      973       +2     
============================================
+ Hits           2259     2292      +33     
+ Misses         2786     2761      -25     
+ Partials        360      358       -2     
Impacted Files Coverage Δ
...iews/QuestionnaireItemDropDownViewHolderFactory.kt 60.00% <50.00%> (-1.54%) ⬇️
...ir/datacapture/views/OptionSelectDialogFragment.kt 85.50% <0.00%> (+14.49%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@jingtang10 jingtang10 merged commit cb13ade into google:master Dec 2, 2022
@santosh-pingle santosh-pingle modified the milestones: Data Capture Library 0.1.0-beta07, Data Capture Library 1.0.0 Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow typing to filter in the Dropdown widget if drop down has a large number of answer options
7 participants