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

Complete list of examples are not always shown #262

Open
3 tasks done
akash73 opened this issue Mar 24, 2021 · 11 comments
Open
3 tasks done

Complete list of examples are not always shown #262

akash73 opened this issue Mar 24, 2021 · 11 comments
Assignees
Labels
criticality: medium Of moderate impact topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@akash73
Copy link
Member

akash73 commented Mar 24, 2021

Describe the problem

At the first launch, the built in examples and the library examples menu is correctly shown.
after selecting a random sketch from the examples list, then the menu shows only the built in examples

First launch:

Schermata 2021-03-23 alle 13 13 29

same menu after opening any sketch:

Schermata 2021-03-23 alle 13 13 57

To reproduce

  1. Go to File -> Examples (all examples are displayed)
  2. Click on any examples
  3. Go to File -> Examples (only built-in examples are displayed)

Expected behavior

Examples for all globally installed libraries and the "platform bundled" libraries of the currently selected board are always shown in the "Examples" menu.

Arduino IDE version

Not specified

Operating system

macOS 10.15.7

Schermata 2021-03-24 alle 11 11 32

Additional context

The symptom reported here also occurs in #2640. However, #2640 only occurs after the initial installation of a boards platform, whereas in this report the symptom occurs after opening a new sketch, so they are distinct defects.

Additional reports

Workaround

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
@kittaakos
Copy link
Contributor

Did you select a board, @akash73? You have to select a board to see the examples.
Here is a related question: #192 (comment)
Let me know if you cannot see the examples after selecting a board.

@akash73
Copy link
Member Author

akash73 commented Mar 29, 2021

@kittaakos thanks .

after selecting the board,

The first time I select File -> Examples , the full list is not displayed.
The 2nd time , selecting again File-> Examples to see the full list.

@tigoe
Copy link
Member

tigoe commented Mar 30, 2021

A note on this: it seems that the full list only appears if you have a board and port selected.

To reproduce:

  1. unplug all boards
  2. Quit
  3. restart
  4. Check examples menu.

In this case, you'll see only the core examples, not the libraries examples. I expect to see the libraries examples as well. I get that they are filtered by board, but I think that filtering could happen after you pick the board, not before.

@ubidefeo
Copy link

@tigoe

I get that they are filtered by board, but I think that filtering could happen after you pick the board, not before.

I can't remember why it is this way, but I'll check what can be done 👍🏼

@ubidefeo ubidefeo added type: enhancement Proposed improvement priority: medium Resolution is a medium priority and removed type: bug labels Mar 30, 2021
@tigoe
Copy link
Member

tigoe commented Mar 30, 2021 via email

@per1234
Copy link
Contributor

per1234 commented Mar 31, 2021

I have a lot of libraries installed and it takes about a minute between selecting a board and the library examples showing in the File > Examples menu.

@tigoe
Copy link
Member

tigoe commented Mar 31, 2021 via email

@per1234 per1234 added the topic: code Related to content of the project itself label Oct 25, 2021
@per1234
Copy link
Contributor

per1234 commented Oct 28, 2021

the full list only appears if you have a board and port selected.

Fixed by 68af4c3
The examples for globally installed libraries in the sketchbook are now always shown in the File > Examples menu.

The examples for platform bundled libraries (e.g., SPI) will still only be shown when a board is selected, because these libraries are board-dependent. Other than the fact that it does not produce a state where no board would be selected, the classic Arduino IDE has the same behavior.

The frequency of having no board selected has been reduced by c86d82d

The loss of the board selection when opening the example could have been the cause of this sequence pre-68af4c3:

#262 (comment)

  1. Go to File -> Examples (all examples are displayed)
  2. Click on any examples
  3. Go to File -> Examples (only built-in examples are displayed)

However, I am still able to reproduce this reliably with 2.0.0-beta.12 and the current nightly build:

#262 (comment)

after selecting the board,

The first time I select File -> Examples , the full list is not displayed.
The 2nd time , selecting again File-> Examples to see the full list.

It still occurs even with only a small number of installed libraries. There just isn't such a long delay as when I have a large number of libraries installed.

@SofiaEngvall
Copy link

I off course want to see all the examples all the time. If this is not the default behavior there should be an option for it. I am currently looking at examples to decide what more boards to buy. I don't want to go through all models of boards (200+ I believe) installed to be able to see all examples! As a workaround I installed an older version of Android studio (1.6.5) and there I can see everything. This should not be necessary, right? Thank you! :)

@per1234 per1234 added type: imperfection Perceived defect in any part of project and removed type: enhancement Proposed improvement labels Oct 12, 2022
@per1234
Copy link
Contributor

per1234 commented Oct 12, 2022

@SofiaEngvall there seems to be a misunderstanding. The intended behavior of Arduino IDE 2.x is exactly the same as 1.6.5. The unresolved component of this issue is a BUG that causes library examples to occasionally not be shown under the File > Examples menu. The solution is to fix the bug, not to add an option. If you experience the bug, simply open a new window. That almost always fixes the problem for me.

I don't want to go through all models of boards (200+ I believe) installed to be able to see all examples! As a workaround I installed an older version of Android studio (1.6.5) and there I can see everything.

Since you mention going through boards, it seems you are reacting to the statement I made above:

The examples for platform bundled libraries (e.g., SPI) will still only be shown when a board is selected, because these libraries are board-dependent. Other than the fact that it does not produce a state where no board would be selected, the classic Arduino IDE has the same behavior.

As I said already, Arduino IDE 1.6.5 has the same behavior as Arduino IDE 2.x. If you are seeing differences between the two IDE versions in the number of examples shown, that is the result of a BUG, not an intentional design.

@SofiaEngvall
Copy link

@SofiaEngvall there seems to be a misunderstanding. The intended behavior of Arduino IDE 2.x is exactly the same as 1.6.5. The unresolved component of this issue is a BUG that causes library examples to occasionally not be shown under the File > Examples menu. The solution is to fix the bug, not to add an option. If you experience the bug, simply open a new window. That almost always fixes the problem for me.

Thank you for clarifying. The reason I reacted as I did was since you used the word solution instead of workaround. Great that you're aiming for a full solution.

I'm actually writing a new bug report now and I'm curious how this version could be the suggested download on the Arduino web page it there are these much basic functionality bugs? It really seems like it's not ready yet. I'm still typing there but I'm thinking maybe I could contribute?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
criticality: medium Of moderate impact 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

8 participants