| Summary: | [client] Progress service and visual display of progress | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | John Arthorne <john.arthorne> | ||||
| Component: | Client | Assignee: | Susan McCourt <susan> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | prakash | ||||
| Version: | 0.2 | ||||||
| Target Milestone: | 0.2 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Moving to Susan, although I might take an initial stab at a client utility as described above. See an initial utility method in status.js. I don't know if this is the right long term place, but in the end it provides similar functionality - showing a non-blocking message in the UI for a period of time. This makes it somewhat like the old IStatusLineManager. The utility function itself is showWhile(deferred), which displays a progress message until the deferred is resolved. It could probably be augmented to take status messages directly from the deferred's progress events for pure client-side scenarios, but I haven't attempted to generalize it. Currently the function is tailored to server side services that traffic in progress resources [1]. Currently the messages are not appearing in the UI - it looks like the original setMessage function in status.js isn't working, at least in the git clone page. I haven't had a chance to dig into this. It is currently used by the git clone operation if anyone wants to try it out. [1] http://wiki.eclipse.org/Orion/Server_API#progress Created attachment 193105 [details] screenshot (In reply to comment #2) > Currently the messages are not appearing in the UI - it looks like the original > setMessage function in status.js isn't working, at least in the git clone page. > I haven't had a chance to dig into this. I was going to investigate this but it seems to be working for me...(see screenshot). Looks nice! John, do you want me to take it from here? I was going to dedicate a separate spot for progress and (probably later) do some animation with the lower ball in the Orion logo. (In reply to comment #3) > I was going to investigate this but it seems to be working for me...(see > screenshot). Looks nice! I see it now too. Maybe I just didn't see it yesterday - it is very subtle and visually looks like part of the breadcrumb (and I was sleep deprived). >John, do you want me to take it from here? >I was going to dedicate a separate spot for progress and (probably later) do >some animation with the lower ball in the Orion logo. I want to do a bit more tidying of the code, but certainly hoping you were going to tackle the visual presentation aspects. It is currently a recursive function which I'm not happy about - I suspect it would stack overflow if a clone operation took too long. I was going to look at that today. Note, I found it necessary to add a concept of a result status, so that the client code find out the result of the operation (succeed/fail/etc). This is now using setErrorMessage in status.js, so if the operation succeeds you see a green message, and on failure you see a red message. I don't have any more changes to progress support planned for M7. One minor thing that came to mind: It would be interesting for the user to be able to "dismiss" the message at the top (whether it was a progress message, or any other kind of message). In other places I have seen a small X button that makes the message slide away. For m7 I plan to: - move the progress visual to its own space in the dark part of the toolbar rather than reuse the status area. - report the final status in some kind of popup that can be dismissed. This will be the transient status that results from a longop. - the existing status area is considered to be a more permanent status line Fixed. This could use more polish later on, but I want to wait for Linda's visual design work and possible animation. - the progress message is now "light on dark bar." It definitely grabs the attention. - a status icon (warning, error, info) is used to show the result rather than using text color. - rather than use a popup for the progress result, I just show the text, but include an affordance for closing the message. - I overloaded the status icon with the behavior to close the progress message. This may not be intuitive, but it does include hover text and hover visual feedback so that you can see it does something. I didn't really want a red X or other additional noise. Let's see what folks say... Very cool! I tried it out today and it looks great to me. |
We need a general purpose UI for showing progress on a page. From a brief chat with Susan, she mentioned perhaps the black bar in the header could be used for this. It would also be useful to have a utility function on the client that does the following: - run a timeout loop that pings for progress from the remote service - update progress UI with current progress state - Return a deferred so client can invoke some operation when the operation finally completes (callback and/or errback) Pseudo-example: progressService.runWithProgress(gitClient.clone(location)).then( function() { //update clones view } ); gitClient.clone(location) would return a deferred that resolves to the location of a remote progress resource. The runWithProgress would then poll that progress resource until completion, updating the progress widget each time. runWithProgress would return a deferred that only gets resolved once the long running task (such as clone) is completed. This way for the client it is essentially transparent that the clone potentially takes a very long time.