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): clear <input> value after robot update file select #5789

Merged
merged 1 commit into from
Jun 2, 2020

Conversation

mcous
Copy link
Contributor

@mcous mcous commented Jun 1, 2020

overview

In a small (code-wise) oversight, we forgot to clear the value of the <input type="file"> that drives the "robot update from file" flow. Without that value reset (as is present on the protocol upload input), the upload button can become "stuck" if you attempt to select the same file

Fixes #5781

changelog

  • fix(app): clear value after robot update file select

review requests

  1. Try to upload an "update" file that you know will cause an error (e.g. a random, non-update zip file)
  2. After the update fails, try to upload a new, working file
    • Bonus points: have the second file have the exact same absolute path as the first file
  • Second file triggers the update flow

risk assessment

Low; fixing a bug by mirroring implementation of the protocol file upload button which, once upon a time, had this exact same problem.

The component isn't covered by unit tests, which is a problem, though. See #5174 for tracking that lack of testing

@mcous mcous added app Affects the `app` project ready for review fix PR fixes a bug robot-svcs Falls under the purview of the Robot Services squad (formerly CPX, Core Platform Experience). labels Jun 1, 2020
@mcous mcous requested a review from a team as a code owner June 1, 2020 18:50
@mcous mcous requested review from b-cooper, a team, amitlissack and sanni-t and removed request for a team June 1, 2020 18:50
Copy link
Contributor

@b-cooper b-cooper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on robot, upload works after bad first file. 🍰

@mcous mcous merged commit 62372b0 into edge Jun 2, 2020
@mcous mcous deleted the app_fix-stuck-update-button branch June 2, 2020 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app Affects the `app` project fix PR fixes a bug robot-svcs Falls under the purview of the Robot Services squad (formerly CPX, Core Platform Experience).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(app): software update from file button does not respond after an error
2 participants