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

Add type to session nodes #3309

Merged
merged 14 commits into from
Nov 21, 2024
Merged

Conversation

petermoogk
Copy link
Contributor

@petermoogk petermoogk commented Nov 11, 2024

Proposed changes

Currently, the contextValue for a Zowe tree node does not encode the profile type. This makes it difficult for an extender to add a context menu action that should be visible for a specific profile type. This PR includes code that updates the context value for each of the three zowe views(ie data set, uss, and jobs). Each contextValue has "_type=<profile_type>" appended to the end.

Release Notes

Milestone:

Changelog:

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (non-breaking change which adds or improves functionality)
  • Breaking change (a change that would cause existing functionality to not work as expected)
  • Documentation (Markdown, README updates)
  • Other (please specify above in "Proposed changes" section)

Checklist

General

  • I have read the CONTRIBUTOR GUIDANCE wiki
  • All PR dependencies have been merged and published (if applicable)
  • A GIF or screenshot is included in the PR for visual changes
  • The pre-publish command has been executed:
    • v2 and below: yarn workspace vscode-extension-for-zowe vscode:prepublish
    • v3: pnpm --filter vscode-extension-for-zowe vscode:prepublish

Code coverage

  • There is coverage for the code that I have added
  • I have added new test cases and they are passing
  • I have manually tested the changes

Deployment

  • I have added developer documentation (if applicable)
  • Documentation should be added to Zowe Docs
    • If you're an outside contributor, please post in the #zowe-doc Slack channel to coordinate documentation.
    • Otherwise, please check with the rest of the squad about any needed documentation before merging.
  • These changes may need ported to the appropriate branches (list here):

Further comments

Signed-off-by: Peter Moogk <[email protected]>
Copy link

codecov bot commented Nov 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.02%. Comparing base (dc2178f) to head (ee1b063).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3309   +/-   ##
=======================================
  Coverage   93.02%   93.02%           
=======================================
  Files         116      116           
  Lines       12046    12047    +1     
  Branches     2651     2655    +4     
=======================================
+ Hits        11206    11207    +1     
  Misses        839      839           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

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.

Hey @petermoogk,
Curious if we can add (or update) some unit tests that will capture this addition to the context values 🙏

packages/zowe-explorer/CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Fernando Rijo Cedeno <[email protected]>
Signed-off-by: Peter Moogk <[email protected]>
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.

Hey @petermoogk,

Would you mind adding (or updating) a small test which verifies that the profile type is added to the context value for each tree?

I'm thinking either a new (or updated) test in each of these files:

  • packages/zowe-explorer/tests/unit/trees/uss/USSTree.unit.test.ts
  • packages/zowe-explorer/tests/unit/trees/dataset/DatasetTree.unit.test.ts
  • packages/zowe-explorer/tests/unit/trees/job/JobTree.unit.test.ts

traeok
traeok previously approved these changes Nov 19, 2024
Copy link
Member

@traeok traeok left a comment

Choose a reason for hiding this comment

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

Changes LGTM, thanks @petermoogk for the enhancement!
I noticed there are conflicts, I can re-approve once they are resolved.

zFernand0
zFernand0 previously approved these changes Nov 20, 2024
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! 😋

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! 😋

Copy link
Contributor

@JillieBeanSim JillieBeanSim 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 @petermoogk

@JillieBeanSim JillieBeanSim merged commit 9f5c87e into zowe:main Nov 21, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

4 participants