Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Bring HTML inputs into view automatically #3655

Merged
merged 8 commits into from
Mar 5, 2021

Conversation

blasten
Copy link

@blasten blasten commented Mar 2, 2021

Fixes flutter/flutter#75667

The inputs are hidden because InputAwareWebView manages focus within the webview. This extension was added to workaround edge cases with virtual displays, but those are solved in the hybrid composition implementation.

WebView doesn't have Junit tests, unfortunately. I think we should clean up webview, and add platform tests similar to how we did in ads.

Copy link
Contributor

@bparrishMines bparrishMines left a comment

Choose a reason for hiding this comment

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

LGTM

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.

WebView doesn't have Junit tests, unfortunately. I think we should clean up webview, and add platform tests similar to how we did in ads.

How hard is wiring up unit tests in Java? Obviously backfill is a major project, but can we add unit tests of just this piece now, so we're heading in the right direction?

@@ -109,6 +109,7 @@ class SurfaceAndroidWebView extends AndroidWebView {
layoutDirection: TextDirection.rtl,
creationParams: MethodChannelWebViewPlatform.creationParamsToMap(
creationParams,
usesHybridComposition: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

We should test that creating a SurfaceAndroidWebView sets this in the method channel to ensure the Dart side of this stays working.

Copy link
Author

Choose a reason for hiding this comment

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

I ended up adding an e2e test. :)

Copy link
Contributor

Choose a reason for hiding this comment

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

We still really need a unit test harness for this package, but I'll take it :)

@blasten blasten force-pushed the webview_input branch 2 times, most recently from 19be29c to d22a16f Compare March 4, 2021 01:04
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

@blasten blasten force-pushed the webview_input branch 4 times, most recently from 696ebe3 to cf56c57 Compare March 4, 2021 23:50
@blasten
Copy link
Author

blasten commented Mar 5, 2021

The failure in the CI doesn't make sense. The test is skipped, but somehow it appears to be running on iOS. I'm not sure how this is possible.

@blasten blasten merged commit fc1b17e into flutter:master Mar 5, 2021
@blasten blasten deleted the webview_input branch March 5, 2021 23:26
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 5, 2021
fluttergithubbot pushed a commit to flutter/flutter that referenced this pull request Mar 6, 2021
NickalasB added a commit to NickalasB/plugins that referenced this pull request Mar 8, 2021
* master:
  [google_sign_in] fix test(flutter#3690)
  [extension_google_sign_in_as_googleapis_auth] Update import (flutter#3689)
  [google_sign_in] Updates google_sign_in_platform_interfaces adding parametrized `clientId` (flutter#3686)
  Import flutter_test for future compatibility (flutter#3665)
  [ci] Disable analyze on stable for web plugins that contains null safety integration tests.  (flutter#3681)
  Bring HTML inputs into view automatically (flutter#3655)
  [in_app_purchase] presentCodeRedemptionSheet (flutter#3274)
  [google_maps_flutter_web] Downgrade mockito in example app. (flutter#3679)
  Update CI config for Flutter 2 (flutter#3674)
  [image_picker] fix flutter/flutter#71927 (flutter#3676)
  [google_maps_flutter_web] Move integration tests to example. (flutter#3675)
  [google_maps_flutter_web] Make google_maps_flutter_web work with latest plugins  (flutter#3673)

# Conflicts:
#	packages/webview_flutter/CHANGELOG.md
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes p: webview_flutter Edits files for a webview_flutter plugin platform-android
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Text field hidden behind keyboard
3 participants