Pwa-studio: Reset internal states of Sign In and Create Account forms inside the navigation drawer

Created on 6 Dec 2018  路  3Comments  路  Source: magento/pwa-studio

This issue is for the following packages:

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

This issue is a:

  • [x] Bug
  • [ ] Feature suggestion
  • [ ] Documentation issue
  • [ ] Other (Please Specify)

Environment

| Question | Answer |
| --------------------------- | :-----------: |
| Magento version | |
| Operating System + version | |
| node.js version (node -v) | |
| npm version (npm -v) | |

Description

We do not reset field values when user changes the state of the navigation drawer. For example, when user navigates from Sign In form to Create Account form and goes back, we do not reset values inside Sign In form. We also do not reset form state when user closes the drawer and open it again.

@ericerway, @awilcoxa, @soumya-ashok, please, approve that it is a bug.

Expected result:

Field values should be reseted when user enters some information and changes drawer state before submitting the form.

Possible solutions:

We can simplify the process of management the states of this form but mounting and unmounting the form when the state of the drawer changes. We can use react-transition-group for animation
https://github.com/magento-research/pwa-studio/issues/563

bug

Most helpful comment

@Starotitorov I am not sure this is a bug. The preferred experience would be not to reset the form state because that means the user would need to enter all the information again. Will discuss with @jimbo and send an update.

All 3 comments

@Starotitorov I am not sure this is a bug. The preferred experience would be not to reset the form state because that means the user would need to enter all the information again. Will discuss with @jimbo and send an update.

When the form is submitted or unmounted, the values should be cleared. But the form should not be unmounted or cleared when the drawer is merely closed. The drawers are stateful and intended to retain their state while hidden.

Closing issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sruthitechfriar picture sruthitechfriar  路  4Comments

Jordaneisenburger picture Jordaneisenburger  路  3Comments

henktheunissen picture henktheunissen  路  7Comments

larsroettig picture larsroettig  路  5Comments

subhajyotiint picture subhajyotiint  路  3Comments