Repository navigation
Description
Please describe the problem you think should be solved
In #5878 we added the ability to quickly add a new repository when looking at the repository list:
desktop/app/src/ui/repositories-list/repositories-list.tsx
Lines 170 to 180 in 3295ad8
| private renderPostFilter = () => { | |
| return ( | |
| <Button | |
| className="new-repository-button" | |
| onClick={this.onNewRepositoryButtonClick} | |
| > | |
| Add | |
| <Octicon symbol={OcticonSymbol.triangleDown} /> | |
| </Button> | |
| ) | |
| } |
One limitation of this feature is that it's baked into the FilterList:
desktop/app/src/ui/repositories-list/repositories-list.tsx
Lines 151 to 159 in 3295ad8
| <FilterList<IRepositoryListItem> | |
| rowHeight={RowHeight} | |
| selectedItem={selectedItem} | |
| filterText={this.props.filterText} | |
| onFilterTextChanged={this.props.onFilterTextChanged} | |
| renderItem={this.renderItem} | |
| renderGroupHeader={this.renderGroupHeader} | |
| onItemClick={this.onItemClick} | |
| renderPostFilter={this.renderPostFilter} |
This is only rendered when there are repositories to display:
desktop/app/src/ui/repositories-list/repositories-list.tsx
Lines 123 to 126 in 3295ad8
| public render() { | |
| if (this.props.repositories.length < 1) { | |
| return this.noRepositories() | |
| } |
This means our "no repositories" view lacks the ability to quickly add repositories, so users will have to go back to the old way of opening the File menu to find these options:
[Optional] Do you have any potential solutions in mind?
I'm not sure if this came up as part of the research behind the blank slate changes coming in 1.6, so cc @niik for any extra context before we start thinking about solutions


Activity
[-]"no repositories" view in list lacks ability to quickly add a repository[/-][+]"no repositories" view in repositories list lacks ability to quickly add a repository[/+]niik commentedon Dec 21, 2018
Yeah, this should be part of the onboarding work. I've already solved a very similar case for the clone filter list. I can take this and apply the same solution here.
niik commentedon Dec 21, 2018
Reading this again, this is actually already fixed by #6365 since the repository sidebar won't be visible if there are no repositories. I'll add a
closesto that PR.