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

refactor(select): Fix all syncing issues with the Select component #2983

Merged

Conversation

NicholasBoll
Copy link
Member

@NicholasBoll NicholasBoll commented Oct 12, 2024

Summary

The useComboboxInputConstrained hook was created for Comboboxes that can only have a value from within a set of defined options. The value is constrained by the options passed to it. useComboboxInputConstrained assumes there will be multiple inputs where one is presented to the user and the other is for the form/server. The hook keeps the model in sync with external ways to manipulate the input: React value prop (controlled inputs), browser/extension autofill, and testing tools.

Select was updated to use useComboboxInputConstrained which fixes several bugs at once:

Release Category

Components


Checklist

For the Reviewer

  • PR title is short and descriptive
  • PR summary describes the change (Fixes/Resolves linked correctly)

Where Should the Reviewer Start?

Areas for Feedback? (optional)

  • Code
  • Documentation
  • Testing
  • Codemods

@NicholasBoll NicholasBoll marked this pull request as ready for review October 12, 2024 06:30
@NicholasBoll NicholasBoll added ready for review Code is ready for review 12.x labels Oct 12, 2024
@github-actions github-actions bot requested a review from alanbsmith October 12, 2024 06:30
Copy link

cypress bot commented Oct 12, 2024

Workday/canvas-kit    Run #7898

Run Properties:  status check passed Passed #7898  •  git commit 9c4a98adc0 ℹ️: Merge 192a7c15da58fd5dab320f83677c45b4c29982e5 into 23aaa97b9bc903bc333d2baa1654...
Project Workday/canvas-kit
Run status status check passed Passed #7898
Run duration 03m 53s
Commit git commit 9c4a98adc0 ℹ️: Merge 192a7c15da58fd5dab320f83677c45b4c29982e5 into 23aaa97b9bc903bc333d2baa1654...
Committer Nicholas Boll
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 28
Tests that did not run due to a developer annotating a test with .skip  Pending 24
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 1082
UI Coverage  21.71%
  Untested elements 1635  
  Tested elements 451  
Accessibility  99.17%
  Failed rules  5 critical   5 serious   0 moderate   2 minor
  Failed elements 181  

@@ -22,17 +22,17 @@ import {useComboboxModel} from './useComboboxModel';
* ```
*/
export const useComboboxKeyboardTypeAhead = createElemPropsHook(useComboboxModel)(model => {
const keySofar = React.useRef('');
const keySoFar = React.useRef('');
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the other spelling made more sense 😉

Copy link
Member Author

Choose a reason for hiding this comment

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

SOFAR:

noun

a system in which the sound waves from an underwater explosion are detected and located by three or more listening stations, useful in determining the position at sea of survivors of a disaster.

@NicholasBoll NicholasBoll added automerge and removed ready for review Code is ready for review labels Oct 14, 2024
@alanbsmith alanbsmith enabled auto-merge (squash) October 14, 2024 04:56
@alanbsmith alanbsmith merged commit c1e0252 into Workday:prerelease/major Oct 14, 2024
18 of 19 checks passed
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.

4 participants