Automattic / bugomattic

Bugomattic is a tool that guides bug reporters to the right actions within large, complex organizations
GNU General Public License v2.0
6 stars 0 forks source link

[Bug]: Start over flashes the bad state images briefly #43

Closed dpasque closed 1 year ago

dpasque commented 1 year ago

Quick summary

As a weird artifact of how our state handling works for the NextStepsStep, when you click "Start Over", you very briefly see the image we use when there is bad URL state.

The problem is that the component rerenders on starting over, but before we change the local state for stepHasBeenActive, so in that brief window, the component shows the warning message.

Steps to reproduce

  1. Click the start over button

Browser

No response

Other notes

We track whether we've been on the step in local state so that the warning messages don't go away when you go back a step. We could change that behavior and just base the warning message display on the current active step.

We could also probably fix this by moving from local state to the redux store, which I believe would just trigger one re-render.