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

"Updatable" filter not set in Boards/Library Manager during "INSTALL MANUALLY" operation if other view open in side panel #1740

Closed
3 tasks done
per1234 opened this issue Dec 5, 2022 · 9 comments · Fixed by #1748
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 5, 2022

Describe the problem

Arduino IDE automatically checks for available updates to boards platforms and libraries installed via Boards Manager and Library Manager. If an update is available, a notification dialog appears with the following options:

  • LATER
  • INSTALL MANUALLY
  • INSTALL ALL

"INSTALL MANUALLY" opens the Boards Manager or Library Manager view with the "Type" filter set to "Updatable". This allows the user to evaluate the available updates and install them selectively.

If another view was already open in the Side Panel, the "Type" filter is left set to the default "All" when the Boards Manager or Library Manager view is opened.

🐛 "INSTALL MANUALLY" will not provide the user with a convenient path to update dependencies.

To reproduce

Set up

An outdated version of a library is installed in order to trigger the update offer dialog:

  1. Open the Library Manager view if it is not already open.
  2. In the "Filter your search" field, type arduinocloudthing
    This is just an arbitrarily selected library with no special significance.
  3. Select "1.7.2" from the version menu on the "ArduinoCloudThing" entry.
  4. Click the "INSTALL" button.
  5. An "Install library dependencies" dialog will now appear. Click the "INSTALL WITHOUT DEPENDENCIES" button.
  6. Wait for the "ArduinoCloudThing" library to be installed successfully.

Demo

  1. Select File > New Sketch from the Arduino IDE menus.
    This is done to ensure the Library Manager view has the default "Type" filter setting.
  2. Click the folder icon on the Activity Bar to open the "Sketchbook" view in the Side Panel.
  3. Press the Ctrl+Shift+P keyboard shortcut (Command+Shift+P for macOS users) to open the "Command Palette".
  4. Select the "Arduino: Check for Arduino Updates" command from the menu.
  5. Wait for the "Updates are available for some of your libraries." notification dialog to appear.
  6. Click the "INSTALL MANUALLY" button.

🐛 The Library Manager view opens with the "Type" filter set to "All":

image

Expected behavior

The "Type" filter is always set to "Updatable" when the "Library Manager" view is opened via the "INSTALL MANUALLY" button of the platform update offer dialog.

Arduino IDE version

2.0.3

Operating system

Windows

Operating system version

10

Additional context

I bisected the introduction of the bug to ac9cce1 / #1662 (does not occur when using the build for the previous commit 3ad6609 or older).


The "Arduino: Check for Arduino Updates" command palette command was used in the demo as a convenient way to trigger the update notification. The bug also affects the more commonly used update notification on IDE startup.


I used the technique of manually opening a view in the side panel in the demo in order to make it as simple as possible. However, the fault also occurs in the more likely use cases when the panel was open for other reasons, such as:

  • The panel open state was restored for the workspace on startup due to it having been open during the previous IDE session.
  • Both Boards and Library Manager updates were available and the panel was previously opened for a manual update operation via the other view (real life example.

The fault also occurs when opening the view with filter configured via a librarymanager/boardsmanager link under the same conditions.

For example:

// http://librarymanager/Updatable

Originally reported by @KurtE at https://forum.arduino.cc/t/arduino-2-0-3-update-boards/1061726

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 Dec 5, 2022
@kittaakos kittaakos self-assigned this Dec 7, 2022
@kittaakos
Copy link
Contributor

It's working as expected on macOS with 2.0.3. I give it a try on Windows.

1740.mp4

@kittaakos
Copy link
Contributor

kittaakos commented Dec 7, 2022

It's also working on my Windows env with 2.0.3.

1740_win.mp4
1740_002_win.mp4
1740_003_win.mp4

@kittaakos
Copy link
Contributor

Are there any exceptions in the DevTools console?

@kittaakos kittaakos added the status: waiting for information More information must be provided before work can proceed label Dec 7, 2022
@per1234
Copy link
Contributor Author

per1234 commented Dec 7, 2022

Hi @kittaakos. You forgot to do step 2 in the instructions:

  1. Click the folder icon on the Activity Bar to open the "Sketchbook" view in the Side Panel.

A required condition is that another view is previously open in the Side Panel.

@KurtE
Copy link

KurtE commented Dec 7, 2022

Note: I again just reproduced it using last nights build:

In this case, I started up the IDE. It came up with saying I had both boards and libraries needing updates.
It was also showing that it was downloading the teensy boards... (which takes a long time).

I clicked on the update libraries, which did not show anything until the Teensy boards file finished downloading. Which felt like a few minutes. At that point I had the usual SDFat ...

So then I clicked manual on boards and ended up with window looking like:
image

@kittaakos kittaakos removed the status: waiting for information More information must be provided before work can proceed label Dec 7, 2022
kittaakos pushed a commit that referenced this issue Dec 7, 2022
When the widget is opened the first time with any search options,
the widget might miss the refresh event as it does not happen at
instantiation time. This PR ensures that all list widget refresh
events wait until the React component is rendered and is visible
in the UI.

This change also ensures that the debounced search will run with
the most recent search options by setting the `trailing` property
of the debounced function to `true`.

Closes #1740

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
@kittaakos
Copy link
Contributor

Thank you for the help 🙏

  1. Select File > New Sketch from the Arduino IDE menus.
    This is done to ensure the Library Manager view has the default "Type" filter setting.

It turned out that the key point was the new sketch and that the lib manager view was not yet opened in IDE2. There was a race condition.

kittaakos pushed a commit that referenced this issue Dec 8, 2022
When the widget is opened the first time with any search options,
the widget might miss the refresh event as it does not happen at
instantiation time. This PR ensures that all list widget refresh
events wait until the React component is rendered and is visible
in the UI.

This change also ensures that the debounced search will run with
the most recent search options by setting the `trailing` property
of the debounced function to `true`.

Closes #1740

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
@per1234 per1234 added the conclusion: resolved Issue was resolved label Dec 8, 2022
@KurtE
Copy link

KurtE commented Dec 8, 2022

I assume it did not make it into today's daily build?
image

Will try it again tomorrow.

@kittaakos
Copy link
Contributor

it did not make it into today's daily build?

Yes, it did, but you're using 20221208 and the latest nightly is 2.0.4-nightly-20221209.

@KurtE
Copy link

KurtE commented Dec 9, 2022

Thanks,

Note: we are probably in completely different time zones, and when I posted that last response, it was on the morning of the 8th.
Now it is early morning of the 9th and I have ow downloaded the new one and it works!

Thanks

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.

3 participants