-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 a progress notification when performing any git clone #4483
Conversation
Signed-off-by: Oleksii Orel <oorel@redhat.com>
It is strange for me that the notification can be closed by itself, even if clone is not finished yet. The button that restores the notification looks not obvious, I mean it is not clear what it does. |
@vinokurig I add it like a proposal. Because it will be nice for me to hide an annoying notification after 10s. |
WDYT? |
Yes, why not. Ideally we would do the clone in the terminal and rely on the natural output of git. |
I really like the idea to show the progress git clone, actually of all kind of long running operations. However I think the UX didn't work in my test: Starting a git clone operationIt shows The progress notification disappears after a short while, but I see spinner icon in the status bar for just two seconds. Starting a second clone operation... of a git repo containing a lot of objects. And now I see purpose of the status bar item. I says It's not clear why the progress is hidden in the first place. Especially the progress notifications are meant to report progress continuously: And we can easily add the progress reporting from dugite-extra in the Git interface, see ICloneProgress @olexii4 could you explain what the benefit of the status bar item is? Also, have you seen #2461? The generic progress reporting mechanism seems very similar. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides the UX concerns mentioned above, there is a Emitter leak, cf.
WARN Error: Possible Emitter memory leak detected. 30 exit listeners added. Use event.maxListeners to increase limit
at Emitter.../../packages/core/lib/common/event.js.Emitter.checkMaxListeners (https://3000-a1d2c682-c255-4618-a5e6-60887fe22915.ws-eu0.gitpod.io/bundle.js:97020:26)
at Notifications._event.Object.assign.maxListeners [as onShow] (https://3000-a1d2c682-c255-4618-a5e6-60887fe22915.ws-eu0.gitpod.io/bundle.js:96987:27)
at Notifications.push.../../packages/messages/lib/browser/notifications.js.Notifications.createNotificationElement (https://3000-a1d2c682-c255-4618-a5e6-60887fe22915.ws-eu0.gitpod.io/78.bundle.js:503:18)
at Notifications.push.../../packages/messages/lib/browser/notifications.js.Notifications.create (https://3000-a1d2c682-c255-4618-a5e6-60887fe22915.ws-eu0.gitpod.io/78.bundle.js:463:66)
@AlexTugarev With my improvement, we close any progress message in time from the preferences(notification.timeout). Then can reopen with the status bar widget. And I added minimal changes to improve existing progress message, to become more convenient to users because we are using it with our API. And this improvement was added in the area of the issue "add progress when performing any git clone" like a separate commit to improving their behavior. Progress extension looks very nice. But still not merged from the 2018 summer season. And the big improvement cannot be done in the issue of adding existing progress notification for git clone. I can create The separate issue for progress message improvement when the progress extension will be merged. Like a part for withProgress improvement(theia.d.ts). |
Signed-off-by: Oleksii Orel <oorel@redhat.com>
@@ -48,21 +52,59 @@ export class NotificationsMessageClient extends MessageClient { | |||
} | |||
|
|||
showProgress(progressId: string, message: ProgressMessage, cancellationToken: CancellationToken, update?: ProgressUpdate): Promise<string | undefined> { | |||
const messageArguments = { ...message, type: MessageType.Progress, options: { ...(message.options || {}), timeout: 0 } }; | |||
if (this.visibleProgressNotifications.has(progressId)) { | |||
const messageArguments = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why should the default value for timeout
be changed now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we remove , timeout: 0
it will get it from preferences['notification.timeout']
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it. the question is, why should that be the case in general? what is wrong about it in general? besides the git clone operation, the main use case when introducing this feature was to allow progress reporting. what happens with that now?
if the source for progress reports stops updating, will this dismiss the progress notification?
if you think this should be a short timeout value for git clone in this PR, why not just setting it explicitly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot understand you. Previously it was shown without a close timeout at all timeout: 0
.
If the source for progress reports stops updating(as I understand - cancel this progress notification
https://github.com/theia-ide/theia/pull/4483/files#diff-cde0e8b29563cef99910b9e41f4daab7R89
), will this dismiss the progress notification.
The problem is, that the UI for notification is worn out and needs a refresh. But here, a fix of the z-order of the notification would solve the issue, right? If you still can use the command palette while the progress notification is visible, you don't need to dismiss it automatically.
What is the reason to change this default?
Well, isn't it worth spending time on finishing stuff? The progress UI just had no (well) working application. The git clone would be a good candidate, especially with the hints about the progress reporting from above. I'd rather see progress extension redux using the git clone case as an application of it, instead of adding yet another shortcut. I'm releasing the break as the memory leak is gone. But please get more people convinced of the UX. |
@@ -77,11 +77,16 @@ export class GitQuickOpenService { | |||
dynamicItems.push(new SingleStringInputOpenItem( | |||
`Clone the Git repository: ${lookFor}. ${suffix}`, | |||
async () => { | |||
const progress = await gitQuickOpenService.messageService.showProgress({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cf. links in:
eclipse-che/che#12564 (comment)
eclipse-che/che#12564 (comment)
it was discussed couple of times before. and it would really make sense so tackle this in a more generic way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. There's more general issue #759.
What about approve improvements for inProgress notifications only?
We are using them in our API and it will be nice to improve the existing behavior. In this case, I will remove the first commit and change the PR description
@AlexTugarev |
Add a progress notification when performing any git clone.
Related issue: eclipse-che/che#12564
Signed-off-by: Oleksii Orel oorel@redhat.com