-
-
Notifications
You must be signed in to change notification settings - Fork 390
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
Allow to close files in certain folders #946
Conversation
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.
Works for me! 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.
As I see additional folders added selectively to the exclusion, it occurs to me it may be better to go at this from the other direction: by simply making the root of the sketch folder the "non-closable" area, with any files from subfolders always being closable.
That will provide symmetry with the sketch files that are opened by default and avoid the poor user experience of being able to open an additional file via the Sketchbook view (when "☐ Show files inside Sketches" is enabled), but then not being allowed to close it again.
For example, the Arduino Sketch Specification provides a data
subfolder "to add additional files to the sketch, which will not be compiled". Since these will not be part of the sketch program by definition, there is no reason we should force the user to keep the tab open.
@per1234 Thanks for the input, I've updated the code to only prevent file from closing which are direct children of the sketch directory. As far as I could see in the sketch spec this seems to be the intended behavior. Or does it only apply to |
Very nice. Thanks!
The established behavior from Arduino IDE 1.x is that all the sketch code files from the root of the sketch folder are opened when you load the sketch and are not closable. That is done according to the following file extensions:
The most important is the By loading all the Since they are more likely to be used by advanced users, it probably isn't so essential to avoid the closure of the code files with other extensions, but they do all become part of the sketch program so I think it is reasonable. The When it comes to the non-code "additional" file extensions ( |
Follow up: #977 |
Motivation
Closes #866
Closes #831
Change description
When adding a widget to the tracker we first try to see whether it is contained in one of our
ignoreFolders
(.vscode
,.theia
andsrc
so far). If it is, we allow it to stay closable.Reviewer checklist