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

[bug]: fix <Select> to use Peregrine's "useInformedFieldStateWrapper" like other form inputs do #4381

Open
1 of 8 tasks
brendanfalkowski opened this issue Jan 29, 2025 · 6 comments · May be fixed by #4382
Open
1 of 8 tasks
Assignees
Labels
bug Something isn't working

Comments

@brendanfalkowski
Copy link
Contributor

Describe the bug

In 2021, this PR was created to suppress a noisy warning from the informed form library:
#3399

A new hook useInformedFieldStateWrapper was created which wraps Informed's useFieldState. Instances of useFieldState were modified to use the new hook:

  • Checkbox
  • RadioGroup
  • TextArea
  • TextInput
  • ...and a bunch of hooks (useQuantity, usePaymentMethods, usePostcode, useRegion, useSearchField, useAutocomplete)

See file changes: https://github.com/magento/pwa-studio/pull/3399/files

Not sure why, but Select form inputs in Venia UI were excluded from this change in that PR. There's no mention of why. It still uses useFieldState directly from Informed, which causes the same noisy warnings.

To reproduce

Observed in our custom application. I don't think this happens in the Venia demo.

Adding a <Select> input in our footer causes these console warnings on load.

Possible solutions

Fix it by using useInformedFieldStateWrapper in Select.

Please let us know what packages this bug is in regards to:

  • venia-concept
  • venia-ui
  • pwa-buildpack
  • peregrine
  • pwa-devdocs
  • upward-js
  • upward-spec
  • create-pwa
@brendanfalkowski brendanfalkowski added the bug Something isn't working label Jan 29, 2025
Copy link

m2-assistant bot commented Jan 29, 2025

Hi @brendanfalkowski. Thank you for your report.
To speed up processing of this issue, make sure that you provided sufficient information.
Add a comment to assign the issue: @magento I am working on this


Join Magento Community Engineering Slack and ask your questions in #github channel.

@brendanfalkowski
Copy link
Contributor Author

@magento I am working on this

Copy link

m2-assistant bot commented Jan 29, 2025

Hi @brendanfalkowski! 👋
Thank you for collaboration. Only members of Community Contributors Team are allowed to be assigned to the issue. Please use @magento add to contributors team command to join Contributors team.

@brendanfalkowski
Copy link
Contributor Author

@magento add to contributors team

Copy link

m2-assistant bot commented Jan 29, 2025

Hi @brendanfalkowski! 👋
Thank you for joining. Please accept team invitation 👉 here 👈 and add your comment one more time.

@brendanfalkowski
Copy link
Contributor Author

@magento I am working on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant