Skip to content
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(tree,jobs): Various fixes to improve tree UX; add checks for "Delete Job" #2481

Merged
merged 11 commits into from
Oct 2, 2023

Conversation

traeok
Copy link
Member

@traeok traeok commented Sep 27, 2023

Proposed changes

This PR resolves the following issues:

  • The "Delete Job" action showed an info message stating that the job was deleted, even in scenarios where an error occurred during deletion
  • A check was missing for the optional paste APIs, which allowed the paste operation to run on unsupported nodes
    • Added an info message to inform users if the paste operation is unsupported
  • Removed unneeded "node array" from pasteUss function, and fixed refresh after paste is complete (nodes now show up as expected)
  • Removed check from the USS tree for newly-created nodes so that deleted nodes are removed from the tree
  • "Directory nodes" (USS directories, PDS, and Jobs) and session nodes across all trees now update with their respective "collapsed icon" when collapsed.
  • Add check for JCLLIB to appendSuffix function to format its members as JCL

Release Notes

Milestone: 2.11.1

Changelog:

  • Fixed issue where USS nodes were not removed from tree during deletion. USS tree not updated with changes #2479
  • Fixed issue where new USS nodes from a paste operation were not shown in tree until refreshed. USS tree not updated with changes #2479
  • Fixed issue where the "Delete Job" action showed a successful deletion message, even if the API returned an error.
  • USS directories, PDS nodes, job nodes and session nodes now update with their respective "collapsed icon" when collapsed.

Types of changes

What types of changes does your code introduce to Zowe Explorer?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Updates to Documentation or Tests (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This checklist will be used as reference for both the contributor and the reviewer

  • I have read the CONTRIBUTOR GUIDANCE wiki
  • PR title follows Conventional Commits Guidelines
  • PR Description is included
  • gif or screenshot is included if visual changes are made
  • yarn workspace vscode-extension-for-zowe vscode:prepublish has been executed
  • All checks have passed (DCO, Jenkins and Code Coverage)
  • I have added unit test and it is passing
  • I have added integration test and it is passing
  • There is coverage for the code that I have added
  • I have tested it manually and there are no regressions found

Further comments

If possible, please try to break the USS tree when testing this PR 😅 I want to make sure that the nodes are staying up to date, and I'm not sure that I've exhausted all scenarios. Here's what I've tested so far:

  • Delete a node in the root level of the USS session
  • Delete a node in a sub-folder of the USS session
  • Copy multiple files and paste into a folder within the USS session
  • Copy multiple files and paste into USS session node

@codecov
Copy link

codecov bot commented Sep 27, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Files Coverage Δ
packages/zowe-explorer/src/dataset/DatasetTree.ts 91.14% <100.00%> (+0.01%) ⬆️
...kages/zowe-explorer/src/dataset/ZoweDatasetNode.ts 95.77% <100.00%> (+0.06%) ⬆️
packages/zowe-explorer/src/job/ZosJobsProvider.ts 91.19% <100.00%> (+0.01%) ⬆️
packages/zowe-explorer/src/job/ZoweJobNode.ts 93.75% <100.00%> (ø)
packages/zowe-explorer/src/job/actions.ts 90.16% <ø> (-0.05%) ⬇️
packages/zowe-explorer/src/shared/utils.ts 97.12% <100.00%> (ø)
packages/zowe-explorer/src/uss/USSTree.ts 92.96% <100.00%> (+0.01%) ⬆️
packages/zowe-explorer/src/uss/actions.ts 93.53% <100.00%> (-0.06%) ⬇️
packages/zowe-explorer/src/utils/TreeViewUtils.ts 100.00% <100.00%> (ø)
packages/zowe-explorer/src/uss/ZoweUSSNode.ts 92.23% <75.00%> (-1.07%) ⬇️

📢 Thoughts on this report? Let us know!.

@traeok traeok changed the title fix(tree,jobs): Various fixes to improve user experience in trees; add checks for "Delete Job" fix(tree,jobs): Various fixes to improve tree UX; add checks for "Delete Job" Sep 27, 2023
@JillieBeanSim JillieBeanSim added this to the v2.11.1 milestone Sep 28, 2023
Copy link
Member

@zFernand0 zFernand0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems exactly the same as the PR below:

Also, thanks for adding JCLLIB to the appendSuffix method 😋


I'm running into a small issue in the dataset tree with the ID already being registered.
Steps:

  1. Search for a dataset pattern, e.g. sys1.parmlib
  2. Collapse the profile
  3. Expand the profile
  4. See this issue:
    image

Everything else LGTM! 😋

@traeok
Copy link
Member Author

traeok commented Sep 28, 2023

This seems exactly the same as the PR below:

@zFernand0 Yeah... 😅 I ran into some issues with the previous branch when trying to rebase off of maintenance, so figured a new branch/PR would be the quickest solution.

I'm running into a small issue in the dataset tree with the ID already being registered. Steps:

  1. Search for a dataset pattern, e.g. sys1.parmlib
  2. Collapse the profile
  3. Expand the profile
  4. See this issue:
    image

Everything else LGTM! 😋

I haven't made any adjustments to the getChildren logic for the dataset tree yet, but I will look into fixing this as part of this PR 😁

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
1.5% 1.5% Duplication

Copy link
Member

@zFernand0 zFernand0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 😋
Thanks for fixing the DS issue (and adding the license header on some test files) 😋

@JillieBeanSim JillieBeanSim merged commit 8b2e848 into maintenance Oct 2, 2023
23 checks passed
@JillieBeanSim JillieBeanSim deleted the fix/uss/tree-ux branch October 2, 2023 22:59
@traeok traeok mentioned this pull request Oct 3, 2023
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants