-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat: add refresh to the WU context menu #388
feat: add refresh to the WU context menu #388
Conversation
@GordonSmith for review. I removed passing the element to the refresh function so that when the user explicitly selects refresh, it forces a fresh. The reason being the way it is currently, the only time it refreshes is when it receives an event that is local. because it checks for any changes in the local tree. If you are listing workunits that are from other people that has changed, the refresh currently will not refresh because it is checking for a local change. I think the user expects refresh to force a refresh without condition. |
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.
What happens when the user clicks refresh in the title area?
What happens when the user right clicks on a WU and selects refresh?
@GordonSmith they both force a refresh. They call the same function. The httpsystems-refresh command is only called in those two places, so it won't change the behavior of other refresh calls. |
The one in the title should refresh the entire tree, while the one a WU should just refresh that node? |
That makes sense. I will look into a way to pass the element without it checking if that element has changed. I need to force that one element. Will work on that. |
8614649
to
58ae83b
Compare
@GordonSmith the refresh forces an entire refresh only if the user instantiates the refresh manually. For review. |
src/ecl/eclWatchTree.ts
Outdated
userRefresh(): void { | ||
this.updateMenu(); | ||
super.refresh(); | ||
} |
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.
This method isn't needed, you can just call refresh()
?
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.
Actually, that would work!
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.
The whole userRefresh
method is not needed
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.
Yes it is. If you call refresh from package.json, the refresh that is attached to the wu treeview item will send the item and it will check if the item has changed, and will not force the refresh.
58ae83b
to
47c8ba8
Compare
@GordonSmith for review |
src/ecl/eclWatchTree.ts
Outdated
userRefresh(): void { | ||
this.updateMenu(); | ||
super.refresh(); | ||
} |
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.
The whole userRefresh
method is not needed
Signed-off-by: David de Hilster <[email protected]>
47c8ba8
to
664d53a
Compare
@GordonSmith for review |
fixes #386