Skip to content

Visually distinguish submodules from regular folders #5

Description

In other Git interfaces that show folder contents, it's easy to see the difference between folders and submodules. Take this screenshot from GitHub in the PowerToys repo: https://github.com/microsoft/PowerToys/tree/main/deps

Image

Here we can see which folders are actually submodules. ADO has a similar UI enhancement.

It's probably a heavy lift to enlighten the FileExplorer data model to the point that we can programatically customize the appearance and/or name of the folders.

But it should be quite simple to report the existence of a submodule via the status column, as submodule status is already reported today. Simply tweak the logic to return a status string for "clean" submodules in addition to the dirty ones.

For example, in a local clone of the same PowerToys repo (with the submodules initialized), if I add a new file to one of these submodules, I get "Submodule Dirty" in the Version status column, as seen in the following screenshot. After deleting the offending untracked file, "Submodule Dirty" should change back to "Submodule" (or something) to quickly inform the user that this isn't a normal Git folder.

Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions