-
Notifications
You must be signed in to change notification settings - Fork 93
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
Fix Refresh button in Unix Attributes View #3354
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Billie Simmons <[email protected]>
Signed-off-by: Billie Simmons <[email protected]>
Signed-off-by: Billie Simmons <[email protected]>
Signed-off-by: Billie Simmons <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3354 +/- ##
==========================================
+ Coverage 93.17% 93.23% +0.05%
==========================================
Files 117 117
Lines 12280 12278 -2
Branches 2781 2704 -77
==========================================
+ Hits 11442 11447 +5
+ Misses 837 830 -7
Partials 1 1 ☔ View full report in Codecov by Sentry. |
📅 Suggested merge-by date: 12/25/2024 |
Signed-off-by: Billie Simmons <[email protected]>
Signed-off-by: Billie Simmons <[email protected]>
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.
Thanks for looking into this Billie! I noticed that in some scenarios the Refresh button still does not work, I posted a GIF and some context below.
this.onUpdateDisposable = this.ussNode.onUpdate(async (node) => { | ||
await this.attachTag(node); | ||
await this.panel.webview.postMessage({ | ||
attributes: await this.ussNode.getAttributes(), | ||
name: node.fullPath, | ||
readonly: this.ussApi.updateAttributes == null, | ||
}); | ||
this.onUpdateDisposable.dispose(); |
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 think we'll still need the onUpdate
event listener. Once the node has been updated in the tree, the attributes in the webview are updated because this callback will be fired in getChildren
(see line 233 in ZoweUSSNode.ts). Then, on lines 53-57 in this file, the refresh is called on the tree node to get the new attributes.
It seems like removing this causes every other refresh call to work - for example, if I change the permissions in my terminal and then refresh in ZE, the first refresh does not show any changes, but the second one pulls the right permissions:
Also, the onUpdate
callback is working as expected in v2. It seems like the onUpdateEmitter
might not be firing in v3.
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'm seeing the same behavior as Trae.
Also, the GIF shows that the Apply changes
button is enabled the second time the refresh button is clicked, even though nothing the user (I) didn't make changes 😅
Reminder: This pull request has a merge-by date coming up within the next 24 hours. Please review this PR as soon as possible. @t1m0thyj @zFernand0 @awharn @SanthoshiBoyina1 @likhithanimma1 |
Considering the timing of the holidays, I've "snoozed" (disabled) the merge-by comments until everyone is back in the office. |
Proposed changes
bug fix for Edit Attributes webview refresh button when changes not applied, reverting the view to original values.
#3238
Release Notes
Milestone: 3.1.0
Changelog: Fixed an issue with edit UNIX file attributes refresh button. #3238
Types of changes
Checklist
General
yarn workspace vscode-extension-for-zowe vscode:prepublish
pnpm --filter vscode-extension-for-zowe vscode:prepublish
Code coverage
Deployment
Further comments