Provide FileChooser portal backend
This is a cross-reference tracker issue. Let's use comments only for development tasks and coordination. However, I will be happy to discuss any aspect of it over at Discourse or chat.
Background/Motivation
There has been a rough consensus for a while between nautilus developers, designers, and other members of the community that nautilus should provide the default org.freedesktop.impl.portal.FileChooser
portal backend for the GNOME session.
Unlike the current backend, provided by xdg-desktop-portal-gnome
, which uses the deprecated GtkFileChooserDialog
, nautilus can provide a dialog with visual and behavioral consistency with the Files app, all within a single codebase. Additionally, and unlike GTK (which is cross-platform), nautilus can use GNOME platform features (e.g. libadwaita), nautilus features (e.g. starred files) and generally move along with the platform.
In short, this makes sense from technical and governance points of view, and it's an opportunity to move the file selection UX design forward.
A Long Road
The above rationale has been floating in the collective consciousness for years, and there was even a proof of concept. But the nautilus codebase was not ready to introduce a file chooser mode without incurring in unsustainable technical debt.
First, it needed to be ported to GTK4 ; and even after, the main view components needed major refactoring meant to, among other things, prepare for the file chooser mode. The Places sidebar and Other Locations view are still huge pieces of GTK-imported code which must to be pruned, but fortunately the new Network view is already half-way there.
We are at the point in time where the codebase is finally getting ready to host a FileChooser portal implementation.
Thanks
To the GNOME Foundation for sponsoring me to make it happen during the 47 development cycle, as part of the Sovereign Tech Fund.