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

fix: Showing the about panel is async on all platforms #37440

Merged
merged 7 commits into from Mar 6, 2023

Conversation

clavin
Copy link
Member

@clavin clavin commented Feb 28, 2023

Description of Change

Currently, app.showAboutPanel() is inconsistent in its synchronicity across platforms:

Platform Runs Async?
macOS
Windows
Linux

This PR aligns the behavior of this function across platforms to run asynchronously.

I believe asynchronous is the "expected" behavior for this API. The documentation doesn't specify, so there was no confirmed behavior before. It is unlikely that code usually wants to wait for the auxiliary about dialog to close before continuing execution. If we decide that functionality is desirable in the future, we still have room to add it in, either with a Sync variant of this function or by accepting a completion callback.

(Note: this PR is based on top of #37373 and thus that PR's changes also show here. I will rebase this branch once the other PR is merged.)

Checklist

Release Notes

Notes: app.showAboutPanel() no longer blocks the main thread on Windows or Linux, thus matching macOS.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Feb 28, 2023
@clavin clavin mentioned this pull request Feb 28, 2023
Copy link
Member

@nornagon nornagon left a comment

Choose a reason for hiding this comment

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

Seems fine. Teeeeechnically I guess this could be considered a breaking change, but it seems far fetched to me that an app would be relying on this behavior, so I don't mind skipping a note in breaking-changes.md for this one.

Perhaps expand the release notes somewhat, to something like:

showAboutPanel no longer blocks the main thread on Windows or Linux, thus matching macOS.

@codebytere codebytere added the semver/patch backwards-compatible bug fixes label Mar 1, 2023
Copy link
Member

@codebytere codebytere left a comment

Choose a reason for hiding this comment

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

I agree with @nornagon that this is arguably semver-major but given usage and context i'm also fine slapping a semver-patch label on it and calling it a day

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Mar 1, 2023
@clavin clavin added the target/24-x-y PR should also be added to the "24-x-y" branch. label Mar 3, 2023
@jkleinsc jkleinsc merged commit c8f715f into main Mar 6, 2023
@jkleinsc jkleinsc deleted the clavin/about-panel-async branch March 6, 2023 14:46
@release-clerk
Copy link

release-clerk bot commented Mar 6, 2023

Release Notes Persisted

app.showAboutPanel() no longer blocks the main thread on Windows or Linux, thus matching macOS.

trop bot added a commit that referenced this pull request Mar 6, 2023
* fix: about panel is a base::Value::Dict

* nix this test for a diff PR

* what if the about dialog was not blocking

* add this test back in

* document synchronicity

* github editor is a fan of spaces

Co-authored-by: Calvin <clavin@users.noreply.github.com>
@trop
Copy link
Contributor

trop bot commented Mar 6, 2023

I have automatically backported this PR to "24-x-y", please check out #37508

@trop trop bot added in-flight/24-x-y merged/24-x-y PR was merged to the "24-x-y" branch and removed target/24-x-y PR should also be added to the "24-x-y" branch. labels Mar 6, 2023
VerteDinde pushed a commit that referenced this pull request Mar 6, 2023
fix: Showing the about panel is async on all platforms (#37440)

* fix: about panel is a base::Value::Dict

* nix this test for a diff PR

* what if the about dialog was not blocking

* add this test back in

* document synchronicity

* github editor is a fan of spaces

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Calvin <clavin@users.noreply.github.com>
@trop trop bot removed the in-flight/24-x-y label Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged/24-x-y PR was merged to the "24-x-y" branch semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants