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

Migrate injected client to package web #2306

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

Conversation

annagrin
Copy link
Contributor

@annagrin annagrin commented Dec 14, 2023

Migrate injected client code to package:web.

Closes: #2338

dwds/web/web_utils.dart Outdated Show resolved Hide resolved
dwds/web/web_utils.dart Outdated Show resolved Hide resolved
dwds/web/web_utils.dart Outdated Show resolved Hide resolved
dwds/web/web_utils.dart Outdated Show resolved Hide resolved
dwds/web/web_utils.dart Outdated Show resolved Hide resolved
dwds/web/web_utils.dart Outdated Show resolved Hide resolved
dwds/web/reloader/legacy_restarter.dart Show resolved Hide resolved
dwds/web/reloader/require_restarter.dart Show resolved Hide resolved
dwds/web/reloader/require_restarter.dart Outdated Show resolved Hide resolved
dwds/web/reloader/require_restarter.dart Outdated Show resolved Hide resolved
dwds/web/web_utils.dart Show resolved Hide resolved
@annagrin annagrin marked this pull request as draft December 16, 2023 01:55
@kevmoo
Copy link
Member

kevmoo commented Jan 9, 2024

looks like you need to align the pubspec w/ the changelog version

@annagrin annagrin marked this pull request as ready for review January 10, 2024 19:07
Copy link
Contributor

@srujzs srujzs left a comment

Choose a reason for hiding this comment

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

Changes look good! I have mostly nits.

dwds/web/client.dart Outdated Show resolved Hide resolved
dwds/web/reloader/require_restarter.dart Show resolved Hide resolved
dwds/web/reloader/require_restarter.dart Outdated Show resolved Hide resolved
dwds/web/reloader/require_restarter.dart Outdated Show resolved Hide resolved
dwds/CHANGELOG.md Outdated Show resolved Hide resolved
@annagrin annagrin requested a review from srujzs January 16, 2024 19:16
@annagrin
Copy link
Contributor Author

@srujzs I addressed all the comments and made sure the code works internally and externally. Appreciate another look!


extension SdkExtension on Sdk {
JSObject get dart => (this as JSObject)['dart'] as JSObject;
JSObject get developer => (this as JSObject)['developer'] as JSObject;
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I should've caught this when we were debugging together, but alternatively:

external JSObject get dart;
external JSObject get developer;
external JSObject get _extensions;

does the same thing. :)

@srujzs
Copy link
Contributor

srujzs commented Jan 24, 2024

One last nit, but LGTM! Thanks again for all your work here!

@annagrin
Copy link
Contributor Author

@srujzs Removed all uses of unsafe js interop:) Appreciate another look!

@srujzs
Copy link
Contributor

srujzs commented Jan 25, 2024

Woohoo, no more dart:js_interop_unsafe!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate injected client to package:web
5 participants