Repository navigation
Keyboard selection doesn't work properly in Clone a Repository dialog - #5931
Conversation
|
The UI was tested for this change, and overall it functions well. However I noticed that a repo will be deselected if you navigate a way from the GitHub.com tab to another tab, and back. The path of the last repo selected remains intact, but the repo is no longer selected. The existing functionality keeps the repo selected. Not sure if this is worth bringing back.
Build/OS: 1.4.4-beta0, mac, dev ccdf999 |
|
I looked at the latest release (v1.4.3) and it behaves exactly the same as a local build with my changes when switching between tabs. Namely, if a repository is selected on the GutHub.com tab, switching to any other tab and back removes the selection from the list, but preserves local path and allows to clone the previously selected repository. In my opinion, it is a bug. Either the selection in the list should be restored or local path should be reset and clone button disabled. I will look what I can do about that. |
|
I implemented selection restore but it has one drawback - the list doesn't scroll to the selected item, and I don't see an easy way to fix that. |
|
Another possible solution for selection reset on tab switching is rendering all tabs all the time, as opposed to current implementation that renders only the selected tab. |
add a localStorage abstraction to tidy up our parsing work
niik
left a comment
There was a problem hiding this comment.
Hey @a-golovanov, sorry for the delay on reviewing this!
Question to reviewers (@shiftkey ?), should I add the selection restoring fix to this pull request, create a new pull request or implement local path reset along with the clone button instead?
I think we should keep this PR focused solely on the selection issue. I'm working on some improvements to the clone dialog that should hopefully take care of the selection issue.
Another possible solution for selection reset on tab switching is rendering all tabs all the time, as opposed to current implementation that renders only the selected tab.
Yeah, our tab implementation is not stellar at the moment, we often violate the expectation that tabs preserve all of their state. One way of solving that could be to do what you suggest and render tabs but toggle their visibility. I think we need to do a little bit more thinking about whether we want to address this more widely or not though.
I think this PR is a great step in the right direction and we really appreciate your contribution! ❤️
Since this has sat for a little bit I'm gonna merge master into it and have CI take another pass at it before I hit the button.

Fixes #3596