Open emmastephenson opened 2 years ago
This is an example of the prompt:
@emmastephenson when are we planning to upgrade the react-router?
Also, the design team discussed this and we believe auto-saving the input fields isn't a common design pattern for form designs. We believe that we should implement an existing SR modal (see screenshot example from Conduct Test) to ask users this prompt—this is a common design pattern we've seen in form design.
@kenieh good to know, thanks! We don't have a scheduled time to upgrade react-router yet. I think we'll need to upgrade it whenever we move to the new version of React though.
It looks like the React Router team is considering re-enabling Prompt in v6: https://github.com/remix-run/react-router/issues/8139#issuecomment-1314593566
We should check back on that thread before picking up this ticket.
Note that this was not required for the recent React upgrade! So this will only need to be done once we want to upgrade react-router.
Background
We use the Prompt component on several forms to ask users if they want to navigate away from a form with unsaved changes. This Prompt was removed in the latest version of react-router, so in order to upgrade we have to either implement a workaround or change the design.
Action requested
A design consultation is requested to see if we want to continue using the Prompt pattern, or if we'd rather move towards quietly storing the data locally so the user can come back to it. (See #4508 for a further discussion of the options)
Acceptance Criteria
A decision has been made to either remove the Prompt pattern, or to work around it for the upgrade. A ticket has been made for engineering followup to implement the chosen solution.
Additional context
See #4508 for more discussion and details.