Skip to content

Proxy (p)refactor of create tutorial repository dialog#9126

Merged
outofambit merged 22 commits intodevelopmentfrom
proxy-prefactor-create-tutorial-repository
Feb 19, 2020
Merged

Proxy (p)refactor of create tutorial repository dialog#9126
outofambit merged 22 commits intodevelopmentfrom
proxy-prefactor-create-tutorial-repository

Conversation

@niik
Copy link
Member

@niik niik commented Feb 17, 2020

Description

As part of the proxy work I'm doing I've tentatively settled on an approach which means that all network Git operations are going to have to originate from within the App Store. The only network Git operation that doesn't originate from the AppStore today is the push operation within the CreateTutorialRepositoryDialog component.

In refactoring this I realized that the change was becoming rather large and thus a good candidate to be extracted and reviewed on its own.

Also, @outofambit totes foresaw this happening

Notes for the reviewer

This is in essence a refactor and no functionality should have changed. Evidence of altered logic are probably a mistake worth calling out in the review.

One notable exceptions is that the CreateTutorialRepository component used to have a separate loading state which was set to true when the create operation started and reset to false once it ended. This state determined whether the dialog would be enabled (i.e. whether the create/cancel buttons could be clicked), whether it was dismissable, and whether it should show the progress spinner or not. This state has been replaced by a variable derived from the presence of a progress property. Functionally to the user there should be no difference.

As a side effect of ☝️ I've slightly reordered the createTutorialRepository method to immediately set a progress upon commencing the creation.

@outofambit outofambit self-requested a review February 18, 2020 14:52
Copy link
Contributor

@outofambit outofambit left a comment

Choose a reason for hiding this comment

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

one concern but otherwise looks great!

import { git } from '../../git'
import { friendlyEndpointName } from '../../friendly-endpoint-name'

const nl = __WIN32__ ? '\r\n' : '\n'
Copy link
Contributor

Choose a reason for hiding this comment

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

@outofambit outofambit self-assigned this Feb 18, 2020
@outofambit outofambit merged commit 88039be into development Feb 19, 2020
@outofambit outofambit deleted the proxy-prefactor-create-tutorial-repository branch February 19, 2020 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants