Skip to content

Sketchbook view can't handle more than two tree levels #1015

Closed
@per1234

Description

@per1234

Describe the problem

The Arduino IDE's "Sketchbook" view allows the user to browse and open sketches in their sketchbook folder.

Users may find it useful to organize their sketches into subfolders of the sketchbook folder.

🐛 Sketches with a tree deeper than two levels are not displayed correctly and cannot be opened via the "Sketchbook" view.

To reproduce

  1. Select File > Save As... from the Arduino IDE menus.
  2. Save the sketch under a subfolder of your sketchbook folder:
    Arduino/
    └── SomeSubfolder/
        └── SomeSketch/
            └── SomeSketch.ino
    
  3. Select File > New from the Arduino IDE menus.
  4. Close the IDE window for the "SomeSketch" sketch.
    This is done for the demonstration that the sketch can't be opened via the "Sketchbook" view.
  5. Select File > Preferences... from the Arduino IDE menus.
  6. Check the box next to "☐ Show files inside Sketches.
    The issue also occurs with this setting disabled, except one additional tree level is possible due to the sketch file not counting toward the limit.
  7. Click the OK button.
  8. Open the "Sketchbook" view.
  9. Use the control to expand the "SomeSubfolder" folder.
    🐛 The expansion results in SomeSubfolder/SomeSketch:
    image
    rather than the expected tree:
    image
  10. Double click on "SomeSketch"
    🐛 The sketch does not open.

Expected behavior

"Sketchbook" view supports any reasonable level of folder depth.

Arduino IDE version

2.0.0-rc6-snapshot-5fc30bd

Operating system

Windows, Ubuntu

Operating system version

Windows 10, Ubuntu 20.04

Additional context

I bisected the introduction of this issue to 1ae60ec (it does not occur when using the build for b8c718c).


The issue also affects the "Remote Sketchbook" view in the same way.

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details

Metadata

Metadata

Assignees

Labels

conclusion: resolvedIssue was resolvedpriority: lowResolution is a low prioritytopic: codeRelated to content of the project itselftype: imperfectionPerceived defect in any part of project

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions