Feature Request: Collapsible section grouping by file type in folder views

Hello !

Feature Proposal

I would like to propose adding an option to group files by type (e.g., Documents, Images, Archives, Code, Videos) with collapsible / expandable section headers, while preserving standard column sorting (such as sorting by modification date within each group).

Problem / Use Case

In crowded or mixed directories (like Downloads or working project folders), standard flat lists or grids can quickly become overwhelming:

  • Sorting by date mixes all file types together.
  • Finding a specific document requires scanning past images, installers, and archives.

Collapsible section grouping by file type would significantly improve folder navigation:

  • Users could collapse irrelevant categories (e.g., hide all “Archives” or “Images” when focusing on “Documents”).
  • Users could easily identify recently modified files within a specific category.
  • It reduces visual clutter without forcing users to manually organize files into subfolders.

Suggested Behavior

  1. Group By Menu Option: Add a “Group by File Type” option alongside standard sorting controls.
  2. Collapsible Headers: Display section headers for each file category equipped with an expand/collapse toggle and an item count (e.g., ▸ Documents (12)).
  3. Inner Sorting: Keep existing sort criteria (e.g., modified date, size) active inside each expanded group.

Additional Context

Similar collapsible grouping features are available in other file managers (such as Windows File Explorer or macOS Finder) and would be a valuable addition to GNOME’s modern interface.

Update: working prototype + source code

I have continued experimenting with this idea and now have a working prototype based on Nautilus 50.3, tested on Fedora 44 / GTK 4.22.

The prototype is now available on GitHub:

Source code:
https://github.com/Jvia-code/nautilus-collapsible-groups

Current experimental release:
https://github.com/Jvia-code/nautilus-collapsible-groups/releases/tag/v3.3.2

I have also added screenshots showing the behavior in both list and grid views.

Current behavior

The implementation currently provides:

  • grouping files by type;
  • collapsible / expandable group headers;
  • normal Nautilus sorting preserved inside each group;
  • support for both list view and grid view;
  • collapsed/expanded state remembered per directory;
  • the same collapsed state reused when switching between list and grid views.

For example, Downloads can remember that some file types are collapsed while others remain expanded, independently from another directory.

Implementation notes

The prototype does not replace the system Nautilus installation. It uses a separate application ID and a private installation prefix so it can be tested alongside the Fedora-provided Nautilus.

The grouping layer is implemented on top of the Nautilus view model, while the existing sorting criterion remains responsible for ordering files inside each group.

For the list view, groups are represented as collapsible section rows.

The grid view required a different approach. A single flat GtkGridView does not naturally guarantee that a new logical group starts on a new visual row.

The current implementation therefore uses a vertical collection of groups, with each expanded group displaying its items through a GtkFlowBox.

Conceptually:

Group A
[ file ] [ file ] [ file ] [ file ]
[ file ] [ file ]

Group B
[ file ] [ file ] [ file ]

Group C
[ file ] [ file ]

This allows each group to wrap independently when the window is resized while ensuring that two different groups never share the same visual row.

Persistence

Collapsed groups are stored using a prototype-specific per-directory metadata key.

The experimental metadata and settings are kept separate from the normal Nautilus configuration.

Current grouping strategy

The prototype currently uses relatively specific file-type / MIME-based groups.

I think a more polished UX might instead use broader semantic categories such as:

  • Folders
  • Images
  • Videos
  • Audio
  • PDF
  • Documents
  • Archives
  • Other

This is one of the areas where feedback would be especially useful.

Repository

The GitHub repository contains:

  • the Nautilus 50.3 patch;
  • installation/uninstallation scripts;
  • regression tests;
  • reconstruction/development tools;
  • screenshots;
  • development notes.

The full upstream Nautilus source tree is intentionally not committed.

A packaged experimental snapshot is available from the GitHub Releases page.

Feedback

This is still a proof of concept, not an upstream-ready patch.

I would especially appreciate feedback from Nautilus maintainers regarding:

  1. whether collapsible grouping fits Nautilus’ UX direction;
  2. whether grouping should use MIME types or broader semantic categories;
  3. where grouping should live in the Nautilus model/view architecture;
  4. what approach would be preferred for sectioned grid layouts;
  5. whether per-directory persistence of collapsed groups makes sense.

The prototype has already made the original use case quite tangible for me: large mixed directories such as Downloads are much easier to scan while retaining the normal sort order inside each category.

I would be happy to adapt the prototype if there is interest in exploring the feature further.

Hi Jean,

This is an interesting suggestion! I remember that at some point designers were playing around with a separate section for folders and files. See for example this mockup.

More grouping by file type might make sense for some folders, but how it fits into the current view design I can’t really say. From the top of my head I could imagine it being a togglable setting, much like expandable folders in list view. But this needs input from designers, to evaluate use-cases and general usefulness.

One place I definitely consider sections to be useful is search results, where they can distinguish results from the current directory, nested locations, and global results.

The current implementation therefore uses a vertical collection of groups, with each expanded group displaying its items through a GtkFlowBox.

GtkFlowBox does not scale, this would require gtk/gridview: add support for section headers (!10401) · Merge requests · GNOME / gtk · GitLab (which I wanted to review some time soon).