Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: 'Add to Workspace' context menu option (Data Sets & USS resources) #3282

Merged
merged 7 commits into from
Oct 30, 2024

Conversation

traeok
Copy link
Member

@traeok traeok commented Oct 28, 2024

Proposed changes

Resolves #3265

Doc:

Virtual workspaces can be used to access multiple resources from the Explorer pane, such as local files or resources from other schemes. Zowe Explorer v3 now supports virtual workspaces for Data Sets and USS files or folders.

To add a resource to a virtual workspace:

  1. Click the magnifying glass icon beside a profile in the Data Sets or Unix System Services (USS) tree.
  2. Type in a data set search pattern or a USS file path and execute the search.
  3. Once resources are listed in the tree view, right click on an item and select the "Add to Workspace" context menu option.
  4. A message "Extension Zowe Explorer has added X folder(s) to the workspace" is presented in the status bar. The resource is accessible in the Explorer pane of VS Code.

Release Notes

Milestone: 3.1.0

Changelog:

  • Add Data Set or USS resources to a virtual workspace with the new "Add to Workspace" context menu option. #3265

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):

Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
@traeok traeok force-pushed the feat/add-to-workspace branch from 9c28d1e to 04f23d0 Compare October 28, 2024 15:37
Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
Copy link

codecov bot commented Oct 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.07%. Comparing base (0a627e0) to head (84399e7).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3282      +/-   ##
==========================================
+ Coverage   93.05%   93.07%   +0.01%     
==========================================
  Files         113      113              
  Lines       11742    11763      +21     
  Branches     2608     2539      -69     
==========================================
+ Hits        10927    10948      +21     
  Misses        813      813              
  Partials        2        2              

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

@traeok traeok marked this pull request as ready for review October 28, 2024 16:16
Copy link

📅 Suggested merge-by date: 11/11/2024

zFernand0
zFernand0 previously approved these changes Oct 28, 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.

I like the functionality 🙏

One quick thing...

  • Should we remove the divider in the DS tree context menu, (or add it to the USS one)?

    DS USS
    image image

@traeok
Copy link
Member Author

traeok commented Oct 28, 2024

I like the functionality 🙏

One quick thing...

  • Should we remove the divider in the DS tree context menu, (or add it to the USS one)?

Oh sorry, that definitely shouldn't look like that. It must have something to do with how its order is defined in package.json. I'll fix that now.

Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
@traeok
Copy link
Member Author

traeok commented Oct 28, 2024

@zFernand0 Should be good to go now. Thanks for catching that 🙏

@traeok traeok requested a review from zFernand0 October 28, 2024 18:57
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 all the nitpicky things I bring up 😓

Also, do you know why the uss scheme is not detected as a hyperlink by vscode?
image


I'm seeing this error though
image

it happens after trying to cmd/ctrl + click directory and it makes vscode unresponsive 😢

FWIW, I get the following messages from time to time 😋
image

image

image

Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
@traeok
Copy link
Member Author

traeok commented Oct 28, 2024

LGTM! 😋

Thanks for fixing all the nitpicky things I bring up 😓

No problem, I appreciate your feedback ^^

Also, do you know why the uss scheme is not detected as a hyperlink by vscode?

As discussed offline, this seems to be a VS Code issue with how the links are recognized. Only the first scheme that we register has the hyperlink underneath the URI. Unfortunately this has been the case since the FSP was implemented and I'm not sure how to resolve it. Maybe we can resolve it in the future? 😋

it happens after trying to cmd/ctrl + click directory and it makes vscode unresponsive 😢

FWIW, I get the following messages from time to time 😋

This activation error should also be resolved now that errors are caught and logged during activation when doing a remote lookup for each workspace folder. Thanks for spotting this 🙏

@traeok traeok requested a review from zFernand0 October 28, 2024 20:19
zFernand0
zFernand0 previously approved these changes Oct 28, 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! 😋

packages/zowe-explorer/src/trees/shared/SharedInit.ts Outdated Show resolved Hide resolved
Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
zFernand0
zFernand0 previously approved these changes Oct 29, 2024
Copy link
Contributor

@anaxceron anaxceron left a comment

Choose a reason for hiding this comment

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

Suggesting minor edits to the changelog

packages/zowe-explorer/CHANGELOG.md Outdated Show resolved Hide resolved
Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
anaxceron
anaxceron previously approved these changes Oct 30, 2024
Copy link
Contributor

@anaxceron anaxceron left a comment

Choose a reason for hiding this comment

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

good changelog, thanks @traeok!

zFernand0
zFernand0 previously approved these changes Oct 30, 2024
Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
@traeok traeok dismissed stale reviews from zFernand0 and anaxceron via 84399e7 October 30, 2024 14:36
@traeok traeok requested a review from zFernand0 October 30, 2024 14:36
@traeok
Copy link
Member Author

traeok commented Oct 30, 2024

Discussed with @t1m0thyj offline and made a couple changes to the feature:

  • I've hidden the option from PS and USS files as VS Code considers each item in a workspace as its own folder
  • I've added support for USS sessions with a search path applied. If a user does not have a search path set, we'll display a notification with advice on how to add the session to the workspace:

image

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 removing the actions from the file-like nodes 🙏

packages/zowe-explorer/package.json Show resolved Hide resolved
Copy link
Member

@t1m0thyj t1m0thyj 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 @traeok for adding the menu item to USS session nodes too! 😋

@traeok traeok merged commit 95320f8 into main Oct 30, 2024
25 checks passed
@traeok traeok deleted the feat/add-to-workspace branch October 30, 2024 17:33
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

Add "Add to Workspace" to context menu for data sets and USS directories
4 participants