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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

petermoogk
Copy link

@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 92.97%. Comparing base (fc799e3) to head (7503747).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3309      +/-   ##
==========================================
- Coverage   92.99%   92.97%   -0.02%     
==========================================
  Files         116      116              
  Lines       12063    12064       +1     
  Branches     2733     2762      +29     
==========================================
- Hits        11218    11217       -1     
- Misses        843      845       +2     
  Partials        2        2              

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Review/QA
Development

Successfully merging this pull request may close these issues.

2 participants