pwa-studio icon indicating copy to clipboard operation
pwa-studio copied to clipboard

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

Open brendanfalkowski opened this issue 10 months ago • 8 comments

Describe the bug

In 2021, this PR was created to suppress a noisy warning from the informed form library: https://github.com/magento/pwa-studio/pull/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
  • [x] venia-ui
  • [ ] pwa-buildpack
  • [ ] peregrine
  • [ ] pwa-devdocs
  • [ ] upward-js
  • [ ] upward-spec
  • [ ] create-pwa

brendanfalkowski avatar Jan 29 '25 22:01 brendanfalkowski

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.

m2-assistant[bot] avatar Jan 29 '25 22:01 m2-assistant[bot]

@magento I am working on this

brendanfalkowski avatar Jan 29 '25 22:01 brendanfalkowski

Hi @brendanfalkowski! :wave: 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.

m2-assistant[bot] avatar Jan 29 '25 22:01 m2-assistant[bot]

@magento add to contributors team

brendanfalkowski avatar Jan 29 '25 22:01 brendanfalkowski

Hi @brendanfalkowski! :wave: Thank you for joining. Please accept team invitation :point_right: here :point_left: and add your comment one more time.

m2-assistant[bot] avatar Jan 29 '25 22:01 m2-assistant[bot]

@magento I am working on this

brendanfalkowski avatar Jan 29 '25 22:01 brendanfalkowski

@adobe export issue to Jira project PWA

glo82145 avatar May 27 '25 08:05 glo82145

:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/PWA-3463 is successfully created for this GitHub issue.

github-jira-sync-bot avatar May 27 '25 08:05 github-jira-sync-bot