Skip to content

Keyboard selection doesn't work properly in Clone a Repository dialog - #5931

Merged
niik merged 3 commits into
desktop:masterfrom
a-golovanov:fix/clone-repository-selection
Nov 14, 2018
Merged

niik merged 3 commits into
desktop:masterfrom
a-golovanov:fix/clone-repository-selection

Conversation

@a-golovanov

Copy link
Copy Markdown
Contributor

Fixes #3596

@tierninho

tierninho commented Oct 19, 2018 •

Copy link
Copy Markdown
Contributor

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.

  • clicked into repo list and local path updated
  • key up/down updates local path
  • public/private repos show up in local path field
  • destination already exist warning still works as intended
  • local path field updates if user clicks search result
  • Enterprise repos

Build/OS: 1.4.4-beta0, mac, dev ccdf999

@a-golovanov

Copy link
Copy Markdown
Contributor Author

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.

Screenshot from v1.4.3:
screen shot 2018-10-19 at 7 18 50 pm

I will look what I can do about that.

@a-golovanov

Copy link
Copy Markdown
Contributor Author

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.
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?

@shiftkey shiftkey added the ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Oct 25, 2018
@shiftkey shiftkey self-assigned this Oct 25, 2018
@shiftkey
shiftkey self-requested a review October 25, 2018 17:18
@a-golovanov

a-golovanov commented Nov 2, 2018 •

Copy link
Copy Markdown
Contributor Author

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.

Jeedjaad referenced this pull request Nov 3, 2018
add a localStorage abstraction to tidy up our parsing work
niik
niik previously approved these changes Nov 13, 2018

@niik niik left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@niik niik assigned niik and unassigned shiftkey Nov 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants