-
-
Notifications
You must be signed in to change notification settings - Fork 443
Default sketch names sort out of order #2068
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
Comments
thank you, @drf5n Your proposal is interesting, especially from the point of view of someone who only accepts YYYYMMDDHHMMss formats for their files 🤣 |
Hi, thanks for sharing your idea. Nice one! @drf5n, would you be interested in contributing to this feature to IDE2? I am happy to guide you, or you can reference a very much related external contribution to change the default A few remarks:
Alternatively, IDE2 can provide a set of predefined date formats (as an enum preference type) if such flexibility is not required. |
@kittaakos -- I'm uncomfortable programming in .ts or how to modify the UI for advanced settings. Advanced settings seems impenetrable. Regarding the example of the default.ino file, on my Mac, discovering the default sketch setting doesn't seem accessible through either "Arduino IDE/Preferences" or "Arduino IDE/Advanced": ![]() ![]() I can't grab a screenshot of it, but normal Mac apps use the option key to expose the more advanced alternative options. In this case, the option key changes the "Arduino IDE" menu to add an alternate Quit option: Option-Command-Q offers to "Quit and Keep Windows" I'd expect that |
Thanks for looking at the code, @drf5n. We will handle it later, then.
You don't need to change the UI at all. That's why I have referenced the other PR. Please see this comment:
|
Describe the problem
The default sketch name template of 'sketch_MMMDDx.ino' produces names that do not sort in a sane order.
January sorts after February, April comes first, and December comes second.
Using a pattern like
sketch_YYYYMMDDx
would produce names which sort in a sane order.To reproduce
Produce sketches with default names over the course of a year or multiple years.
Expected behavior
I would expect auto-generated sketch names to be created with an ISO-9660-ish name and sort in a sane, chronological order.
Either include the year and numeric month, or if awkward names that encourage renaming are the goal, use a simpler scheme like
sketch_xxxx
.Arduino IDE version
2.1.0
Operating system
macOS
Operating system version
13.2.1
Additional context
Per @ptillisch, the code is here:
arduino-ide/arduino-ide-extension/src/node/sketches-service-impl.ts
Lines 372 to 415 in 31deeeb
I'm not sure how that code pads the day numbers with zeros, but maybe something like this would work as I expect it should:
Issue checklist
The text was updated successfully, but these errors were encountered: