In Sketchbook view, sketches are indented by the folder expansion control icon width even when there is no icon #1050
Labels
conclusion: resolved
Issue was resolved
priority: medium
Resolution is a medium priority
topic: code
Related to content of the project itself
type: imperfection
Perceived defect in any part of project
Describe the problem
The Arduino IDE's "Sketchbook" view allows the user to browse and open sketches in their sketchbook folder.
The nesting structure of any subfolders of the sketchbook are indicated by indentation levels.
Since a sketch is the project unit used by the Arduino IDE, by default each sketch is shown as a single item in the "Sketchbook" view tree. The "Show files inside Sketches" preference causes the view to also show the files and subfolders of the sketch. The expansion of these is controlled via a ❯/˅ icon to the left of the sketch name, just the same as is always done for non-sketch subfolders.
🐛 The space where the folder expansion control icon would be is preserved even when it is no longer shown due to the "Show files inside Sketches" preference being disabled. This makes the structure of the sketchbook very difficult to understand because the sketch is shown as indented, which indicates it is at a deeper tree level than is actually the case.
This sketchbook structure:
Is rendered in the sketchbook view as this:
Which incorrectly indicates this structure:
The reason becomes clear after enabling the "Show files inside Sketches" preference:
To reproduce
☑
Show files inside Sketches if it is checked.🐛 The sketches have an inappropriate indentation level.
Expected behavior
The sketch name is not indented by the space where the folder expansion control icon would be when the "Show files inside Sketches" preference is disabled.
The sketch icon should be horizontally aligned with the expansion control icon of any non-sketch subfolders at the same level as the sketch.
Arduino IDE version
2.0.0-rc7
Operating system
Windows, Linux
Operating system version
Windows 10, Ubuntu 20.04
Additional context
See #1038 for an example of confusion caused by this bug.
Issue checklist
The text was updated successfully, but these errors were encountered: