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

Refactor of webview code #2489

Merged
merged 9 commits into from
Oct 2, 2023
Merged

Refactor of webview code #2489

merged 9 commits into from
Oct 2, 2023

Conversation

rudyflores
Copy link
Contributor

@rudyflores rudyflores commented Sep 28, 2023

Proposed changes

Refactor of existing Webview code to be easily extensible, this also integrates a watcher that will hot reload your changes on your webview to the debugger so you can see your changes just by saving!

To add new views in the future just:

  1. add new folder with webview name to zowe-explorer/src/webviews/src.
  2. add the following components: index.html, app.tsx, index.tsx, types.ts (optional)

And that's it!

Release Notes

Milestone: 2.12.0

Changelog: Added new method of creating webviews on Zowe Explorer

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

Signed-off-by: Rudy Flores <[email protected]>
@rudyflores rudyflores self-assigned this Sep 28, 2023
@codecov
Copy link

codecov bot commented Sep 28, 2023

Codecov Report

All modified lines are covered by tests ✅

Files Coverage Δ
...ackages/zowe-explorer-api/src/vscode/ui/WebView.ts 96.55% <100.00%> (+0.12%) ⬆️

📢 Thoughts on this report? Let us know!.

Signed-off-by: Rudy Flores <[email protected]>
@rudyflores rudyflores added the no-changelog Add to PR's that don't require a CHANGELOG update label Sep 29, 2023
@rudyflores rudyflores marked this pull request as ready for review September 29, 2023 17:33
@rudyflores
Copy link
Contributor Author

rudyflores commented Sep 29, 2023

FYI: the code smell is from existing App.tsx work from @traeok 's work on editing attributes, this can be perhaps be addressed in a separate PR since the code in that file could be restructured into components in the future.

@rudyflores rudyflores requested a review from awharn October 2, 2023 14:13
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.

LGTM, thanks @rudyflores!

awharn
awharn previously approved these changes Oct 2, 2023
@traeok traeok self-requested a review October 2, 2023 14:44
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.

Sorry for the sudden change in review @rudyflores. I was under the impression that the dev host was showing the latest changes, but the watch script seems to be failing for me:

image

zFernand0
zFernand0 previously approved these changes Oct 2, 2023
@rudyflores rudyflores dismissed stale reviews from awharn and zFernand0 via 5b4cd3f October 2, 2023 16:26
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 2, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@rudyflores
Copy link
Contributor Author

All fixed now @traeok good catch on the windows end of things for concurrently!

@zFernand0 zFernand0 merged commit 3a64b9f into main Oct 2, 2023
26 checks passed
@zFernand0 zFernand0 deleted the refactor-webviews branch October 2, 2023 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog Add to PR's that don't require a CHANGELOG update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants