-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[google_maps] Prepares packages to endorse web. #4064
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[google_maps] Prepares packages to endorse web. #4064
Conversation
I thought of renaming the files midway through, and the commits ended up being a little bit sloppy. This is what an average "fix" of the core test looks like: 31d51ca Maps on the web need a little bit more scaffolding to render than on mobile, apparently. |
This mean that for each file that we have in |
This comment was marked as resolved.
This comment was marked as resolved.
All that would be needed to endorse the web package after landing this PR is something like this: |
We'll want to remember to update the web package's README to say it's endorsed when we do that. IIRC the tooling will let us do it in the same PR since it's not changing Dart code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm assuming there are no changes as part of the move, so these "new" files don't need review?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only changes there were added to make the map render in the web. The scaffolding around the map widgets in this test wasn't enough for the web implementation of the map to actually render.
packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_flutter_web.dart
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_inspector_web.dart
Outdated
Show resolved
Hide resolved
Thanks for the review @stuartmorgan!
Actually, I did some changes so the tests could run on the web. Highlights:
No I also moved this test from the core plugin to the platform interface package (it didn't make much sense in the core plugin.) |
QQ @stuartmorgan. Each |
b2f84b5
to
128f46d
Compare
Oh right, I forgot about that. I'm not worried about increasing flake since the tooling currently reruns a failing FTL run, so this would potentially help in that regard, but it does look like this just makes the test way slower overall, so we should recombine them for now. Maybe we can revisit once we have emulator tests, where I don't think we'll have to do that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM modulo recombining the tests.
packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart
Outdated
Show resolved
Hide resolved
// Caching this allows us to re-create the map faithfully when needed. | ||
MapConfiguration _lastMapConfiguration = const MapConfiguration(); | ||
List<gmaps.MapTypeStyle> _lastStyles = const <gmaps.MapTypeStyle>[]; | ||
|
||
/// Configuration accessor for integration tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, nit: missing period.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I push this? dart-archive/linter#3820 :P
Will recombine the tests and land this after CI is happy. Thanks! |
(Skip on the web)
* Make _map private again. * Pass a configurationProvider function to the inspector so it can look directly at the latest configuration.
128f46d
to
9cde458
Compare
I think the repo_checks is tripping by the lack of CHANGELOG in the gogle_maps_flutter package, but all the changes happened in google_maps/example/integration_test. (Added |
It's the run_test.sh script; that's not a standard thing so the tooling doesn't know to exclude it. Having a generically named script in the main package that's actually web-only isn't ideal; I didn't notice that before. We should rename and comment-document it in the second PR. |
flutter/packages@c85111c...95bb793 2023-05-31 ditman@gmail.com [google_maps] Prepares packages to endorse web. (flutter/packages#4064) 2023-05-30 ditman@gmail.com [google_sign_in] Clarifies canAccessScopes docs. (flutter/packages#4092) 2023-05-30 35989475+MeandNi@users.noreply.github.com [flutter_markdown] Unable to use MarkdownElementBuilder to act those tags without children. (flutter/packages#3952) 2023-05-30 49699333+dependabot[bot]@users.noreply.github.com [local_auth]: Bump androidx.fragment:fragment from 1.5.5 to 1.5.6 in /packages/local_auth/local_auth_android/android (flutter/packages#3553) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC flutter-ecosystem@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
I have a bunch of those scripts in several other packages, I'll rename them all, so they're all called (Maybe it's time to use the standard |
I ended up removing the bespoke scripts, here: #4129 (now they live in my (If anybody ever other than me needs them, we can figure out a way to bring them back more properly). |
Prepares the google_maps packages to endorse the Web platform:
[google_maps_flutter]
Changesexample/integration_test
to run in the web.[google_maps_flutter_platform_interface]
Adds a test coming from the core plugin to the unit tests of this package.[google_maps_flutter_web]
Changes to add an "inspector" object, and to conform with the tests in the core package.GoogleMapsInspectorPlatform
to allow integration tests to inspect parts of the internal state of a gmap.MapStyleException
when an invalid JSON is used insetMapStyle
(wasFormatException
previously), to conform with the expected behavior in the core plugin tests.Issues
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.