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

[HybridWebView] Refactor and convert the HybridWebView.js file into a TypeScript file #27183

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mattleibow
Copy link
Member

@mattleibow mattleibow commented Jan 16, 2025

Description of Change

This PR forms part of the effort to make the JS file injected into the app at runtime like the way Blazor works: #24730. However, this PR does not inject anything at this point, just compiles the TS file to JS as part of the build.

This PR only changes a few things:

  • Convert the JS file into TypeScript
  • Move the JS file into the Core project structure so it is not just a sample resource but part of the maui source
  • Link the output into the sample/test apps

Issues Fixed

Related to #24730

@mattleibow mattleibow requested a review from a team as a code owner January 16, 2025 14:44
@mattleibow mattleibow requested review from PureWeen and jsuarezruiz and removed request for a team January 16, 2025 14:44
@mattleibow mattleibow added the area-controls-hybridwebview HybridWebView control label Jan 16, 2025
@mattleibow mattleibow requested a review from Eilon January 16, 2025 14:45
@mattleibow mattleibow force-pushed the dev/hybridwebview-embedded branch 2 times, most recently from bc3d0eb to b4ff555 Compare January 16, 2025 19:04
@mattleibow mattleibow changed the title Embed the HybridWebView.js into the dll Refactor and convert the HybridWebView.js file into a TypeScript file Jan 16, 2025
@mattleibow
Copy link
Member Author

@MackinnonBuck I hear you are a super TS guru so I was wondering if you had some time to review this refactored code and let me know where I have done off the rails.

@mattleibow mattleibow marked this pull request as draft January 16, 2025 19:25
@mattleibow mattleibow force-pushed the dev/hybridwebview-embedded branch 3 times, most recently from 45919c9 to cfa5963 Compare January 16, 2025 20:03
@mattleibow mattleibow changed the title Refactor and convert the HybridWebView.js file into a TypeScript file [HybridWebView] Refactor and convert the HybridWebView.js file into a TypeScript file Jan 16, 2025
@mattleibow mattleibow force-pushed the dev/hybridwebview-js-exceptions branch from 5b4193f to 1e26742 Compare January 17, 2025 18:01
@mattleibow mattleibow force-pushed the dev/hybridwebview-embedded branch from cfa5963 to e125fd3 Compare January 17, 2025 18:08
@mattleibow mattleibow force-pushed the dev/hybridwebview-embedded branch from e125fd3 to 3a008dc Compare January 17, 2025 18:36
@mattleibow mattleibow marked this pull request as ready for review January 17, 2025 18:36
@mattleibow mattleibow changed the base branch from dev/hybridwebview-js-exceptions to main January 17, 2025 18:36
Copy link
Member

@MackinnonBuck MackinnonBuck left a comment

Choose a reason for hiding this comment

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

The TS changes look good to me :) Just a few small comments.

src/Core/src/Handlers/HybridWebView/HybridWebView.ts Outdated Show resolved Hide resolved
src/Core/src/Handlers/HybridWebView/HybridWebView.ts Outdated Show resolved Hide resolved
src/Core/src/Handlers/HybridWebView/HybridWebView.ts Outdated Show resolved Hide resolved
@mattleibow
Copy link
Member Author

Thanks for the review!

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

Successfully merging this pull request may close these issues.

2 participants