Submodules are hard to identify by their titles
See original GitHub issueDescription
In GitHub Desktop (both in the old version and the new beta, though I wouldn’t be able to tell in the new version due to #708), if you add the same submodule to the sidebar, but from different parent repositories, they will all be listed with the same name. It appears that GitHub Desktop tries to be smart by prefixing it with the GitHub user’s username, but this is not entirely useful in figuring out which parent repository they belong to.
Version
GitHub Desktop version: 223 & 0.5.8 OS version: macOS 10.12.4
Steps to Reproduce
- Add a submodule from parent repo A
- Add the same submodule from parent repo B
Expected behaviour: The repos are listed as such:
RepoA -> user/MySubmodule
RepoB -> user/MySubmodule
(or something similar)
Actual behaviour: The repos are listed as such:
user/MySubmodule
user/MySubmodule
(which is not very helpful)
Other great differentiators could be the current branch/commit. Ideally, it should be easy to identify which submodule you were working on despite that submodule being everywhere (as submodules are likely to be):
RepoA -> org/MySubmodule
RepoB -> user/MySubmodule (bugfix)
RepoB -> user/MySubmodule (master)
user/MySubmodule
Issue Analytics
- State:
- Created 6 years ago
- Reactions:7
- Comments:15 (4 by maintainers)
Top GitHub Comments
Ping @shiftkey, since as others point out, it has been a while 😊
Here is another interpretation how I imagine it can look. In this mockup, I grew the row heights to 43pt, and added another line that contains both the current branch (or truncated commit, if on HEAD), and the local path of the repo, truncated at the beginning of the path if necessary. As I experimented, I realized this information is always useful, so I have it for all rows rather than just the ambiguous paths, as I originally suggested.
The commit is especially useful when comparing to the diff a main repo would show if the submodule was in a different state than what was originally committed. The branch name would also be very useful when switching between different repos that are in different states.
Finally, I would love for this column to always be visible much like the old GitHub desktop, as it facilitated going back and forth between repos very quickly (I’m still using the old app primarily for this reason… sorry 😕). Even better would be to open multiple windows, each showing their own repo, which would provide the best experience for power users.
(I also realize after I uploaded, but the paths should include the folder of the git repo as well, and not just the name of the repo on GitHub, since they can be different. So the first entry would probably read
...inRepo/Libraries/SubMod
if the.git/
itself is within the directorySubMod
)Some metrics: The row heights grow to 43pt, the icons are shifted down by 7pt, the new text is 10pt, black at 40% opacity. The selected state is white at 75% opacity. The top row of text doesn’t change or move in any way. A bullet character
•
is used to separate the branch and the path which again, is truncated at the start, and runs along to the same extent as the top line of text. If space is limited, I would give priority to the branch rather than the path.This lack of submodule parenting also bothers me a lot, and in my mind it’s really easy to solve the UI part of it with a tree view.
Perfect solution: Any repositories that have submodules should contain a “+” or “►” on the side to unfold and reveal the submodules. They can all be greyed out, and if you check out any of them, it is linked to the github repository, like opening a local repo.
Acceptable solution: Even if it does not recognize submodules as I’m suggesting, if I open a local repository that is a submodule of any repository already opened, just parent it below it, indented.