Repository navigation
Conversation
|
Staged preview of the updated docs.flutter.dev site (updated for commit 3003bc0): https://flutter-docs-prod--docs-pr13997-add-web-paragraph-docs-nw657zr8.web.app |
|
/gcbrun |
|
Can you resolve the conflicts, @mdebbar? |
|
@mdebbar, now that the 3.50 release is live, can we address this? |
|
I just linked the video bits to the open issue. Until this has shipped as stable, I don't think we should document it. |
# Conflicts: # sites/docs/src/content/platform-integration/web/initialization.md
There was a problem hiding this comment.
Code Review
This pull request introduces documentation for WebParagraph, an experimental browser-native text layout engine for Flutter web. It adds a new guide explaining WebParagraph's benefits, requirements, and setup, and updates the initialization table and sidebar navigation accordingly. The review feedback suggests a correction in the requirements section to clarify that setting 'renderer: canvaskit' forces the CanvasKit renderer rather than specifically selecting the JavaScript build, as WebAssembly builds can also use CanvasKit.
| Renderer | ||
| : WebParagraph runs on the CanvasKit renderer, which is used by | ||
| JavaScript builds of your app. | ||
| The Skwasm renderer used by WebAssembly builds doesn't support WebParagraph. | ||
| If you build with `--wasm`, set `renderer: 'canvaskit'` in your | ||
| Flutter configuration so the loader picks the JavaScript build. |
There was a problem hiding this comment.
Setting renderer: 'canvaskit' forces the loader to use the CanvasKit renderer, but it does not force the loader to fall back to the JavaScript build (dart2js). WebAssembly builds (dart2wasm) can also run using the CanvasKit renderer.
To avoid confusing readers about how the loader selects the compilation target versus the renderer, we should clarify that this flag forces the CanvasKit renderer rather than picking the JavaScript build.
| Renderer | |
| : WebParagraph runs on the CanvasKit renderer, which is used by | |
| JavaScript builds of your app. | |
| The Skwasm renderer used by WebAssembly builds doesn't support WebParagraph. | |
| If you build with `--wasm`, set `renderer: 'canvaskit'` in your | |
| Flutter configuration so the loader picks the JavaScript build. | |
| Renderer | |
| : WebParagraph runs on the CanvasKit renderer. | |
| The Skwasm renderer (the default for WebAssembly builds) doesn't support WebParagraph. | |
| If you build with `--wasm`, set `renderer: 'canvaskit'` in your | |
| Flutter configuration to use the CanvasKit renderer instead of Skwasm. |
Adds a page for WebParagraph, the experimental text layout implementation for Flutter web that uses the browser's Enhanced Canvas TextMetrics API instead of the text stack bundled in CanvasKit.
The page covers what WebParagraph is, the requirements (CanvasKit renderer, Chromium with the experimental web platform features flag), how to enable it with
preferWebParagraph: trueinflutter_bootstrap.js, and how to verify that it's active. I also addedpreferWebParagraphto the config table in the initialization page and a sidenav entry.Keeping this as a draft until the next stable release that contains all the necessary bits.
Part of flutter/flutter#172561