Thanks to visit codestin.com
Credit goes to github.com

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

[webview_flutter] Add an option to set the background color of the webview#3431

Merged
fluttergithubbot merged 30 commits intoflutter:masterfrom
e-adrien:webview-transparent-background
Dec 7, 2021
Merged

[webview_flutter] Add an option to set the background color of the webview#3431
fluttergithubbot merged 30 commits intoflutter:masterfrom
e-adrien:webview-transparent-background

Conversation

@e-adrien
Copy link
Contributor

This PR add an option to set a transparent background for the webview.

There are already 2 outdated PR for the same feature :

I took the previous PR made by @crizant and rebase it.

It fixes this issue :

@e-adrien e-adrien requested a review from amirh as a code owner January 15, 2021 11:30
@google-cla google-cla bot added the cla: yes label Jan 15, 2021
@stuartmorgan-g stuartmorgan-g added the p: webview_flutter Edits files for a webview_flutter plugin label Jan 29, 2021
@fundup
Copy link

fundup commented Feb 12, 2021

So close to have this feature ... waiting for month as others !!! Hope this merge will be accepted and in the next Webview version !

@crizant
Copy link

crizant commented Mar 10, 2021

There are conflicts, seems @e-adrien you need to rebase again. 🤪

@e-adrien
Copy link
Contributor Author

@crizant done 😄 I'll try to rebase it more regularly 😅
Thank you for your original PR by the way.

@davedbase
Copy link

Very excited to have this merged in and available. The overlay/opacity hacks are quite annoying. Also thanks @crizant and @e-adrien for your effort on this.

@brenoasm
Copy link

Any updates?

@stuartmorgan-g
Copy link
Contributor

I made the change. The test runs fine on my laptop but I can't find its execution results in Cirrus CI logs. Did I miss something ?

We can't currently run the Android integration tests for PRs from non-contributors in presubmit, unfortunately.

It sounds like this is ready for another review round then? We're currently doing a significant restructuring of the webview plugin implementation (moving the platform channel boundary much closer to the OS API), so I'll hold off for the moment, but once that's complete we can move forward with this. Since the tests here are integration tests, I don't expect there to actually be much impact on the PR, just some adjustment to the _android and _wkwebview implementation details.

@e-adrien
Copy link
Contributor Author

We can't currently run the Android integration tests for PRs from non-contributors in presubmit, unfortunately.

Okay, no problem. It was just to be sure that I didn't do something wrong.

It sounds like this is ready for another review round then? We're currently doing a significant restructuring of the webview plugin implementation (moving the platform channel boundary much closer to the OS API), so I'll hold off for the moment, but once that's complete we can move forward with this. Since the tests here are integration tests, I don't expect there to actually be much impact on the PR, just some adjustment to the _android and _wkwebview implementation details.

No problem. I'll check this PR once a week to see if it needs rebasing until we can move forward.

@stuartmorgan-g
Copy link
Contributor

I pushed a merge that should update the PR for the new Dart-based Android implementation (feel free to replace with a rebase instead if that's your preferred workflow).

Copy link
Contributor

@stuartmorgan-g stuartmorgan-g left a comment

Choose a reason for hiding this comment

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

I think this is pretty much good to go, other than needing a test of the change to the method channel in the platform interface package, and of the background color parameter in the app-facing package. Both should be simple Dart tests that the values are passed through to the next layer as expected.

If you split out the platform interface change now (with that test added), and we can start getting this incrementally reviewed and landed.

@stuartmorgan-g
Copy link
Contributor

FYI the analyzer issue you are hitting is unrelated to your change; I just landed a fix for it.

@stuartmorgan-g
Copy link
Contributor

The individual components have all landed (the Android implementation will auto-publish once the post-submit tests finish), so this can now be reduced down to just the webview_flutter package changes, and a simple test added here, and it should be good to go!

@e-adrien
Copy link
Contributor Author

e-adrien commented Dec 6, 2021

The individual components have all landed (the Android implementation will auto-publish once the post-submit tests finish), so this can now be reduced down to just the webview_flutter package changes, and a simple test added here, and it should be good to go!

Thanks. I will open a PR when the android package will be published.

@stuartmorgan-g
Copy link
Contributor

There are infrastructure issues that caused #4584 not to land correctly, and are currently preventing the creation of new PRs that land correctly; while we get that resolved I've updated this PR to match #4584 so that we get it landed.

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 waiting for tree to go green (Use "autosubmit") This PR is approved and tested, but waiting for the tree to be green to land.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants