Skip to content

Order language list#379

Draft
1000TurquoisePogs wants to merge 1 commit intov3.x/stagingfrom
feature/v3/order-language-list
Draft

Order language list#379
1000TurquoisePogs wants to merge 1 commit intov3.x/stagingfrom
feature/v3/order-language-list

Conversation

@1000TurquoisePogs
Copy link
Copy Markdown
Member

Proposed changes

The language selection menu in the zlux-editor previously showed all available languages sorted alphabetically. This made it tedious for mainframe developers to find the few languages they use most often, as those languages were scattered throughout a large alphabetical list.

This PR adds a curated "featured" section at the top of the language menu containing the languages most commonly used by mainframe developers:

HLASM, REXX, JCL, COBOL, Java, C, C++, JavaScript, TypeScript, Python, JSON, YAML, Plaintext

A horizontal separator (group-end) divides the featured section from the full alphabetical list of all other languages below it. Any featured language not registered in the current Monaco instance is silently omitted. The ordering of the featured list is intentional and reflects typical mainframe workflow priority.

Only resetLanguageSelectionMenu() in menu-bar.component.ts was modified — no changes to the template, styles, or other services were required.

Type of change

  • New feature (non-breaking change which adds functionality)

PR Checklist

  • If the changes in this PR are meant for the next release / mainline, this PR targets the "staging" branch.
  • My code follows the style guidelines of this project (see: Contributing guideline)
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • New and existing unit tests pass locally with my changes
  • video or image is included if visual changes are made
  • Relevant update to CHANGELOG.md
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works, or describe a test method below

Testing

  1. Build and launch the zlux-editor plugin in a running Zowe Desktop.
  2. Open any file to activate the Language menu in the menu bar.
  3. Click the Language menu and verify:
    • The top of the list shows the featured languages in the following order: HLASM, REXX, JCL, COBOL, Java, C, C++, JavaScript, TypeScript, Python, JSON, YAML, Plaintext.
    • A horizontal separator (<hr>) appears below the featured group.
    • All other Monaco-registered languages appear below the separator, sorted alphabetically.
  4. Select a featured language and confirm the editor switches to that language mode.
  5. Select a language from the section below the separator and confirm the editor switches correctly.
  6. Open a new file (so the Language menu is removed), then open another file and verify the language menu rebuilds correctly with the same grouping.

Signed-off-by: 1000TurquoisePogs <sgrady@rocketsoftware.com>
@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Ready for Review

Development

Successfully merging this pull request may close these issues.

1 participant