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

[google_map_flutter_ios] fix didBeginDraggingMarker typo #5085

Merged
merged 5 commits into from
Oct 10, 2023

Conversation

cyanglaz
Copy link
Contributor

@cyanglaz cyanglaz commented Oct 6, 2023

Fix the typo in didBeginDraggingMarker

The UITest will drag the marker then looking for the text indications that all the dragging callbacks are called, like the screenshot below:

Screenshot 2023-10-06 at 3 36 46 PM

fixes flutter/flutter#135778

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use dart format.)
  • I signed the CLA.
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
  • I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

fix

revert bundle id

remove test
Copy link
Contributor

@stuartmorgan stuartmorgan left a comment

Choose a reason for hiding this comment

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

LGTM with some minor comments. Thanks for all the new test code here! It's crazy that this works even without the key set up. I guess it does everything but draw?

@@ -1,3 +1,7 @@
## 2.3.2

* Fix an issue where the onDragEnd callback for marker is not called.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Fixes

(Per repo CHANGELOG style guide.)

isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
Copy link
Contributor

Choose a reason for hiding this comment

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


#import <XCTest/XCTest.h>

static const CGFloat kWaitTime = 15;
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be much longer (maybe 60), since Flutter policy is to not have timeouts in tests, to avoid flake. It's really inconvenient to have no timeouts with the XCUITest APIs, so a very long value is our best option.


#import <XCTest/XCTest.h>

static const CGFloat kWaitTime = 15;
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: This should be an NSTimeInterval rather than a CGFloat, since that conveys unit information.

@@ -80,13 +82,25 @@ class PlaceMarkerBodyState extends State<PlaceMarkerBody> {
Future<void> _onMarkerDrag(MarkerId markerId, LatLng newPosition) async {
setState(() {
markerPosition = newPosition;
if (!_onDragXcodeUITestHelperText.contains('\n_onMarkerDrag called')) {
// _onMarkerDrag can be called multiple times during a single drag.
// Only log n_onMarkerDrag once per dragging action to reduce noises in UI.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: n_ -> _ (looks like copypasta from the newline probably).

@cyanglaz
Copy link
Contributor Author

cyanglaz commented Oct 7, 2023

I guess it does everything but draw?

Yes it probably does everything but draw. We could possibly add more XCUITests.

isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ENABLE_MODULES = YES;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need this to import the google maps module.

@cyanglaz
Copy link
Contributor Author

cyanglaz commented Oct 7, 2023

Updated the project.pbxproj file, @stuartmorgan Could you please double check to see if I'm missing anything?

(I also added a failure in the UITest to make sure the CI picked up the test and fail, I will revert that change before landing)

Copy link
Contributor

@stuartmorgan stuartmorgan left a comment

Choose a reason for hiding this comment

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

LGTM. There may be a couple more build properties that could be removed, but it's a short enough list at this point that it's fine if it's not absolutely minimal.

@cyanglaz
Copy link
Contributor Author

The test failed so the ci did pick up the test. Reverting the intentional code that made the test fail and landing when green.

@cyanglaz cyanglaz added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 10, 2023
@auto-submit auto-submit bot merged commit 158ec1f into flutter:main Oct 10, 2023
70 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 10, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Oct 10, 2023
flutter/packages@7de08ec...4b483f2

2023-10-10 15619084+vashworth@users.noreply.github.com Run tests on either macOS 12 or macOS 13 (flutter/packages#5089)
2023-10-10 ychris@google.com [google_map_flutter_ios] fix `didBeginDraggingMarker` typo (flutter/packages#5085)
2023-10-09 stuartmorgan@google.com [process] Import the `process` package (flutter/packages#5095)
2023-10-09 hrkadam.92@gmail.com [go_router] Fixes missing state.extra in onException() (flutter/packages#5077)
2023-10-09 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 2.22.0 to 2.22.1 (flutter/packages#5094)
2023-10-09 engine-flutter-autoroll@skia.org Roll Flutter from 5207a30 to f52fe4f (18 revisions) (flutter/packages#5093)
2023-10-09 chrislangham@rightnow.org [platform] Example app for platform (flutter/packages#4834)
2023-10-09 49699333+dependabot[bot]@users.noreply.github.com Bump ossf/scorecard-action from 2.2.0 to 2.3.0 (flutter/packages#5091)

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
@cyanglaz cyanglaz deleted the google_map_wrong_api branch October 10, 2023 16:17
Mairramer pushed a commit to Mairramer/flutter that referenced this pull request Oct 10, 2023
flutter/packages@7de08ec...4b483f2

2023-10-10 15619084+vashworth@users.noreply.github.com Run tests on either macOS 12 or macOS 13 (flutter/packages#5089)
2023-10-10 ychris@google.com [google_map_flutter_ios] fix `didBeginDraggingMarker` typo (flutter/packages#5085)
2023-10-09 stuartmorgan@google.com [process] Import the `process` package (flutter/packages#5095)
2023-10-09 hrkadam.92@gmail.com [go_router] Fixes missing state.extra in onException() (flutter/packages#5077)
2023-10-09 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 2.22.0 to 2.22.1 (flutter/packages#5094)
2023-10-09 engine-flutter-autoroll@skia.org Roll Flutter from 5207a30 to f52fe4f (18 revisions) (flutter/packages#5093)
2023-10-09 chrislangham@rightnow.org [platform] Example app for platform (flutter/packages#4834)
2023-10-09 49699333+dependabot[bot]@users.noreply.github.com Bump ossf/scorecard-action from 2.2.0 to 2.3.0 (flutter/packages#5091)

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
HugoOlthof pushed a commit to moneybird/packages that referenced this pull request Dec 13, 2023
)

Fix the typo in `didBeginDraggingMarker`

The UITest will drag the marker then looking for the text indications that all the dragging callbacks are called, like the screenshot below:

<img width="388" alt="Screenshot 2023-10-06 at 3 36 46 PM" src="https://github.com/flutter/packages/assets/3756895/d9e78c99-bb1d-4f47-a0d4-2f699fa9f743">

fixes flutter/flutter#135778
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App p: google_maps_flutter platform-ios
Projects
None yet
Development

Successfully merging this pull request may close these issues.

onDragStart not firing for Markers for IOS Maps SDK
2 participants