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

"Submit as JCL" in file explorer displayed for every file #2574

Open
phaumer opened this issue Nov 14, 2023 · 5 comments
Open

"Submit as JCL" in file explorer displayed for every file #2574

phaumer opened this issue Nov 14, 2023 · 5 comments
Labels
bug Something isn't working priority-low Legit issue but cosmetic or nice-to-have severity-low Bug that makes the usage of the Zowe less convenient but doesn't impact key use cases

Comments

@phaumer
Copy link
Member

phaumer commented Nov 14, 2023

Describe the bug

The context menu in the VS Code File Explorer is already very busy. Many other extensions contribute to it. It is essential for a good user experience that it only shows operations that are valid in the current context of the selected file.

Recently a new entry was added by Zowe Explorer to show "Submit as JCL" for every file in the explorer. As it also includes group separators at the top and bottom the vertical real estate it uses is significant. Zowe Explorer was intended to be language agnostic and purely a tool that focuses on the interactions with z/OS independent of the content of the text files it displays. It therefore should not assume any language ids as those would be contributed by language extensions. So ideally a JCL editing extension that integrate with Zowe Explorer should contribute such a menu and bind it to a jcl language id in a "when" clause in the menu definition.

I propose to either remove the menu completely and let developers of JCL editors implement it or let the user configure a file extension (or list a third party language id) as a user setting that should be used for the menu's "when" clause. If no extension is configured then the menu should not be created as third party extension might already provide it.

To Reproduce

Steps to reproduce the behavior:

  1. Go to file explorer
  2. Right-click any file that is not a JCL file
2023-11-14_13-48-07

Expected behavior

Zowe Explorer should be language independent.

Desktop (please complete the following information):

  • OS: any
  • Zowe Explorer Version: 2.12.1
  • (Optional) Zowe CLI Version:
  • (Optional) Are you using Secure Credential Store?

Additional context

@phaumer phaumer added the bug Something isn't working label Nov 14, 2023
Copy link

Thank you for creating a bug report.
We will investigate the bug and evaluate its impact on the product.
If you haven't already, please ensure you have provided steps to reproduce the bug and as much context as possible.

@adam-wolfe adam-wolfe added priority-low Legit issue but cosmetic or nice-to-have severity-low Bug that makes the usage of the Zowe less convenient but doesn't impact key use cases labels Nov 21, 2023
@oseam87
Copy link

oseam87 commented Nov 26, 2023

I agree, I always see this menu item (and I never used it). No, I don't want to submit my program as JCL ;-)

@zFernand0
Copy link
Member

one way we could resolve this is by adding JCL as a language provided by Zowe Explorer.
That way we can add the check back that only adds this option to JCL files.
We just need to investigate the possible drawbacks of doing this.

{
  // ...
  "contributes": {
    "languages": [
      { "id": "jsonc",  "filenamePatterns": [ "zowe.config*.json" ] },
      { "id": "jcl",    "filenamePatterns": [ "*.jcl" ] }
    ]
  }
}

@phaumer
Copy link
Member Author

phaumer commented Nov 27, 2023

@zFernand0 my thinking was that there would be a user setting for Zowe Explorer that allows specifying a language id to use for the when clause, because different JCL language extension could use different language ids as we seen this for COBOL out there. One extension might be using "jcl" versus another could be using "JCL" or "JobControlLanguage". In other words Zowe Explorer should not make any assumptions, but allow to work with any of these by configuration.

@t1m0thyj t1m0thyj moved this from New Issues to Low Priority in Zowe Explorer for VS Code Dec 26, 2023
@t1m0thyj
Copy link
Member

In addition to restricting the "Submit as JCL" command to show only for JCL files, we may want to move it further down the list. Right now it appears near the top when right-clicking any file in VS Code file explorer or right-clicking an editor:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-low Legit issue but cosmetic or nice-to-have severity-low Bug that makes the usage of the Zowe less convenient but doesn't impact key use cases
Projects
Status: Low Priority
Development

No branches or pull requests

5 participants