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 new settings for default dataset & job sort orders #3369

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Buckminsterfullerene02
Copy link

@Buckminsterfullerene02 Buckminsterfullerene02 commented Dec 21, 2024

Proposed changes

As a daily user of Zowe Explorer, I have found it annoying that the default sort order for datasets and jobs is never the one I want. Therefore, the following two new settings are added:

  • zowe.ds.default.sort
  • zowe.jobs.default.sort

The new settings use the same defaults as is currently hardcoded for datasets and jobs.

The "(default)" added to the side of the sort order method is no longer hardcoded and is changed based on the settings.

Why do the setting have to be edited in settings.json? Because the alternatives (I thought of) are:

  • Add 4 new settings instead: dataset sort method, dataset sort direction, job sort method, job sort direction, as dropdowns. This seems too much for such a minor setting.
  • Have only 2 dropdowns as the above settings, but have the 8 and 10 permutations in each dataset and job dropdowns respectively. Also seems a bit excessive to me.

Another change that could be made, is to add sort order per dataset, and for jobs, as a persistence, like favourites. I actually started doing this as the first iteration of the feature, but realised the default settings would be easier to do at first, then try persistence, as it seems a bit more complex. Let me know what the thoughts on that are.

Release Notes

Milestone: todo

Changelog: todo

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

This is my first contribution to this project. I have read as much of the contributor guidelines as I can, but there is a lot, so I'm sorry if I've forgotten or missed something. It also means that naturally I am still learning the codebase, so changes may be sub-par. Therefore, I have decided to open this as a draft PR with no test cases written yet. This isn't in the roadmap nor any issue has been raised, so I'd like to make sure the team is ok with this existing at all.

Lastly, I feel like my development iteration experience is too manual and that I must be missing something/doing something wrong. Currently, when I am making changes, I have pnpm watch:zowe-explorer script running. To build, I do pnpm install && pnpm run package. Then I go to extensions -> install from VSIX -> select zowe explorer. Then I must restart vscode (luckily it only takes a few seconds). When I want to look at debug logs, I need to manually open \.vscode\extensions\zowe.vscode-extension-for-zowe-3.1.0-SNAPSHOT\logs, which I also have to close (and not be in the folder in file explorer) for vscode to actually install the new VSIX file. What am I missing?

Added two new settings:
- zowe.ds.default.sort
- zowe.jobs.default.sort

They use the same defaults as is currently hardcoded.

The '(default)' is no longer hardcoded and is changed based on the settings.

TODO:
Tests need to be edited/written to reflect new feature/changes.
Perhaps include sort order persistence in the feature?

Signed-off-by: Buckminsterfullerene02 <[email protected]>
Signed-off-by: Buckminsterfullerene02 <[email protected]>
@adam-wolfe
Copy link
Contributor

Hi @Buckminsterfullerene02, for faster debugging, you can run the extension by pressing F5 and the logs can be viewed in real time using the Output tab in the VS Code terminal area and selecting Zowe Explorer from the drop down menu.

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

Successfully merging this pull request may close these issues.

2 participants