-
Notifications
You must be signed in to change notification settings - Fork 48
Added notification when filename is wrong. #63
Conversation
Co-Authored-By: Jonathan Wang <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please look at suggestions. For the behavior of the debugger for the simulator, we want it such that we can still run .py
files, but notify the user that if they want to run the same file on the device, they should rename it to code.py
or main.py
.
Made some changes check them out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks alright to me aside from the capitalization of "python".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@FMounz Some needed changes! but other than that looks good
Co-Authored-By: Luke Slevinsky <[email protected]>
Co-Authored-By: Luke Slevinsky <[email protected]>
Co-Authored-By: Luke Slevinsky <[email protected]>
Co-Authored-By: Luke Slevinsky <[email protected]>
…crosoft/vscode-python-embedded into users/t-chcido/filename-check
Co-Authored-By: Luke Slevinsky <[email protected]>
Co-Authored-By: Luke Slevinsky <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to work fine, just some suggestions/questions, specially reformatting would be nice :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unsolicited advice 2: Electric boogaloo
src/extension.ts
Outdated
...[ | ||
DialogResponses.DONT_SHOW, | ||
DialogResponses.MESSAGE_UNDERSTOOD | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why you're wrapping those enum values in an array and spreading them right after?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand what you mean by spreading them right after?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you put something in an array and then use the spread operator ...
you're taking the elements out of the array as if they we're never in one to begin with!
look what happens here if you press play
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get you now after reading this .
Thanks for that very enlighting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, one comment
}else if(!validCodeFileName(currentFilePath) && shouldShowInvalidFileNamePopup){ | ||
vscode.window | ||
.showInformationMessage(CONSTANTS.INFO.INVALID_FILE_NAME_DEBUG, | ||
...[ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we're removing the spread operator elsewhere might as well do it here too?
Description:
This PR adds notification to the user when the file name being deployed or simulated is not
main.py
orcode.py
. We have that notification for the deployment, the simulation and the debugger.A button is present on the simulator so it won't show another time during the session.
The deployment and debugging are cancelled in that case. The simulation will still happen.
Type of change
Limitations:
Please describe limitations of this PR
Testing:
code.py
ormain.py
. An error message should appear when running the "deploy to device command", deployment should not happen.code.py
ormain.py
. An information message should appear when running the Pacifica debugger debugging continue. When clicking on the "Got it" or "Don't show again" button , the pop-up should close.code.py
ormain.py
. An information pop-up should appear when running the "run to device command". When clicking on the "Got it" or "Don't show again" button , the pop-up should close.Checklist: