magento / pwa-studio

šŸ› Development tools to build, optimize and deploy Progressive Web Applications for Magento 2.
https://developer.adobe.com/commerce/pwa-studio/
Open Software License 3.0
1.06k stars 682 forks source link

[feature]: Region can be optional or required #2666

Open sirugh opened 4 years ago

sirugh commented 4 years ago

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:

m2-assistant[bot] commented 4 years ago

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


larsroettig commented 3 years ago

@sirugh i think we can close it rigth

sirugh commented 3 years ago

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

sirugh commented 3 years ago

@magento export issue to JIRA project PWA as Story

github-jira-sync-bot commented 3 years ago

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