Skip to content

Improvements for repository list #2451

Closed

Description

@adamreisnz

I have a lot of repositories in my github, about 50 or so. I have a project that I work on very regularly, and it consists basically of 4 different repositories, e.g. server, client, system, and site. These repositories are named accordingly, with a prefix for the name of the project, e.g. myproject-server, myproject-client etc. I use the same pattern for various other projects that have multiple repositories.

In the old github desktop for Mac, the repositories were always visible on the left hand side. When I scrolled down to the position where the 4 myproject-xxxx repo's were, it would stay on that position and it was very easy for me to switch between them with just one click on the repo name. As the scroll position wouldn't change, it had good visual grepping and you could see which repo was selected and active.

In the new github desktop, this experience has been severely degraded for several reasons:

  • I need to click an extra time to open the list of repositories
  • Once open, the list of repositories is scrolled to the top, so I have to scroll down and find the myproject-xxxx projects each time
  • Even using the filter doesn't help much, because I would have to type myproject every time I open the list

It might not seem like much, but if you work on a project a lot and have to switch between repositories 30 or 40 times per day (not an exaggeration) then it really adds up and you lose a lot of time scrolling or typing the repo name. It's one of the reasons that I still go back to the old app a lot.

Since you're probably not going to add an option to have the repositories visible permanently as was the case in the old version, I would like to offer some suggestions which are fairly minimal in scope yet I think will drastically improve this user experience:

  1. Remember what the user filtered for when re-opening the repositories panel and reapply this filter
  2. Remember the scroll position of the repositories panel between closing and reopening so your focus is not lost
  3. Enable keyboard shortcuts to navigate between repositories in the list (e.g. cmd-up for previous repo, cmd-down for next repo)

Thoughts?

Activity

  1. changed the title [-]Remember filter and remember scroll position in repositories list[/-] [+]Improvements for repository list[/+] on Aug 12, 2017
  2. guymguym commented on Aug 22, 2017

    @guymguym

    Hey @adamreisnz

    I agree with your points and have another point to add -

    For my main work project I use 5 clones of the same target repo, in order to avoid contention of my work and avoid switching branches and having to rebuild and update deps all the time.

    Each of these clones has a different folder namely ~/project1, ~/project2, ..

    However the github desktop app shows only the name of the remote repo, which means I see them all by the same name, which is impossible to detect unless I switch and then see which is which.

    A simple solution would be to show the folder name in case of duplicate target repo name, or even in any case where the folder name differs from the repo name...

  3. shiftkey commented on Aug 28, 2017

    @shiftkey
    Member

    @adamreisnz thanks for the feedback!

    1. Remember what the user filtered for when re-opening the repositories panel and reapply this filter

    I like this idea, and managed to cobble together a spike that moves the state out of the filter list (so it doesn't get thrown away when the dialog is dismissed). I'll refine this and try to open a PR later this week.

    1. Remember the scroll position of the repositories panel between closing and reopening so your focus is not lost

    This is something we already do for diffs, but the code is specific to the CodeMirror editor:

    private restoreScrollPosition(cm: Editor) {
    const scrollPosition = this.scrollPositionToRestore
    if (cm && scrollPosition) {
    cm.scrollTo(scrollPosition.left, scrollPosition.top)
    }
    }

    I'd have to explore whether we can make this work with our List implementation which uses react-virtualized under the hood.

  4. shiftkey commented on Aug 28, 2017

    @shiftkey
    Member

    @guymguym there's an existing discussion around this in #1929 - please have a read of that and add your feedback there!

  5. adamreisnz commented on Aug 28, 2017

    @adamreisnz
    Author

    @shiftkey thanks for looking into this, much appreciated! Any thoughts about the keyboard shortcuts for quick navigation between repo's up and down?

  6. shiftkey commented on Aug 28, 2017

    @shiftkey
    Member

    Any thoughts about the keyboard shortcuts for quick navigation between repo's up and down?

    Personally, it's way down my list of priorities and becomes less valuable if you can ⌘ + T and find yourself in the right spot. But I'll let @desktop/core chime in here while I investigate these other things.

  7. adamreisnz commented on Aug 28, 2017

    @adamreisnz
    Author
  8. adamreisnz commented on Sep 7, 2017

    @adamreisnz
    Author

    @shiftkey have just tried the filter, it works great! Makes my life so much easier, thank you. 💯 🎉

    I think this ticket can be closed now, as this feature does the job well.
    I can navigate the filtered repositories list with a CMD-T + up/down, which is fast enough.

  9. adamreisnz commented on Sep 7, 2017

    @adamreisnz
    Author

    PS: One minor issue, not sure if it's worth opening a new ticket for, but after pressing CMD-T, when you press down, it will select the first repository on the list, and not go one down from the currently selected one. Same behaviour for up, instead of going up one repo, it will start at the bottom of the list.

    I get that it's using the filter as a point of reference as that's where your focus is on, but it feels a bit counter intuitive and I think moving up/down from your currently selected repo would make more sense.

    What do you think?

    Also, when a fetch happens in the background, the selection jumps back to the current repo. That seems like a minor bug.

  10. shiftkey commented on Sep 8, 2017

    @shiftkey
    Member

    One minor issue, not sure if it's worth opening a new ticket for, but after pressing CMD-T, when you press down, it will select the first repository on the list, and not go one down from the currently selected one.

    @adamreisnz this is a side effect of the keyboard focus being on the input element when we first display it (so you can set the filter text).

    I get that it's using the filter as a point of reference as that's where your focus is on, but it feels a bit counter intuitive and I think moving up/down from your currently selected repo would make more sense.

    I think this depends on the context. For example, if I perform these steps:

    • ⌘ + T to show the list
    • mouse cursor down the list to a repository
    • Enter to select it
    • do some work
    • ⌘ + T to show the list again

    We're always focusing on the filter text currently when you open the repository list, which is nice for consistency. But if you used your keyboard to select the repository maybe it should have the focus when you return to it?

    I'm not sure how we reconcile this with the changes in #2571 and with users who are expecting a different workflow. Please open a fresh issue if you want to discuss these interactions further.

    Also, when a fetch happens in the background, the selection jumps back to the current repo. That seems like a minor bug.

    Not sure I understand this one, but it should be easy enough to reproduce.

  11. adamreisnz commented on Sep 8, 2017

    @adamreisnz
    Author

    I've raised the two issues in separate tickets 👍

  12. Seb33300 commented on Oct 19, 2017

    @Seb33300

    I have the same problem.
    I wish to be able to have the repositories panel open permanently...

    At this time, I still use the previous github desktop version for this reason.

  13. adamreisnz commented on Oct 19, 2017

    @adamreisnz
    Author

    Hi @Seb33300 , I was used to that as well, but now with the filter text being remembered and the shortcut CMD-T to open the repository list I find I got used to not needing to have the repository list open at all times anymore.

    Give it a try, it's much more convenient now to work with the repository list if you have many repositories and you'll find you might not need the panel open permanently anymore either.

  14. locked as resolved and limited conversation to collaborators on Jul 19, 2018
  15. unlocked this conversation on Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions