python-discord / forms-frontend

Frontend for Python Discord forms.
MIT License
15 stars 9 forks source link

Add redux.js to add support for state storage #418

Open janine9vn opened 2 years ago

janine9vn commented 2 years ago

Description

There will be scenarios where we may want to re-render a page/component but keep track of prior state/entries for better user experience. Redux.js is how we'll be approaching this

Example Scenario

When there's a submission error and the user has to log in again, we don't want them to lose the response they were about to submit.

Considerations

DavinderJolly commented 2 years ago

Hey, i'd like to try and implement this

DavinderJolly commented 2 years ago

i closed this by mistake but i'd like to be assigned to this issue if noone else is already working on adding redux :)

gitautas commented 2 years ago

Can you create/link issues with the scenarios that you "may" want to implement where this is needed? On it's own this issue doesn't communicate any motivation or reasoning.

jb3 commented 2 years ago

On it's own this issue doesn't communicate any motivation or reasoning.

@gitautas the main reasoning is cited, "re-render a page/component but keep track of prior state/entries". We want to keep track of the state of the form when the user closes the page.

The issue does lack a bit the full goal which is to persist (probably in localStorage) the state of all partially completed forms and restore on form open, which will ensure that progress is not lost should a form be open/closed/etc.