-
Notifications
You must be signed in to change notification settings - Fork 93
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
base: main
Are you sure you want to change the base?
Add new settings for default dataset & job sort orders #3369
Conversation
790c29f
to
fa91adb
Compare
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]>
aea83b5
to
9bc23cd
Compare
Hi @Buckminsterfullerene02, for faster debugging, you can run the extension by pressing |
based off my current understanding of Jest, and not ran locally yet due to local set issues) Signed-off-by: Buckminsterfullerene02 <[email protected]>
Thank you so much Adam for the tip on the debugging, it's a life saver! Missed the info nugget in the docs. Working on the Jest tests now, I do still have some problems with my local setup, perhaps with some kind of misconfiguration, where every test in the project fails or has unknown result, and the errors are all claiming to be syntax errors but are definitely not correct. For example:
all the "failed" tests are for similar invalid reasons, which leads me to suspect Jest is somehow not configured to understand Typescript properly. But the tsconfig files seem to be correct, and clearly it must work for other people, so I really don't know what I am doing wrong here. Would appreciate some help because I'd like to work on some of the other issues (maybe a good first issue one to start off) too. If it would be any easier for a live chat, you know where to find me (on discord). Cheers! |
Are you trying to run a test in a specific package from the root of the repository? If you want to run tests for a specific file, you'll need to
|
Thanks traeok, this works :-) |
But need to create mock settings for other failing tests in Profiles.unit.tests.ts and other unit tests. Fix circular dependency. Signed-off-by: Buckminsterfullerene02 <[email protected]>
Signed-off-by: Buckminsterfullerene02 <[email protected]>
There are 2 failing tests in
Object.defineProperty(SettingsConfig, "getDirectValue", {
value: createGetConfigMock({
"zowe.ds.default.sort": Sorting.DatasetSortOpts.Name,
"zowe.jobs.default.sort": Sorting.JobSortOpts.Id,
}),
configurable: true,
}); Any help would be greatly appreciated. |
Signed-off-by: Buckminsterfullerene02 <[email protected]>
Signed-off-by: Buckminsterfullerene02 <[email protected]>
Which refreshes them with the new sort order setting. Signed-off-by: Buckminsterfullerene02 <[email protected]>
Todo:
|
packages/zowe-explorer/__tests__/__unit__/configuration/Profiles.unit.test.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Timothy Johnson <[email protected]> Signed-off-by: Buckminsterfullerene02 <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3369 +/- ##
==========================================
+ Coverage 93.18% 93.20% +0.01%
==========================================
Files 120 120
Lines 12486 12535 +49
Branches 2715 2849 +134
==========================================
+ Hits 11635 11683 +48
- Misses 850 851 +1
Partials 1 1 ☔ View full report in Codecov by Sentry. |
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:
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:
Changelog: Added two new settings,
zowe.ds.default.sort
andzowe.jobs.default.sort
, that allow you to change the default sorting order of datasets and jobs when you open them.Types of changes
Checklist
General
yarn workspace vscode-extension-for-zowe vscode:prepublish
pnpm --filter vscode-extension-for-zowe vscode:prepublish
Code coverage
Deployment
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 dopnpm 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?