Skip to content

Commit

Permalink
[sync] 2024/08/03 (#1471)
Browse files Browse the repository at this point in the history
  • Loading branch information
AmosHuKe authored Aug 5, 2024
2 parents b57093b + 2b9f5cf commit 32aa206
Show file tree
Hide file tree
Showing 238 changed files with 7,530 additions and 6,266 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
submodules: recursive
- name: Enable Corepack
run: corepack enable
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'
Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
submodules: recursive
- name: Enable Corepack
run: corepack enable
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
submodules: recursive
- name: Enable Corepack
run: corepack enable
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'
Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ following the instructions in [Get the prerequisites](#get-the-prerequisites).
dart pub get
```

3. Install `pnpm`, an alternative, efficient package manager for
3. (optional - We highly recommend you use `pnpm`, but you can also use `npm`.)
Install `pnpm`, an alternative, efficient package manager for
npm packages. If you already have `pnpm`, verify you have the
latest stable version.

Expand Down Expand Up @@ -219,7 +220,7 @@ following the instructions in [Get the prerequisites](#get-the-prerequisites).
To install [`pnpm`][] without using `corepack`, you
can use your preferred [installation method][pnpm-install].

4. Once you have `pnpm` installed and setup,
5. (optional) Once you have `pnpm` installed and setup,
fetch the site's npm dependencies using `pnpm install`.
We highly recommend you use `pnpm`, but you can also use `npm`.

Expand All @@ -231,14 +232,14 @@ following the instructions in [Get the prerequisites](#get-the-prerequisites).
latest changes to the `main` branch or if you
experience dependency or import errors when building the site.

5. From the root directory, run the `dash_site` tool to
6. From the root directory, run the `dash_site` tool to
validate your setup and learn about the available commands.

```console
./dash_site --help
```

6. From the root directory, serve the site locally.
7. From the root directory, serve the site locally.

```console
./dash_site serve
Expand All @@ -247,21 +248,21 @@ following the instructions in [Get the prerequisites](#get-the-prerequisites).
This command generates and serves the site on a
local port that's printed to your terminal.

7. View your changes in the browser by navigating to <http://localhost:4000>.
8. View your changes in the browser by navigating to <http://localhost:4000>.

Note the port might be different if `4000` is taken.

If you want to check the raw, generated HTML output and structure,
view the `_site` directory in a file explorer or an IDE.

8. Make your changes to the local repo.
9. Make your changes to the local repo.

The site should automatically rebuild on most changes, but if
something doesn't update, exit the process and rerun the command.
Improvements to this functionality are planned.
Please open a new issue to track the issue if this occurs.

9. Commit your changes to the branch and submit your PR.
10. Commit your changes to the branch and submit your PR.

If your change is large, or you'd like to test it,
consider [validating your changes](#validate-your-changes).
Expand Down
2 changes: 1 addition & 1 deletion examples/codelabs
2 changes: 1 addition & 1 deletion examples/cookbook/effects/drag_a_widget/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const List<Item> _items = [
totalPriceCents: 1299,
uid: '1',
imageProvider: NetworkImage('https://docs.flutter.dev'
'cookbook/img-files/effects/split-check/Food1.jpg'),
'/cookbook/img-files/effects/split-check/Food1.jpg'),
),
Item(
name: 'Veggie Delight',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ class TogetherWidget extends StatelessWidget {
// return widget on Android.
case TargetPlatform.iOS:
// return widget on iOS.
case TargetPlatform.macOS:
// return widget on macOS.
default:
throw UnsupportedError('Unsupported platform view');
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// ignore_for_file: unused_local_variable

// #docregion import
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';
// #enddocregion import
import 'package:flutter/widgets.dart';

class MacOSCompositionWidget extends StatelessWidget {
const MacOSCompositionWidget({super.key});

@override
// #docregion macos-composition
Widget build(BuildContext context) {
// This is used in the platform side to register the view.
const String viewType = '<platform-view-type>';
// Pass parameters to the platform side.
final Map<String, dynamic> creationParams = <String, dynamic>{};

return AppKitView(
viewType: viewType,
layoutDirection: TextDirection.ltr,
creationParams: creationParams,
creationParamsCodec: const StandardMessageCodec(),
);
}
// #enddocregion macos-composition
}

class TogetherWidget extends StatelessWidget {
const TogetherWidget({super.key});

@override
// #docregion together-widget
Widget build(BuildContext context) {
// This is used in the platform side to register the view.
const String viewType = '<platform-view-type>';
// Pass parameters to the platform side.
final Map<String, dynamic> creationParams = <String, dynamic>{};

switch (defaultTargetPlatform) {
case TargetPlatform.android:
// return widget on Android.
case TargetPlatform.iOS:
// return widget on iOS.
case TargetPlatform.macOS:
// return widget on macOS.
default:
throw UnsupportedError('Unsupported platform view');
}
}
// #enddocregion together-widget
}
6 changes: 4 additions & 2 deletions firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
{ "source": "/intellij-ide", "destination": "/tools/android-studio", "type": 301 },
{ "source": "/intellij-setup", "destination": "/get-started/editor", "type": 301 },
{ "source": "/ios-release", "destination": "/deployment/ios", "type": 301 },
{ "source": "/jobs/**", "destination": "/jobs", "type": 301 },
{ "source": "/json", "destination": "/data-and-backend/serialization/json", "type": 301 },
{ "source": "/ui/media", "destination": "/ui/assets", "type": 301 },
{ "source": "/ui/media/:rest*", "destination": "/ui/assets/:rest*", "type": 301 },
Expand Down Expand Up @@ -301,6 +300,7 @@
{ "source": "/go/custom-colors-m3", "destination": "https://docs.google.com/document/d/1LbD4JqBgAfHex02oR3r2jyu9lTBBNBmyec2ovT59Kr8/edit?usp=sharing", "type": 301 },
{ "source": "/go/custom-tabs-support", "destination": "https://docs.google.com/document/d/1GvsmPQz6aKixNUphL10XmSOL7M6nOH7W1jYwNp0LwnA", "type": 301 },
{ "source": "/go/dart-flutterbuffers", "destination": "https://docs.google.com/document/d/1rqKq6DwqaeBfTLTixxurrdT9HwZ02DyRjFigO9SiB1Q/edit#", "type": 301 },
{ "source": "/go/dart-patterns", "destination": "https://docs.google.com/document/d/1p6JV-pvr8_45qI5fumv6Ir60wEeagKCceTngYOXt_U4/edit?usp=sharing&resourcekey=0-jGJyRsTPSIpGPN0xgvzSwg", "type": 301 },
{ "source": "/go/dart-static-analysis-ir", "destination": "https://docs.google.com/document/d/1xJYGBSoXL7h1z43NnjFsXxauQGXvUnacef4XR1zmeGA/edit#", "type": 301 },
{ "source": "/go/dart-tooling-daemon", "destination": "https://docs.google.com/document/d/1Qldlyi2TmzTsDN1AS5AfjE93-A2nR296Np5bZW2aBwU/edit?usp=sharing&resourcekey=0-ckijCX_-ZSy-J_KBI-FQ1Q", "type": 301 },
{ "source": "/go/dart-workspace-support", "destination": "https://docs.google.com/document/d/1_SfTg0W8PASZ2neTkNhYjcVDdFvomeoAnZ_XqflIx88/edit?usp=sharing&resourcekey=0-dcmTZFHicV9ZZL863zC5-w", "type": 301 },
Expand Down Expand Up @@ -438,6 +438,7 @@
{ "source": "/go/image-decoding-registry", "destination": "https://docs.google.com/document/d/167qWrlaSAmJm5muqQ-iiJKZy6Q7ZlugIeXmraXava5Y/edit?resourcekey=0-mVrr_zBiSI2Qmd6vqae7Bw", "type": 301 },
{ "source": "/go/impeller-dart", "destination": "https://docs.google.com/document/d/1Sh1BAC5c_kkuMVreo7ymBzPoMzb7lamZRPsI7GBXv5M/edit?resourcekey=0-5w8u2V-LS41tCHeoE8bDTQ", "type": 301 },
{ "source": "/go/impeller-geometry", "destination": "https://docs.google.com/document/d/1t-dzzi04nCdkIReoJp8ZyGNskqIip1TG3WhGEz7Osd8/edit?usp=sharing", "type": 301 },
{ "source": "/go/implicit-animations", "destination": "https://docs.google.com/document/d/1-gUqKiHf6w_eck1rZqYjQk0MMPOIlYjZtYu1zjsDLPA/edit?usp=sharing", "type": 301 },
{ "source": "/go/infinite-scroll", "destination": "https://docs.google.com/document/d/1TV2oF2iLIZtGd48336korxMTQrGizDAASAeZAeteMSc/edit?usp=sharing", "type": 301 },
{ "source": "/go/inheritedwidget-subscription", "destination": "https://docs.google.com/document/d/14BhIyj52NFYuyrWXe8bHJTZp7I67iKNmtOQXHCNH5GQ/edit?usp=sharing", "type": 301 },
{ "source": "/go/inheritedwidget-workshop", "destination": "https://dartpad.dev/workshops.html?webserver=https://dartpad-workshops-io2021.web.app/inherited_widget", "type": 301 },
Expand Down Expand Up @@ -467,6 +468,7 @@
{ "source": "/go/key-based-mouse-tracker-annotation", "destination": "https://docs.google.com/document/d/18DCRSX4-KjJIrnru_Cv9cJjzQmUWM95r8n6uvbS45-E/edit", "type": 301 },
{ "source": "/go/layered-material-widgets", "destination": "https://docs.google.com/document/d/132QrLvsSI3KenJZfCHufXpiRvPeqt3cUMk5DjJa6HRs/edit?usp=sharing&resourcekey=0-LrvJWEP4mqc_P3wJJt2ttw", "type": 301 },
{ "source": "/go/layout-builder-optimization", "destination": "https://docs.google.com/document/d/1H8Z48vZAemV0Kw0It65JMoGhqVlDLQErkKZN8-r9pdU", "type": 301 },
{ "source": "/go/leak-tracker-make-bots-blocking", "destination": "https://docs.google.com/document/d/1O1ojL-E0DsinDvrmR2NIGh9FUo4YeCx7H6rmmJRY_Sc/edit", "type": 301 },
{ "source": "/go/leak-tracker-high-level-design", "destination": "https://docs.google.com/document/d/158JfU9JKRqfhRPF5C0ceTuOAIWPber_MYftRiuTzlVE/edit?resourcekey=0-SFa6mZ69muVqA5eXi30wIQ", "type": 301 },
{ "source": "/go/legacy-material", "destination": "https://docs.google.com/document/d/1REsg982YG2MlspsMOiNLpu8OIWkyehRRQUXHMU3tAAM/edit?usp=sharing", "type": 301 },
{ "source": "/go/lifecycle-debug-flag", "destination": "https://docs.google.com/document/d/1WowGJhAMzYvwoyYLOzwjj1Jb0lwIjUpNfqvKjFWQZIM/edit", "type": 301 },
Expand Down Expand Up @@ -685,7 +687,7 @@
{ "source": "/to/java-gradle-incompatibility", "destination": "/release/breaking-changes/android-java-gradle-migration-guide", "type": 301 },
{ "source": "/to/linux-android-setup", "destination": "/get-started/install/linux/android", "type": 301 },
{ "source": "/to/macos-android-setup", "destination": "/get-started/install/macos/mobile-android", "type": 301 },
{ "source": "/to/macos-deploy", "destination": "/deployment/ios/macos", "type": 301 },
{ "source": "/to/macos-deploy", "destination": "/deployment/macos", "type": 301 },
{ "source": "/to/macos-entitlements", "destination": "/platform-integration/macos/building#entitlements-and-the-app-sandbox", "type": 301 },
{ "source": "/to/macos-ffi", "destination": "/platform-integration/macos/c-interop", "type": 301 },
{ "source": "/to/macos-ios-setup", "destination": "/get-started/install/macos/mobile-ios", "type": 301 },
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"node": ">=20.12.0",
"pnpm": ">=9.1.0"
},
"packageManager": "pnpm@9.4.0",
"packageManager": "pnpm@9.6.0",
"scripts": {
"serve": "PRODUCTION=false eleventy --serve",
"build-site-for-staging": "PRODUCTION=false eleventy",
Expand All @@ -22,9 +22,9 @@
"bootstrap-scss": "^4.6.2"
},
"devDependencies": {
"@11ty/eleventy": "3.0.0-alpha.10",
"@11ty/eleventy": "3.0.0-beta.1",
"diff2html": "^3.4.48",
"firebase-tools": "^13.11.2",
"firebase-tools": "^13.15.0",
"hast-util-from-html": "^2.0.1",
"hast-util-select": "^6.0.2",
"hast-util-to-text": "^4.0.2",
Expand All @@ -35,8 +35,8 @@
"markdown-it-attrs": "^4.1.6",
"markdown-it-container": "^4.0.0",
"markdown-it-deflist": "^3.0.0",
"markdown-it-table": "^4.1.1",
"sass": "^1.77.6",
"shiki": "^1.7.0"
"markdown-it-footnote": "^4.0.0",
"sass": "^1.77.8",
"shiki": "^1.12.1"
}
}
Loading

0 comments on commit 32aa206

Please sign in to comment.