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

[feature]: Region can be optional or required

Open sirugh opened this issue 5 years ago • 5 comments

Is your feature request related to a problem? Please describe. The region input field is currently always required although some countries do not use them or require them.

https://github.com/magento/pwa-studio/pull/2659#issuecomment-682238724

If someone wants to make the region field optional they have to duplicate the component just to remove the validate prop on the region field.

Describe the solution you'd like

  1. Allow for configuration to inform the UI whether region is required or not.
  2. Surface this configuration in a GQL query, probably the countries query

Describe alternatives you've considered

One alternative would be to remove the validate prop on the region field implementations. It would then fall to the user to submit the form to find out if the region is required or not. I would prefer not to do this.

Additional context

https://github.com/magento/pwa-studio/pull/2659#issuecomment-682238724

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

  • [ ] venia-concept
  • [ ] venia-ui
  • [ ] pwa-buildpack
  • [ ] peregrine
  • [ ] pwa-devdocs
  • [ ] upward-js
  • [ ] upward-spec
  • [ ] create-pwa

sirugh avatar Aug 31 '20 16:08 sirugh

Hi @sirugh. Thank you for your report. To help us process this issue please make sure that you provided sufficient information.

Please, add a comment to assign the issue: @magento I am working on this


m2-assistant[bot] avatar Aug 31 '20 16:08 m2-assistant[bot]

@sirugh i think we can close it rigth

larsroettig avatar Oct 22 '20 19:10 larsroettig

@larsroettig why do you think that? Doesn't look like either of my proposed solutions have made it :P

sirugh avatar Oct 22 '20 20:10 sirugh

@magento export issue to JIRA project PWA as Story

sirugh avatar May 17 '21 21:05 sirugh

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

github-jira-sync-bot avatar May 17 '21 21:05 github-jira-sync-bot