Skip to content

Show a placeholder for lost repositories - #946

Merged
shiftkey merged 71 commits into
masterfrom
i-lost-my-marbles
Mar 15, 2017
Merged

shiftkey merged 71 commits into
masterfrom
i-lost-my-marbles

Conversation

@joshaber

@joshaber joshaber commented Feb 13, 2017 •

Copy link
Copy Markdown
Contributor

This is dependent on desktop/dugite#66.

Fixes #350

  • Path is gone (RepositoryDoesNotExistErrorCode)
  • Path exists but .git dir is gone (GitError. NotAGitRepository)
  • Remove
  • Locate
  • after relocating, should then switch to repository view
  • Clone Again
  • after clone completes, should then switch to repository view

@joshaber joshaber mentioned this pull request Feb 15, 2017
@shiftkey

Copy link
Copy Markdown
Member

Ready for review 🦌

Comment thread app/src/lib/dispatcher/app-store.ts Outdated
@@ -267,10 +267,17 @@ export class AppStore {
if (!repository) { return null }

if (repository instanceof Repository) {

This comment was marked as spam.

Comment thread app/src/lib/dispatcher/app-store.ts Outdated
@@ -499,15 +512,19 @@ export class AppStore {
if (repository instanceof Repository) {

This comment was marked as spam.

This comment was marked as spam.

Comment thread app/src/lib/dispatcher/app-store.ts Outdated
newSelectedRepository = null
}
const r = this.repositories.find(r =>
selectedRepository.constructor === r.constructor && r.id === selectedRepository.id

This comment was marked as spam.

Comment thread app/src/lib/dispatcher/app-store.ts Outdated
}

if (!this.selectedRepository && this.repositories.length > 0) {
if (!newSelectedRepository && this.repositories.length > 0) {

This comment was marked as spam.

Comment thread app/src/lib/dispatcher/dispatcher.ts Outdated
public async postError(error: Error): Promise<void> {
let currentError: Error | null = error
for (const handler of this.errorHandlers.reverse()) {
for (let i = this.errorHandlers.length - 1; i >= 0; i--) {

This comment was marked as spam.

This comment was marked as spam.

}

/** Clone the repository again to the path and update the existing repository state. */
public async cloneAgain(url: string, path: string, user: User | null): Promise<void> {

This comment was marked as spam.

const { promise, repository } = this.appStore._clone(url, path, user)
await this.selectRepository(repository)
const success = await promise
if (!success) { return }

This comment was marked as spam.

This comment was marked as spam.

Comment thread app/src/ui/missing-repository.tsx Outdated
const cloneURL = gitHubRepository.cloneURL
if (!cloneURL) { return }

// TODO: find suitable user for credentials

This comment was marked as spam.

This comment was marked as spam.

@shiftkey

shiftkey commented Mar 6, 2017

Copy link
Copy Markdown
Member

🌔

@niik niik removed their assignment Mar 6, 2017
@niik

niik commented Mar 6, 2017

Copy link
Copy Markdown
Member

@niik @donokuda let me know if you want me to do more polish of the buttons in this PR, or if I should spin that off into a follow-up task.

@donokuda How do you feel? I'm leaning towards just using the normal button styles here rather than try to replicate what we had in classic.

@donokuda

donokuda commented Mar 6, 2017

Copy link
Copy Markdown
Contributor

@donokuda How do you feel? I'm leaning towards just using the normal button styles here rather than try to replicate what we had in classic.

👍 Yeah, let's go with the normal button styles. We can also consider calling out "Locate" as the primary action.

image

@shiftkey

shiftkey commented Mar 6, 2017

Copy link
Copy Markdown
Member

@niik @donokuda cool, I'll pull out those icons and tidy it up

@shiftkey

shiftkey commented Mar 7, 2017

Copy link
Copy Markdown
Member

Live app:

@shiftkey

shiftkey commented Mar 7, 2017

Copy link
Copy Markdown
Member

🐨

@niik

niik commented Mar 7, 2017

Copy link
Copy Markdown
Member

Design wise this looks great, I'll let @iAmWillShepherd finish the technical review

@iAmWillShepherd

Copy link
Copy Markdown
Contributor

I'll leave it to @shiftkey to merge conflicts. You can merge in afterwards if you like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants