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

Allow users to open data sets and USS files in another codepage #2594

Merged
merged 3 commits into from
Jan 3, 2024

Conversation

t1m0thyj
Copy link
Member

@t1m0thyj t1m0thyj commented Nov 27, 2023

Proposed changes

⚠️ This PR depends on #2634 - merge that one first, then update base branch of this PR

How to Test

  • Test opening data set & USS file in default EBCDIC encoding
  • Test opening data set & USS file in binary mode
  • Test opening data set & USS file in custom encoding
    • In same session, close and re-open them - custom encoding should be remembered
    • Test with encoding in z/OSMF profile - custom encoding should take precedence
  • Test saving USS file tagged as ISO8859-1 - USS tag should not change

Release Notes

Milestone: 2.14.0

Changelog:

  • Added "Open with Encoding" feature to open data sets and USS files in a non-standard codepage.
  • Fixed issue where USS file tag could get overwritten when changes to file are uploaded.

Types of changes

What types of changes does your code introduce to Zowe Explorer?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Updates to Documentation or Tests (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This checklist will be used as reference for both the contributor and the reviewer

  • I have read the CONTRIBUTOR GUIDANCE wiki
  • PR title follows Conventional Commits Guidelines
  • PR Description is included
  • gif or screenshot is included if visual changes are made
  • yarn workspace vscode-extension-for-zowe vscode:prepublish has been executed
  • All checks have passed (DCO, Jenkins and Code Coverage)
  • I have added unit test and it is passing
  • I have added integration test and it is passing
  • There is coverage for the code that I have added
  • I have tested it manually and there are no regressions found
  • I have added necessary documentation (if appropriate)
  • Any PR dependencies have been merged and published (if appropriate)

Further comments

image
ze-encoding.mp4

@adam-wolfe
Copy link
Contributor

Think this also resolves #887.

@t1m0thyj t1m0thyj added this to the v2.14.0 milestone Dec 1, 2023
Copy link
Member

@traeok traeok left a comment

Choose a reason for hiding this comment

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

Thanks @t1m0thyj for this work on enhancing encoding support 😋
Just left a couple comments on the localized strings and the openPS function:

packages/zowe-explorer/src/dataset/actions.ts Outdated Show resolved Hide resolved
packages/zowe-explorer/src/shared/utils.ts Outdated Show resolved Hide resolved
packages/zowe-explorer/src/uss/utils.ts Outdated Show resolved Hide resolved
packages/zowe-explorer/src/shared/context.ts Outdated Show resolved Hide resolved
Copy link

codecov bot commented Dec 14, 2023

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (a8e1155) 93.15% compared to head (f1130e7) 93.24%.

Files Patch % Lines
packages/zowe-explorer/src/shared/actions.ts 0.00% 3 Missing ⚠️
packages/zowe-explorer/src/shared/utils.ts 95.00% 3 Missing ⚠️
packages/zowe-explorer/src/uss/actions.ts 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2594      +/-   ##
==========================================
+ Coverage   93.15%   93.24%   +0.09%     
==========================================
  Files         101      102       +1     
  Lines       10323    10471     +148     
  Branches     2183     2237      +54     
==========================================
+ Hits         9616     9764     +148     
  Misses        706      706              
  Partials        1        1              

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

@t1m0thyj t1m0thyj linked an issue Dec 16, 2023 that may be closed by this pull request
@t1m0thyj t1m0thyj marked this pull request as ready for review December 19, 2023 21:55
@t1m0thyj t1m0thyj changed the base branch from main to fix/refactor-node-constructors December 20, 2023 21:39
@t1m0thyj
Copy link
Member Author

Moved most of the refactoring into a separate PR (#2634) to hopefully make the encoding changes easier to review

awharn
awharn previously approved these changes Dec 21, 2023
Copy link
Member

@awharn awharn left a comment

Choose a reason for hiding this comment

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

This looks good to me! Tested with a dataset using a double byte encoding, and it works great! Only comment is that creating a profile or team config is starting to get a bit long via the UI, with a bunch of questions around encoding, certificates, APIML base path, port, protocol, scheme, timeouts, etc. Nothing against this PR, just an observation.

traeok
traeok previously approved these changes Dec 21, 2023
Copy link
Member

@traeok traeok left a comment

Choose a reason for hiding this comment

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

This implementation looks and works great! Thanks @t1m0thyj for this feature, I like the UX as well 😁

One thing that might be worth looking into is offering the "Open with Encoding" command in the Command Palette - it might involve some adjustments to the command itself, but would be a nice shortcut so users can quickly change the encoding of the active editor 😅

@t1m0thyj t1m0thyj self-assigned this Dec 26, 2023
zFernand0
zFernand0 previously approved these changes Jan 2, 2024
JillieBeanSim
JillieBeanSim previously approved these changes Jan 3, 2024
Copy link
Contributor

@JillieBeanSim JillieBeanSim left a comment

Choose a reason for hiding this comment

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

works great! thanks @t1m0thyj

Base automatically changed from fix/refactor-node-constructors to main January 3, 2024 18:44
@JillieBeanSim JillieBeanSim dismissed stale reviews from zFernand0, traeok, awharn, and themself January 3, 2024 18:44

The base branch was changed.

Copy link

sonarcloud bot commented Jan 3, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

5 New issues
0 Security Hotspots
No data about Coverage
0.6% Duplication on New Code

See analysis details on SonarCloud

@zFernand0 zFernand0 merged commit f796e0f into main Jan 3, 2024
24 of 25 checks passed
@zFernand0 zFernand0 deleted the feat/open-with-encoding branch January 3, 2024 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Closed
6 participants