-
Notifications
You must be signed in to change notification settings - Fork 6k
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
[web] Ensure Flutter adds a generator meta-tag. #55714
Conversation
Added it here, instead of flutter.js so we can have a proper test for the feature. |
@@ -229,6 +229,9 @@ Future<void> initializeEngineUi() async { | |||
RawKeyboard.initialize(onMacOs: ui_web.browser.operatingSystem == ui_web.OperatingSystem.macOs); | |||
KeyboardBinding.initInstance(); | |||
|
|||
// Ensures Flutter renders a global "generator" meta-tag. | |||
ensureMetaTag('generator', 'Flutter'); |
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.
Can we do this in flutter.js
so it's loaded asap?
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.
Oh, just saw your comment:
Added it here, instead of flutter.js so we can have a proper test for the feature.
I think we should add it to flutter.js
if it's the more appropriate place for it. For testing, I think we have a couple of flutter.js tests already that we can steal ideas from. Alternatively, we can write an integration test on the flutter/flutter side. We're merging repos soon anyway, so the disadvantages of cross-repo testing will go away.
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 agree that flutter.js
has the advantage of injecting the meta tag earlier, but I would like us to keep in mind that flutter.js
is optional (is this not the case anymore?). So we still need to ensureMetaTag
here to guarantee that the tag is always added.
If we want to add the meta tag in the absolute earliest moment, we could add it in index.html
. But again, we still need to do it in initializeEngineUi
as a backup.
@@ -229,6 +229,9 @@ Future<void> initializeEngineUi() async { | |||
RawKeyboard.initialize(onMacOs: ui_web.browser.operatingSystem == ui_web.OperatingSystem.macOs); | |||
KeyboardBinding.initInstance(); | |||
|
|||
// Ensures Flutter renders a global "generator" meta-tag. | |||
ensureMetaTag('generator', 'Flutter'); |
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 agree that flutter.js
has the advantage of injecting the meta tag earlier, but I would like us to keep in mind that flutter.js
is optional (is this not the case anymore?). So we still need to ensureMetaTag
here to guarantee that the tag is always added.
If we want to add the meta tag in the absolute earliest moment, we could add it in index.html
. But again, we still need to do it in initializeEngineUi
as a backup.
(Updating branch to re-test and autosubmit) |
auto label is removed for flutter/engine/55714, due to - The status or check suite Mac mac_host_engine has failed. Please fix the issues identified (or deflake) before re-applying this label. |
(This branch has no mac-related changes) |
…156745) flutter/engine@767be0a...cb51292 2024-10-14 [email protected] [web] Ensure Flutter adds a generator meta-tag. (flutter/engine#55714) 2024-10-14 [email protected] [Impeller] remove STB backend. (flutter/engine#55842) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-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
Adds a `meta name="generator" content="Flutter"` tag when the engine UI initializes. ## Issues Fixes flutter#156262 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Attempting to cp this, it's making some internal work harder. |
Adds a `meta name="generator" content="Flutter"` tag when the engine UI initializes. ## Issues Fixes flutter/flutter#156262 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Adds a
meta name="generator" content="Flutter"
tag when the engine UI initializes.Issues
Fixes flutter/flutter#156262
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.