mythmon / edwin

A bug management system
Mozilla Public License 2.0
4 stars 0 forks source link

Add progress indicator #65

Closed willkg closed 9 years ago

willkg commented 9 years ago

Fixes #52

Does this look generally like a valid approach? For the most part, all it does is flash "LOAD_BUGS" for a while (that's the step that takes most of the time) and then disappear. The other steps don't take much time. However, this does give complete visibility into whether it's still working or not.

I tried to generalize it to be a general progress indicator that we could use for other things. I'm not sure what those other things would be or how that would manifest itself. It might be better to do like we did with ernest where we have a "turn indicator on" and "turn indicator off" kind of thing.

Thoughts?

Also, thoughts on names of classes and files?

mythmon commented 9 years ago

Thoughts on names: Indicator seems awfully generic. Maybe LoadingIndicator?

Although it is nice to know exactly what is happening, I worry about things that happen in parallel. For example, PRs and bugs are downloaded at the same time. The way we did this in Ernest was to just have a count of outstanding tasks. That might work, but it doesn't say what step you are on.

Alternatively, we could have each task added and removed. Something like IndicatorActions.taskStart('Fetching bugs') and IndicatorActions.taskDone('Fetching bugs'). Or maybe that but with constants like IndicatorActions.taskStart(IndicatorConstants.FETCH_BUGS). Maybe those are all too much typing.

Then the UI could show all open tasks at once.

willkg commented 9 years ago

I'll switch it to "Progress" which lets us use it for all running tasks.

mythmon commented 9 years ago

+1 to Progress

willkg commented 9 years ago

^^^ That rebases against master and redoes IndicatorStore as ProgressStore which allows tasks to start/end themselves.

That seems better. I can't tell if it's got a sensible architecture or not, though.

mythmon commented 9 years ago

I actually cloned this and ran it. It looks hawt. I'm amazed how much a difference this makes. Nice job!

Also, I'm surprised that PRs and Bugs aren't downloading parallel. I thought they did. Oh well, I should look into that.