Skip to content

Update library dependency installation dialog response indexes #1512

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

Merged
merged 1 commit into from
Oct 4, 2022
Merged

Update library dependency installation dialog response indexes #1512

merged 1 commit into from
Oct 4, 2022

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Oct 2, 2022

Motivation

Arduino libraries may specify dependencies on other libraries in their metadata. The installation of these dependencies is offered by Arduino IDE when the user installs the dependent library using the "Library Manager" widget.

image

The order of the buttons in the dialog that offers the dependencies installation was recently rearranged (#1382). The dialog response interpretation code was not updated to reflect the changes to the button indexes at that time. This caused the "CANCEL" button to trigger the behavior expected from the "INSTALL ALL" button, and vice versa.

To reproduce

  1. Open the "Library Manager" view.
  2. Install any version of the "ArduinoIoTCloud" library.
    This library was picked arbitrarily. Any library that specifies dependencies can be used.
  3. Click the "INSTALL ALL" button on the "Dependencies for library ArduinoIoTCloud:___" dialog.
    🐛 The dialog closes and no libraries are installed.
  4. Install any version of the "ArduinoIoTCloud" library.
  5. Click the "CANCEL" button on the "Dependencies for library ArduinoIoTCloud:___" dialog.
    🐛 The notification and Output view show the "ArduinoIoTCloud" library and all dependencies being installed.

Change description

Update library dependency installation dialog response interpretation code to use the new button indexes.

Reviewer checklist

  • PR addresses a single concern.
  • The PR has no duplicates (please search among the Pull Requests before creating one)
  • PR title and description are properly filled.
  • Docs have been added / updated (for bug fixes / features)

Arduino libraries may specify dependencies on other libraries in their metadata. The installation of these dependencies
is offered by the Arduino IDE when the user installs the dependent library using the Library Manager widget.

The order of the buttons in the dialog that offers the dependencies installation was recently rearranged. The dialog
response interpretation code was not updated to reflect the changes to the button indexes at that time. This caused the
"CANCEL" button to trigger the behavior expected from the "INSTALL ALL" button, and vice versa.

The library dependencies installation dialog response interpretation code is hereby updated to use the new button
indexes.
@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Oct 2, 2022
@per1234 per1234 self-assigned this Oct 2, 2022
Copy link
Contributor

@kittaakos kittaakos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's working great. I compared the build with da22f1e.

Thank you for the cleanup 🙏

@per1234 per1234 merged commit ae76432 into arduino:main Oct 4, 2022
@per1234 per1234 deleted the lib-dep-dialog-response-indexes branch October 4, 2022 06:56
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

Successfully merging this pull request may close these issues.

2 participants