Skip to content

Rightmost tab is selected by default #643

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
per1234 opened this issue Dec 1, 2021 · 1 comment · Fixed by #1676
Closed

Rightmost tab is selected by default #643

per1234 opened this issue Dec 1, 2021 · 1 comment · Fixed by #1676
Assignees
Labels
conclusion: resolved Issue was resolved 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 Dec 1, 2021

Describe the bug

Arduino sketches may consist of multiple files, which are shown in the Arduino IDE as tabs when that sketch is open. The file with name matching the sketch name is always leftmost in the tabs. Since the .ino files are concatenated in order, the leftmost file is always the primary file.

For this reason, the leftmost tab should be selected by default.

🐛 However, the IDE currently selects the rightmost by default. This results in a less friendly experience for beginners.

To Reproduce

  1. Download this demonstration multi-file sketch: MultipleFiles.zip
  2. Unzip the downloaded file.
  3. Select File > Open from the Arduino IDE menus.
  4. Select the MultipleFiles.ino file from the unzipped sketch folder.
  5. Click the Open button.

🐛 Note that the second tab (SomeTab.ino) was selected.

Expected behavior

Select the leftmost tab by default.

On subsequent opens of the sketch, it is fine to remember the previous tab selection.

Desktop

  • OS: Windows 10
  • Version: 2.0.0-rc1-snapshot.f0d9894
    Date: 2021-11-30T16:25:41.414Z
    CLI Version: 0.20.1 [abb21449]

Additional context

Although the multi-file sketch capability is often used for more advanced sketches, this is not always true. For example, File > Examples > 02.Digital > ToneMelody is an introductory level example sketch.

@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Dec 1, 2021
@per1234 per1234 changed the title Last tab is selected by default Rightmost tab is selected by default May 12, 2022
@ubidefeo
Copy link

ubidefeo commented Nov 2, 2022

This issue is also happening on Mac OS.
What I have noticed is that with a clean system, at the first Sketch loading, the tabs are open and selected in alphabetical order (except for the main .ino file which is opened first).
The focus is shifted to the last opened tab.
On my Mac I see the tabs loaded at 2 seconds distance and the focus happening.
The last tab is selected and focussed and so it stays.

When the Sketch is closed, the currently selected tab will be remembered, and it will be in focus at the next loading (see screenshots)

CleanShot 2022-11-02 at 14 14 07@2x

CleanShot 2022-11-02 at 14 14 44@2x

CleanShot 2022-11-02 at 14 15 22@2x

@ubidefeo ubidefeo assigned AlbyIanna and unassigned fstasi Nov 2, 2022
@ubidefeo ubidefeo added this to the 2.0.2 milestone Nov 2, 2022
@davegarthsimpson davegarthsimpson removed this from the 2.0.2 milestone Nov 7, 2022
kittaakos pushed a commit that referenced this issue Nov 14, 2022
@per1234 per1234 linked a pull request Nov 17, 2022 that will close this issue
4 tasks
kittaakos pushed a commit that referenced this issue Nov 23, 2022
kittaakos pushed a commit that referenced this issue Nov 29, 2022
kittaakos pushed a commit that referenced this issue Nov 29, 2022
@per1234 per1234 added the conclusion: resolved Issue was resolved label Nov 29, 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 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.

6 participants