Skip to content
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

Sketchbook view scrolls to selected sketch when another sketch is expanded/collapsed #2456

Open
3 tasks done
per1234 opened this issue Jun 17, 2024 · 1 comment
Open
3 tasks done
Labels
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 17, 2024

Describe the problem

Arduino IDE's "SKETCHBOOK" view shows a list of the sketches in the sketchbook folder. When sketches are located under a subfolder, or when the "Show files inside Sketches" preference is enabled, the folder tree can be expanded or collapsed by clicking the or ˅ icon to the left of the folder name in the view.

🐛 The view scrolls to make the currently selected item visible when the tree control icons are used.

sketchbook-scroll

To reproduce

  1. Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
    The "Preferences" dialog will open.
  2. Check the box next to "☐ Show files inside Sketches.
  3. Click the "OK" button.
    The "Preferences" dialog will close.
  4. Click the folder icon to open the "SKETCHBOOK" view in the side panel of the Arduino IDE window.
  5. If you don't already have enough sketches in your sketchbook to cause the "SKETCHBOOK" view to be scrollable, perform repeated File > Save As... operations until you have enough sketches.
  6. Click on the first item on the list.
    The item will be highlighted to indicate it is selected.
  7. Scroll to the bottom of the "SKETCHBOOK" view.
  8. Click the icon on the last sketch/folder on the list.

🐛 The view is scrolled up to the top, making the list item you were interacting with no longer visible.

Expected behavior

The

Arduino IDE version

aa9b10d

Operating system

  • Windows

Operating system version

11

Additional context

I arbitrarily chose to specify the use of the first and last list items in the demo, but the fault will occur with items at any position as long as the selected item is scrolled out of the visible view.

Originally reported by @dougp2 at https://forum.arduino.cc/t/sketch-folder-jumps-to-wrong-place-ide-2-3-2/1271809

Workaround

Click on the list item before clicking on its tree control icon.

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 17, 2024
@dougp2
Copy link

dougp2 commented Jun 17, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

2 participants