-
-
Notifications
You must be signed in to change notification settings - Fork 399
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
feat: rename, deletion, and validation support #1833
Conversation
There is another bug with the server. When IDE2 tries to rename a non-existing sketch via the |
8804332
to
31cc604
Compare
must-set-focus-in-editor-after-rename.mp4Upstream: eclipse-theia/theia#12139 |
Update: hacked in 743c9bf |
|
5b7a045
to
0e6c19f
Compare
export function sketchNotFound(input: string): string { | ||
return nls.localize( | ||
'arduino/cloudSketch/notFound', | ||
"Could not pull the cloud sketch '{0}'. It does not exist.", |
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.
Should "cloud" be capitalized?
I'm not a fan of the recent trend I've observed of sometimes capitalizing "sketch" in sentences, since that is not a proper noun, but if "cloud" is short for the "Arduino Cloud" service (as opposed to being a reference to the general concept of "the cloud"), then this is a proper noun and so should be capitalized.
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.
Should "cloud" be capitalized?
I will leave this decision to you. Whichever you think is the best.
the recent trend I've observed of sometimes capitalizing "sketch" in sentences
I found the following translations from this PR where the "sketch" is capitalized in a sentence. (I hope I did not leave out anything):
These have not changed in this PR or recently:
arduino-ide/arduino-ide-extension/src/browser/widgets/cloud-sketchbook/cloud-sketchbook-tree.ts
Line 107 in 9a3b107
'Pulling this Sketch from the Cloud will overwrite its local version. Are you sure you want to continue?' |
arduino-ide/arduino-ide-extension/src/browser/dialogs/cloud-share-sketch-dialog.tsx
Line 66 in 9a3b107
'Choose visibility of your Sketch:' |
arduino-ide/arduino-ide-extension/src/browser/dialogs/cloud-share-sketch-dialog.tsx
Line 75 in 9a3b107
'Private. Only you can view the Sketch.' |
arduino-ide/arduino-ide-extension/src/browser/dialogs/cloud-share-sketch-dialog.tsx
Line 86 in 9a3b107
'Public. Anyone with the link can view the Sketch.' |
arduino-ide/arduino-ide-extension/src/browser/widgets/cloud-sketchbook/cloud-sketchbook-tree.ts
Line 70 in 9a3b107
'This is a Public Sketch. Before pushing, make sure any sensitive information is defined in arduino_secrets.h files. You can make a Sketch private from the Share panel.' |
Line 187 in 9a3b107
'Installation will overwrite the Sketch on the board.' |
These have not changed, and the sentence starts with "sketch":
"Sketch '{0}' must be verified before starting a debug session. Please verify the sketch and start debugging again. Do you want to verify the sketch now?", |
These are command or menu labels, so capitalized "sketch" is expected:
label: nls.localize('arduino/sketch/new', 'New Sketch'), |
Line 59 in 9a3b107
'New Cloud Sketch' |
arduino-ide/arduino-ide-extension/src/browser/contributions/open-sketch-external.ts
Line 25 in 9a3b107
label: nls.localize('arduino/sketch/showFolder', 'Show Sketch Folder'), |
arduino-ide/arduino-ide-extension/src/browser/widgets/sketchbook/sketchbook-commands.ts
Line 15 in 9a3b107
label: 'Open Sketch in New Window', |
nls.localize('arduino/menu/sketch', 'Sketch') |
name: nls.localize('arduino/sketch/sketch', 'Sketch'), |
label: nls.localize('arduino/sketch/archiveSketch', 'Archive Sketch'), |
Line 78 in 9a3b107
label: 'Pull Sketch', |
Line 87 in 9a3b107
label: 'Push Sketch', |
label: nls.localize('arduino/cloudSketch/new', 'New Cloud Sketch'), |
arduino-ide/arduino-ide-extension/src/browser/widgets/sketchbook/sketchbook-composite-widget.tsx
Line 84 in 9a3b107
label={nls.localize('arduino/sketchbook/newSketch', 'New Sketch')} |
Line 217 in 9a3b107
title: nls.localize('arduino/cloud/shareSketch', 'Share Sketch'), |
These are new and were requested in the design doc:
arduino-ide/arduino-ide-extension/src/browser/contributions/rename-cloud-sketch.ts
Line 85 in 9a3b107
'New name of the Cloud Sketch' |
'Name of the new Cloud Sketch' |
Let me know what to do. Thanks!
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 will leave this decision to you. Whichever you think is the best.
I surveyed the Arduino Cloud-related content on arduino.cc and found that "Cloud" is capitalized in contexts equivalent to "Cloud sketch". So I think it should be capitalized.
the sentence starts with "sketch":
These are command or menu labels, so capitalized "sketch" is expected:
Yes, in cases where the work occurs at the start of a sentence or contexts where the standard for capitalization style is "title case", there is no question that "Sketch" is correct.
These are new and were requested in the design doc:
Then I guess I would have to request the input of the designers.
@91volt @gmarchiarduino please provide clear rules for when "sketch" should and should not be capitalized. As I've said several times in the past, it would be very helpful to have this sort of thing documented in a style guide.
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.
This part is something I cannot control, so I moved it to its dedicated task: #1884.
arduino-ide-extension/src/browser/theia/workspace/workspace-commands.ts
Outdated
Show resolved
Hide resolved
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.
UPDATE: Fixed by fef3b6a
Cloud sketch can be created with Windows-incompatible trailing .
Do not end a file or directory name with a space or a period. Although the underlying file system may support such names, the Windows shell and user interface does not.
When creating/renaming local sketches, Arduino IDE automatically removes a trailing .
if the user adds one, but this is not done when creating/renaming Cloud sketches.
To reproduce
- Start the IDE build from this PR on a Windows machine.
- Select File > New Cloud Sketch from the Arduino IDE menus.
- Type
EndsWithDot.
in the sketch name field. - Click the "OK" button.
🐛 Multiple errors notifications and a spurious sketch name mismatch dialog appear:
- Click the "OK" button on the dialog.
🐛 The sketch fails to open. - Open the EndsWithDot. sketch from the Cloud sketchbook.
🐛 The sketch fails to open.
Arduino IDE version
bf6c814 (tester build for 9687fc6)
Operating system
Windows
Operating system version
11
Great review!
I was surprised because there is no such logic in IDE2. It turned out, the OS is cutting this, not IDE2. Please take a look at the attached screencast. Electron's native file dialog does it on save: os_trims_the_dot.mp4When using the CLI:
Doing with
|
arduino-ide-extension/src/browser/contributions/save-as-sketch.ts
Outdated
Show resolved
Hide resolved
arduino-ide-extension/src/browser/contributions/save-as-sketch.ts
Outdated
Show resolved
Hide resolved
arduino-ide-extension/src/browser/contributions/save-as-sketch.ts
Outdated
Show resolved
Hide resolved
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.
Very excellent work. Thanks Akos!
Motivation
remote
tocloud
sketch in the UI.Change description
Other information
Closes #1599
Closes #1825
Closes #649
Closes #1847
Closes #1882
Ref #1826 (partially fixes)
Reviewer checklist