-
Notifications
You must be signed in to change notification settings - Fork 28.7k
[web] Pass creation params to the platform view factory #128146
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
Conversation
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 wonder if this might be a breaking change if people have extends HtmlElementView
, I guess the customer tests will tell!
This is great, thanks for the PR!!
@@ -345,6 +345,7 @@ class HtmlElementView extends StatelessWidget { | |||
super.key, | |||
required this.viewType, | |||
this.onPlatformViewCreated, | |||
this.creationParams, |
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.
This new parameter needs a little bit of documentation on the docblock, because it's published here.
(Also, does the docblock represent how the widget works? the contents are a little bit weird)
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.
This new parameter needs a little bit of documentation on the docblock, because it's published here.
Do you have some ideas of what we can add to the docs?
(Also, does the docblock represent how the widget works? the contents are a little bit weird)
Not sure what you mean. What I'm trying to do in the docs is explain the connection between this and the view factory since that's the important part for users to understand. Everything else that happens inside this widget (e.g. the controller) is an implementation detail.
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.
Never mind, my rant is more about the documentation of the class HtmlElementView
, your documentation for the params object seems OK to me.
Looks like everything is green except Google testing. The failures seem to be related to app life cycle which has nothing to do with my changes. The roll hasn't happened in many days and that might be causing these failures. Speaking of |
May I ask if you will have problems using the lower version of HtmlElementView?Below ios13 system |
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.
flutter/engine#42255 seems to have already landed into the framework here: 39adf1b
This should be landable!
@iamzhibo The new parameter is optional, and this is web-only, I don't think this has anything to do with the version of iOS. What's your concern? |
flutter/flutter@95be76a...b0188cd 2023-06-15 [email protected] [web] Pass creation params to the platform view factory (flutter/flutter#128146) 2023-06-15 [email protected] [flutter_tools] cache flutter sdk version to disk (flutter/flutter#124558) 2023-06-14 [email protected] Fix inconsistently suffixed macOS flavored bundle directory (flutter/flutter#127997) 2023-06-14 [email protected] Update golden tests for material (flutter/flutter#128839) 2023-06-14 [email protected] Update getChildrenSummaryTree to handle Diagnosticable as input. (flutter/flutter#128833) 2023-06-14 [email protected] Improve the error message for non-normalized constraints (flutter/flutter#127906) 2023-06-14 [email protected] ContextAction.isEnabled needs a context (flutter/flutter#127721) 2023-06-14 [email protected] Remove temporary default case for PointerSignalKind (flutter/flutter#128900) 2023-06-14 [email protected] Respect allowlisted count of leaks. (flutter/flutter#128823) 2023-06-14 [email protected] Unpin flutter_plugin_android_lifecycle (flutter/flutter#128898) 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 Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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
This concludes step 1 of the
HtmlElementView
improvements. It's now possible to pass creation params to platform view factories directly fromHtmlElementView
.Here's a sample app using a single factory to render platform views in different colors:
Code sample
Depends on flutter/engine#42255
Part of #127030