Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display update state in UI #919

Merged
merged 7 commits into from
Nov 13, 2018
Merged

Display update state in UI #919

merged 7 commits into from
Nov 13, 2018

Conversation

nicksnyder
Copy link
Contributor

image

@@ -29,6 +29,7 @@ class UpdateMirrorRepositoryActionContainer extends React.PureComponent<UpdateMi
private subscriptions = new Subscription()

public componentDidMount(): void {
// TODO rxjs medic, I just want this to continuously poll
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@felixfbecker what do I need to do if I want this to refresh every N seconds while the component is visible?

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like rn it polls only while clone in progress. I think you just need to remove the takeUntil

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I simplified this a lot; can you please take a look?

Copy link
Contributor

Choose a reason for hiding this comment

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

Honestly I don't understand the code. To poll, it just calls onDidUpdateRepository(), which doesn't have any docblock describing what its purpose is. If this repository gets the repo from the parent I don't understand why it would handle polling instead of the parent, and I don't understand why this is an event described as "the repository did update" when it is triggering an update.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree that in absolute terms, the interaction here is confusing. From a diff perspective, I just deleted code and it seems to do what I want, so I am going to merge.

Copy link
Member

@beyang beyang left a comment

Choose a reason for hiding this comment

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

Backend LGTM

@codecov-io
Copy link

Codecov Report

Merging #919 into master will decrease coverage by 0.07%.
The diff coverage is 1.49%.

Impacted Files Coverage Δ
cmd/repo-updater/repos/scheduler.go 82.07% <0%> (-6.35%) ⬇️
cmd/frontend/graphqlbackend/repository_mirror.go 10.52% <0%> (-3.62%) ⬇️
cmd/repo-updater/repoupdater/server.go 56.84% <6.66%> (-9.41%) ⬇️

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.

None yet

4 participants