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: flashing to continue on navigation changes #11

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

barrenechea
Copy link
Contributor

@barrenechea barrenechea commented Jun 1, 2024

Refactored the flashing logic for both Firmware Upgrade and Flash Node tabs into a global provider & context, allowing it to continue no matter the tab the user is currently at.
The new context handles toasts and the reboot dialog (after Firmware Upgrade finishes), allowing it to report the status anywhere.

Also, here are some edge cases I've covered:

  • Navigation links for either Flash Node or Firmware Upgrade will now pulse accordingly if a flashing procedure is ongoing to give the user a clue something is going on there.
  • The UI will now allow only one Flash procedure at a time, disallowing a behavior where the user could have been running a Flash Node procedure and then attempting to do a Firmware Upgrade simultaneously.

The bundle size is at 1254 KB. Bumped patch version to 3.1.2.

Fixes #10

Caveat: Because React unmounts all unused components on navigation changes, I cannot keep the form states across tab changes. The tab will still report the progress for an ongoing flashing procedure, but the file and SHA-256 fields will be lost if the tab changes. If I store the form state in this new context, that would load the file into RAM... It does not sound like a good idea 😄

@barrenechea
Copy link
Contributor Author

@svenrademakers, I've already tested it on my end, but it would be great if you could give this branch a spin to validate the fix! 🙏🏻

@barrenechea barrenechea changed the title fix: flashing to continue on tab switching fix: flashing to continue on navigation changes Jun 1, 2024
@svenrademakers svenrademakers merged commit 3b807e8 into turing-machines:main Jun 4, 2024
3 checks passed
@svenrademakers
Copy link
Collaborator

issue solved! thanks for the quick fix! much appreciated!

@barrenechea barrenechea deleted the fix-flashing branch October 28, 2024 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clicking tabs breaks UI
2 participants