Skip to content

Conversation

@ditman
Copy link
Member

@ditman ditman commented Nov 4, 2022

Change

This PR updates the dashboard's web/index.html to:

  • Use flutter.js to embed flutter (as described here).
  • Use the canvasKitBaseUrl config option to load the locally distributed canvaskit, rather than the version from the external CDN.

Note

Once this flutter/engine PR lands, the dashboard will start to warn (in development) about flutterConfiguration being deprecated. The fix is to pass the configuration object to the initializeEngine call, like so (feel free to reach out to me for any assistance!):

  engineInitializer.initializeEngine({
    canvasKitBaseUrl: "/canvaskit/",
  }).then(function (appRunner) {
    appRunner.runApp();
  });

(This also updates the pubspec.lock with whatever was generated last in my machine)

Fixes

  • (Internal security audit)

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 the Flutter Style Guide recently, and have followed its advice.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • 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.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@ditman ditman self-assigned this Nov 4, 2022
@ditman
Copy link
Member Author

ditman commented Nov 4, 2022

@CaseyHillers any reason why you are not using the Flutter Service Worker in this app? Is it caching too much? Too little? The index.html was too old? :P

@CaseyHillers
Copy link
Contributor

@CaseyHillers any reason why you are not using the Flutter Service Worker in this app? Is it caching too much? Too little? The index.html was too old? :P

This was generated before Flutter web was in beta, feel free to regenerate it to the latest template.

Comment what the `canvasKitBaseUrl` variable does.
@ditman
Copy link
Member Author

ditman commented Nov 4, 2022

This was generated before Flutter web was in beta, feel free to regenerate it to the latest template.

Good to know! It's not very needed for this app (makes no sense in offline mode), but it might be worth revisiting later!

@ditman ditman added the autosubmit Merge PR when tree becomes green via auto submit App. label Nov 4, 2022
@auto-submit auto-submit bot merged commit 41ae11f into flutter:main Nov 4, 2022
@ditman ditman deleted the dashboard-use-local-canvaskit branch November 4, 2022 22:12
@godofredoc
Copy link
Contributor

Started a deployment of the flutter-dashboard.

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants