wso2 / product-is

Welcome to the WSO2 Identity Server source code! For info on working with the WSO2 Identity Server repository and contributing code, click the link below.
http://wso2.github.io/
Apache License 2.0
748 stars 728 forks source link

Give a disclaimer to users when trying to navigate away from unsaved forms #8709

Closed brionmario closed 1 week ago

brionmario commented 4 years ago

Is your feature request related to a problem? Please describe. In Developer/Admin portals edit views, different sections have individual submit buttons to save the changes. If a user accidentally switches to a different tab or a page, all the changes will be lost.

Describe the solution you'd like It would be better to show a disclaimer message when the forms are not pristine to improve UX.

brionmario commented 4 years ago

The implementation of the above feature was attempted on top of the current implementation and the following set of issues were observed.

  1. The use of a custom form module i.e @wso2is/forms posed some challenges in handling the internal form state properly.
  2. Some custom components (URLInput, TransferList) we not controlled by the forms module, hence their form state had to be separately managed which introduced complexity to the existing code.

Implementation

@wso2is/forms - wso2/identity-apps#965 Application Management - https://github.com/brionmario/identity-apps/tree/feature-unsaved-changes-disclaimer

Suggestions

Switching to a different form library will be a better solution. Redux form has inbuilt support for form state checking.

isharak commented 1 week ago

This issue is being closed due to extended inactivity. Please feel free to reopen it if further attention is needed. Thank you for helping us keep the issue list relevant and focused!