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

chore(combobox): refactor to use useCombobox #16283

Conversation

preetibansalui
Copy link
Contributor

@preetibansalui preetibansalui commented Apr 30, 2024

Closes #14684
Closes #15927

Refactored the code to use usecombobox

Changelog

Changed

Code refactored

Testing / Reviewing

It should work in similar ways as existing combobox.

@preetibansalui preetibansalui requested review from a team as code owners April 30, 2024 06:50
Copy link

netlify bot commented Apr 30, 2024

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit ddbc07f
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/6630a3f418fc450008c66ea0
😎 Deploy Preview https://deploy-preview-16283--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Apr 30, 2024

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 5386296
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/663dd86f0615a40008fb2808
😎 Deploy Preview https://deploy-preview-16283--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@preetibansalui preetibansalui requested a review from tay1orjones May 3, 2024 10:46
@tay1orjones tay1orjones changed the title chore: refactor to use useCombobox chore[combobox]: refactor to use useCombobox May 6, 2024
@tay1orjones
Copy link
Member

@tw15egan @guidari This one's ready for review

It looks like this solves #15927 too.

I've closed the original PR, #15904

@tay1orjones tay1orjones changed the title chore[combobox]: refactor to use useCombobox chore(combobox): refactor to use useCombobox May 6, 2024
@tay1orjones tay1orjones removed the request for review from tw15egan May 8, 2024 14:49
Copy link
Contributor

@guidari guidari left a comment

Choose a reason for hiding this comment

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

Hey Preeti! Sorry for the late review on this.

A few things I noticed
1 - The ComboBox only opens when the icon is clicked. it should open if is clicked in the anywhere inside the input.
2 - When opening the Combobox with keyboard and searching for "3" (which is the disabled option) and after that pressing Enter, the Combobox is closed. It should stay open.
Also looks like is not announcing the disabled option in the VO when searching.

I'm happy to pair up to check any of those cases, if you want.

@tay1orjones
Copy link
Member

A few things I noticed
1 - The ComboBox only opens when the icon is clicked. it should open if is clicked in the anywhere inside the input.
2 - When opening the Combobox with keyboard and searching for "3" (which is the disabled option) and after that pressing Enter, the Combobox is closed. It should stay open.

It would be awesome if as these are fixed, new test cases could be written to cover this functionality and ensure it continues to work as expected

@preetibansalui preetibansalui requested a review from a team as a code owner May 9, 2024 08:32
@preetibansalui preetibansalui requested a review from guidari May 9, 2024 08:32
Copy link
Contributor

@guidari guidari left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀
Let's open an issue to track the VO not reading the disabled item

Copy link
Member

@tay1orjones tay1orjones left a comment

Choose a reason for hiding this comment

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

LGTM once the conflicts are fixed 🎉

@preetibansalui preetibansalui added this pull request to the merge queue May 10, 2024
Merged via the queue into carbon-design-system:main with commit 2c63069 May 10, 2024
20 checks passed
@preetibansalui preetibansalui deleted the 14684-refactor-combobox-to-use-usecombobox branch May 10, 2024 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants