Skip to content

In Sketchbook view, sketches are indented by the folder expansion control icon width even when there is no icon #1050

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

Closed
3 tasks done
per1234 opened this issue Jun 12, 2022 · 0 comments · Fixed by #1097
Closed
3 tasks done
Assignees
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

Comments

@per1234
Copy link
Contributor

per1234 commented Jun 12, 2022

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:

Arduino/
├── Foo/
│   └── Bar/
│       └── Baz/
│           └── Baz.ino
└── SomeSketch/
    └── SomeSketch.ino

Is rendered in the sketchbook view as this:

image

Which incorrectly indicates this structure:

Arduino/
└── Foo/
    └── Bar/
        └── SomeSketch/
            └── SomeSketch.ino

The reason becomes clear after enabling the "Show files inside Sketches" preference:

image

To reproduce

  1. Select File > Preferences... from the Arduino IDE menus.
  2. Uncheck the box next to " Show files inside Sketches if it is checked.
  3. Click the OK button.
  4. Open the "Sketchbook" view.

🐛 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

  • 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
@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Jun 12, 2022
@per1234 per1234 changed the title Sketches are indented by the folder expansion control icon width even when there is no icon In Sketchbook view, sketches are indented by the folder expansion control icon width even when there is no icon Jun 13, 2022
@fstasi fstasi added the priority: medium Resolution is a medium priority label Jun 22, 2022
@francescospissu francescospissu linked a pull request Jun 22, 2022 that will close this issue
4 tasks
@per1234 per1234 added the conclusion: resolved Issue was resolved label Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants