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

enhancement: add MaskedInput icon click-ability #7066

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

abdulbasithqb
Copy link
Contributor

What does this PR do?

Introduces the ability to make the MaskedInput icon clickable, triggering the display of suggestion options.

Where should the reviewer start?

Review changes in the MaskedInput component related to icon click-ability(components/MaskedInput/MaskedInput.js).

What testing has been done on this PR?

  • Manually clicking the icon to ensure the expected behavior.
  • Local Jest tests.

How should this be manually tested?

Manually test by clicking the icon in a MaskedInput field with the maskIconClickable prop set to true and verify the suggestion options appear. Then, test with maskIconClickable set to false and ensure the icon does not trigger the suggestions.

Do Jest tests follow these best practices?

  • screen is used for querying.
  • The correct query is used. (Refer to this list of queries)
  • asFragment() is used for snapshot testing.

Any background context you want to provide?

This enhancement improves user interaction with MaskedInput by allowing suggestions to be triggered by clicking the icon.

What are the relevant issues?

fixes: #7042

Screen-record (if appropriate)

Screen.Recording.2023-12-14.at.2.06.43.AM.mov

Do the grommet docs need to be updated?

No

Should this PR be mentioned in the release notes?

Not sure.

Is this change backwards compatible or is it a breaking change?

No.

@abdulbasithqb abdulbasithqb changed the title ehancement: add MaskedInput icon click-ability enhancement: add MaskedInput icon click-ability Dec 14, 2023
@taysea
Copy link
Collaborator

taysea commented Jan 18, 2024

Thanks for this proposal. I'm tagging this as "discussion" because there is a bit to discuss here from an API standpoint and accessibility standpoint as well since we would need to consider rendering this as a Button/avoiding nested interactive elements/etc.

@taysea taysea added the discussion Needs deeper discussions label Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Needs deeper discussions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancement: Change MaskedInput icon click to open suggestions drop-down
2 participants