Adding a View mode API

Prefacing by saying I’ve never developed for Nautilus before and this suggestion is based on my understanding of what is currently offered in terms of APIs for extensions and my specific needs. I don’t know the full history of the projects and I don’t know the reasons for many design choices so I might be missing a big part of the picture. Feel free to correct me if I’m wrong or missing important information!

I’m part of the group of people who would very much like to have a per-folder view setting. I simply want my default view mode to be list, and only certain folders to use the grid view (e.g.: Pictures, Videos, Screenshots etc..). Remembering zoom level would also be amazing. That’s a feature that’s available in almost every other file manager I’ve tested. But I like GNOME, I like Nautilus, and I’d rather have this in Nautilus than use those other file managers!

There is a history of discussions requesting this feature (see Nautilus per folder view settings - #10 by Sid , Nautilus: "Smart View" for chronological folders - seeking feedback , Nautilus remember view - View mode setting should be persistent for each directory and even the 2012 issue on bugzilla) with concrete attempts, such as Merge Request 478 (I can’t add more than 3 links because I’m a new user but you should be able to find those).

My understanding reading those threads is that for something like this to be implemented, the devs must be convinced that this solution would actually tackle an identified UX issue.

From the previous discussions, I have the impression that the team isn’t currently convinced that this is a real issue and are, legitimately, concerned that a change in behaviour might be detrimental to users. That’s fair.

My first thought was that the solution should be an extension. A “remember view per folder” extension means only the people who want this feature get it, default behaviour doesn’t change, and everybody is (maybe?) happy.

Now from what I can see, Nautilus API currently only offers 4 providers to add columns, menu entries, properties and file info. So there is no way to build such an extension. This brings me to my main question/suggestion: would there be interested in building a view mode API in Nautilus to enable such an extension? I haven’t looked into the code yet, but I’m really thinking about something really simple that would only expose the view for a given folder. Same as how the current per folder-column setting functions.

If this is something that would be considered a good solution, I’m happy to give it a go and build an MVP. I just don’t want to start working on this if there is no chance for such an API to make it upstream. I’m also looking at other options such as nautilus-my-computer to achieve what I want but the API route seems saner to me.

And of course, a big thank to the GNOME team, I’m in love with this DE and you guys are doing an amazing job.

Hi, with the right design I can imagine per-folder view settings becoming a thing. Adding a dedicated extension API is not something that I would consider worth the effort.

As a sidenote, some view settings can already be remebered per-folder: list-view columns and sort order. These are set as metadata on the respective folder.

Thanks for jumping in! Could you clarify what you mean by “with the right design”?

I’m all for this becoming a setting in Nautilus, that’s an even better option for me. But when I see the fate of Merge request 478, which was exactly this, I wonder what needs to be done differently this time to get the support and approval of the Nautilus team: Nautilus remember view (!478) · Merge requests · GNOME / Files · GitLab

Any insight on what design choices would achieve this? I’m aware of the existing per-folder settings and that would make for an excellent base for writing some code. I just think the challenge with this issue is support from the team for the feature itself, hence my proposal of an API instead.

Could you clarify what you mean by “with the right design”?

That’s exactly the issue, I can’t really. That’s why such things need design input.

when I see the fate of Merge request 478

That MR looks like it unconditonally saved the view mode (and didn’t follow nautilus’ code style), which is not what we want as a default.

Any insight on what design choices would achieve this?

I assume it would best be integrated into the view menu, but that doesn’t really work in its current form. It needs design input, by discussions, mockups or feedback on implementations.