Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(app): fix infinitely re-rendering/never rendering firmware success toasts #14981

Merged
merged 1 commit into from
Apr 23, 2024

Commits on Apr 23, 2024

  1. fix(app): fix infinitely re-rendering/never rendering firmware succes…

    …s toast
    
    There are two issues with rendering firmware update toasts. First, the toasts depend on a request id
    stored as state within the ModuleCard, but ModuleCards most often unrender during the firmware
    update process, so this state is lost. This causes the toast never to render. The second issue is
    that sometimes, given the timing of the polling for attached modules, the module is always attached
    during the firmware update, thereby causing the module card not to unrender. When this happens, the
    useEffect hook responsible for making the success toast has conditional logic that is always true
    after an update, causing the toast to render infinitely. The solution to both these problems is to
    lift the request id state out of the module card itself and then abstracta way the storage/retrieval
    via a utility hook, which is utilized by all parent components of ModuleCard.
    mjhuff committed Apr 23, 2024
    Configuration menu
    Copy the full SHA
    2cfa04f View commit details
    Browse the repository at this point in the history