8000 fix: ensure version of `xdg-dialog-portal` with `defaultPath` support by codebytere · Pull Request #43570 · electron/electron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: ensure version of xdg-dialog-portal with defaultPath support #43570

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
Sep 6, 2024

Conversation

codebytere
Copy link
Member
@codebytere codebytere commented Sep 5, 2024

Description of Change

Closes #43310.

The minimum version of org.freedesktop.portal.FileChooser containing support for setting a defaultPath via current_folder in flatpak/xdg-desktop-portal@71165a5 is 4. Chromium requires version 3 in order to use the interface, otherwise they fall back to GTK. Our dialog API requires that defaultPath work both on open and save dialogs - we can ensure this by bumping the required minimum to 4 before falling back to GTK.

The interface version bump commit is flatpak/xdg-desktop-portal@4bf4d63, which includes the current_folder commit.

cc @bpasero

Checklist

Release Notes

Notes: Fixed an issue where defaultPath did not work for all users on Linux when creating an open file dialog.

@codebytere codebytere added semver/patch backwards-compatible bug fixes target/30-x-y PR should also be added to the "30-x-y" branch. target/31-x-y PR should also be added to the "31-x-y" branch. target/32-x-y PR should also be added to the "32-x-y" branch. target/33-x-y PR should also be added to the "33-x-y" branch. labels Sep 5, 2024
@codebytere codebytere requested a review from a team as a code owner September 5, 2024 08:03
@electron-cation electron-cation bot added the new-pr 🌱 PR opened recently label Sep 5, 2024
@codebytere codebytere changed the title fix: ensure version of xdg-dialog-portal with defaultPath support fix: ensure version of xdg-dialog-portal with defaultPath support Sep 5, 2024
@bpasero
Copy link
Contributor
bpasero commented Sep 5, 2024

Cool thanks!

Copy link
Member
@deepak1556 deepak1556 left a comment

Choose a reason for hiding this comment

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

Thanks!

Should this be upstreamed, seems like they would have the same issue ?


-constexpr int kXdgPortalRequiredVersion = 3;
+// Version 4 includes support for current_folder option to the OpenFile method via
+// https://github.com/flatpak/xdg-desktop-portal/commit/71165a5.
Copy link
Member

Choose a reason for hiding this comment

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

Would be good to include the version bump commit flatpak/xdg-desktop-portal@4bf4d63 for clarity.

Copy link
Member Author
@codebytere codebytere Sep 5, 2024

Choose a reason for hiding this comment

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

@deepak1556 I don't think they would hard block on it the way we do as they don't seem to use defaultPath in open dialogs. I can try though! I did manage to upstream this change: https://chromium-review.googlesource.com/c/chromium/src/+/5786982

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened recently label Sep 6, 2024
@codebytere codebytere merged commit 25f4691 into main Sep 6, 2024
69 checks passed
@codebytere codebytere deleted the adjust-minimal-xdg-desktop-portal-version branch September 6, 2024 09:12
@release-clerk
Copy link
release-clerk bot commented Sep 6, 2024

Release Notes Persisted

Fixed an issue where defaultPath did not work for all users on Linux when creating an open file dialog.

@trop
Copy link
Contributor
trop bot commented Sep 6, 2024

I was unable to backport this PR to "30-x-y" cleanly;
you will need to perform this backport manually.

@trop
Copy link
Contributor
trop bot commented Sep 6, 2024

I was unable to backport this PR to "31-x-y" cleanly;
you will need to perform this backport manually.

@trop trop bot removed the target/30-x-y PR should also be added to the "30-x-y" branch. label Sep 6, 2024
@trop
Copy link
Contributor
trop bot commented Sep 6, 2024

I was unable to backport this PR to "32-x-y" cleanly;
you will need to perform this backport manually.

@trop trop bot added needs-manual-bp/30-x-y needs-manual-bp/31-x-y and removed target/31-x-y PR should also be added to the "31-x-y" branch. target/32-x-y PR should also be added to the "32-x-y" branch. labels Sep 6, 2024
@trop
Copy link
Contributor
trop bot commented Sep 6, 2024

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

@trop trop bot added the in-flight/33-x-y label Sep 6, 2024
@trop trop bot added merged/33-x-y PR was merged to the "33-x-y" branch. and removed target/33-x-y PR should also be added to the "33-x-y" branch. in-flight/33-x-y labels Sep 6, 2024
@trop
Copy link
Contributor
trop bot commented Sep 9, 2024

@codebytere has manually backported this PR to "32-x-y", please check out #43629

@trop
Copy link
Contributor
trop bot commented Sep 9, 2024

@codebytere has manually backported this PR to "31-x-y", please check out #43630

@trop
Copy link
Contributor
trop bot commented Sep 9, 2024
8000

@codebytere has manually backported this PR to "30-x-y", please check out #43631

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged/30-x-y PR was merged to the "30-x-y" branch. merged/31-x-y PR was merged to the "31-x-y" branch. merged/32-x-y PR was merged to the "32-x-y" branch. merged/33-x-y PR was merged to the "33-x-y" branch. semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Linux defaultPath does not work on file dialogs for opening
4 participants
0