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

[url_launcher] Add an inAppBrowserView mode in implementations #5211

Conversation

stuartmorgan
Copy link
Contributor

Implementation package portion of #5155

This adds:

  • Android support for the new inAppBrowserView launch mode which is distinct from inAppWebView, so that use cases that require programatic close can specifically request inAppWebView instead.
    • The default for web links is the new inAppBrowserView since that gives better results in most cases.
    • inAppBrowserView will still automatically fall back to inAppBrowserView in cases where it's not supported. (In the future, we might want to tune that based on feedback. We could instead have three modes: the webview-only mode we now have, the dynamic mode we now have iff the user requested platformDefault, and a new Android Custom Tabs-only if it was explicitly requested which would fail if it doesn't work.)
  • iOS support for treating inAppBrowserView as identical to inAppWebView, since in practice that's what its inAppWebView mode has always been.
  • Support on all platforms for the new supportsMode and supportsCloseForMode support query methods.

Fixes flutter/flutter#134208

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.

@stuartmorgan stuartmorgan added the federated: partial_changes PR that contains changes for only a single package of a federated plugin change label Oct 24, 2023
@stuartmorgan
Copy link
Contributor Author

(This is #5155 with the app-facing package reverted.)

Copy link
Member

@cbracken cbracken left a comment

Choose a reason for hiding this comment

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

LGTM stamp from a Japanese personal seal

@stuartmorgan stuartmorgan added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 24, 2023
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Oct 24, 2023
@auto-submit
Copy link
Contributor

auto-submit bot commented Oct 24, 2023

auto label is removed for flutter/packages/5211, due to - The status or check suite Linux_android custom_package_tests stable has failed. Please fix the issues identified (or deflake) before re-applying this label.

@stuartmorgan stuartmorgan added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 24, 2023
@auto-submit auto-submit bot merged commit a0ed435 into flutter:main Oct 24, 2023
70 checks passed
@stuartmorgan stuartmorgan deleted the url-launcher-in-app-browser-implementantions branch October 24, 2023 17:24
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 25, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Oct 25, 2023
flutter/packages@2faf992...f751ffb

2023-10-25 [email protected] [ci] Enable legacy Android emulator tests (flutter/packages#5190)
2023-10-25 49699333+dependabot[bot]@users.noreply.github.com Bump ossf/scorecard-action from 2.3.0 to 2.3.1 (flutter/packages#5209)
2023-10-25 [email protected] Replace gems dependency with ruby. (flutter/packages#5219)
2023-10-25 [email protected] Update the ftl hardware version. (flutter/packages#5224)
2023-10-25 [email protected] [ci] Disable Windows Arm64 stable CI (flutter/packages#5217)
2023-10-24 [email protected] [webview_flutter_wkwebview] Only set `limitsNavigationsToAppBoundDomains` when it is set to true (flutter/packages#5137)
2023-10-24 [email protected] [url_launcher] Add an `inAppBrowserView` mode (flutter/packages#5155)
2023-10-24 [email protected] [Android] Introduces API 34 emulators for subset of tests (flutter/packages#5105)
2023-10-24 [email protected] [url_launcher] Add an `inAppBrowserView` mode in implementations (flutter/packages#5211)
2023-10-24 [email protected] [ci] Fix legacy Android task names (flutter/packages#5191)
2023-10-24 [email protected] Update annotations deps to 1.7 (flutter/packages#4935)

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 [email protected],[email protected] 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://issues.skia.org/issues/new?component=1389291&template=1850622

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
…tter#5211)

Implementation package portion of flutter#5155

This adds:
- Android support for the new `inAppBrowserView` launch mode which is distinct from `inAppWebView`, so that use cases that require programatic close can specifically request `inAppWebView` instead.
  - The default for web links is the new `inAppBrowserView` since that gives better results in most cases.
  - `inAppBrowserView` will still automatically fall back to `inAppBrowserView` in cases where it's not supported. (In the future, we might want to tune that based on feedback. We could instead have three modes: the webview-only mode we now have, the dynamic mode we now have iff the user requested `platformDefault`, and a new Android Custom Tabs-only if it was explicitly requested which would fail if it doesn't work.)
- iOS support for treating `inAppBrowserView` as identical to `inAppWebView`, since in practice that's what its `inAppWebView` mode has always been.
- Support on all platforms for the new `supportsMode` and `supportsCloseForMode` support query methods.

Fixes flutter/flutter#134208
@reidbaker reidbaker mentioned this pull request Jan 12, 2024
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 federated: partial_changes PR that contains changes for only a single package of a federated plugin change p: url_launcher platform-android platform-ios platform-linux platform-macos platform-web platform-windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

closeInAppWebView() not implemented for Android Custom Tabs (url_launcher version 6.1.14)
2 participants