The Wayback Machine - https://web.archive.org/web/20201215054729/https://github.com/github/VisualStudio/pull/615
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

add ICanBeBusy and show indeterminate progress bar #615

Closed
wants to merge 1 commit into from

Conversation

@tocsoft
Copy link
Contributor

@tocsoft tocsoft commented Oct 23, 2016

Wanted to help out and thought this issue looks like it shouldn't be too difficult or would require any sweeping changes to implement.

Gotchas

ICanBeBusy will only work when the class also implements INotifyPropertyChanged (basically if the ViewModel inherits from NotificationAwareObject then it'll work as expected)

Overview of changes:

  • Added a new interface ICanBeBusy
  • Updated GitHubPaneViewModel to proxy IsBusy from hosted views whose VM implement ICanBeBusy.
  • I show an indeterminate progress bar on GitHubPaneView and disabled hosted view if IsBusy set to true.
  • Proxy IsBusy from ICanBeBusy to the IsBusy Observable in SimpleViewUserControl.
    (not sure is this one wanted doing but it looked like it was there for a reason)

Other things of note

This PR doesn't actually enable any of the current viewmodels to use ICanBeBusy (yet), would prefer some guidance on which one should use this, didn't just want to be disabling any random views as I assumed they are already internally handling there own busy state UI.

What I could do is just stop disabling the view (let the view handle its own disabling if required) and then I feel pretty confident that I could just slap ICanBeBusy on anything that currently setting the IsBusy property on BaseViewModel. We can always add a second interface that explicitly opts into the view being disabled wholesale an ICanBeReallyBusy for example.

Fixes #554

ICanBeBusy will only work when class also implements INotifyPropertyChanged (basicaly if the ViewModel inherits fron NotificationAwareObject then it'll work as expected)

New interface ICanBeBusy. Updated GitHubPaneViewModel to proxy
IsBusy from hosted views whose VM implement ICanBeBusy. Show
indeterminate progress bar and disabled hosted view if IsBusy.

Proxy IsBusy from ICanBeBusy to the IsBusy Observable in SimpleViewUserControl.
@tocsoft
Copy link
Contributor Author

@tocsoft tocsoft commented Oct 23, 2016

just been reading over 'Maintainer workflow' and think that this PR is probably superfluous as it looks like some of this stuff has been rolled into that one... i'll leave this here anyway as it looks like the 2 implementations are a bit different but if you want to close this in favour of whats coming in there then that's understandable.

@shana
Copy link
Collaborator

@shana shana commented Oct 24, 2016

Thank you so much for this! We've been going back and forth on how to handle busy states and forward them from hosted view/viewmodels out to the container, and what you did here on this PR is one of the possible approaches, we just had no time to actually implement it to try it out.

I'll wait until @grokys has a chance to look this over and comment on it as he's been doing most of the work that needs this.

@tocsoft
Copy link
Contributor Author

@tocsoft tocsoft commented Oct 24, 2016

That's fine.. feel free to just treat this more as a suggested option that a real request for merging in.

@shana shana force-pushed the github:master branch from 49ba6cf to a82bce9 Aug 16, 2017
@sguthals
Copy link
Contributor

@sguthals sguthals commented Mar 13, 2018

Closing because this is stale.

@sguthals sguthals closed this Mar 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.