From 096cdc39a9d5cf2837bd85069116f5e782fa080c Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Fri, 17 Nov 2023 16:27:53 -0600 Subject: [PATCH] Update links and surrounding text for new `main-api` docs (#138602) Issue reference: https://github.com/flutter/flutter/issues/133877 --- dev/benchmarks/macrobenchmarks/README.md | 2 +- dev/bots/README.md | 4 ++-- dev/docs/README.md | 8 ++++---- dev/tools/create_api_docs.dart | 4 ++-- .../interactive_viewer.builder.0.dart | 2 +- packages/flutter_tools/lib/src/commands/create.dart | 2 +- .../test/commands.shard/permeable/create_test.dart | 10 +++++----- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/dev/benchmarks/macrobenchmarks/README.md b/dev/benchmarks/macrobenchmarks/README.md index 67dc66a825..cd947ca437 100644 --- a/dev/benchmarks/macrobenchmarks/README.md +++ b/dev/benchmarks/macrobenchmarks/README.md @@ -145,4 +145,4 @@ cd dev/devicelab File `test/frame_policy.dart` and its driving script `test_driver/frame_policy_test.dart` are used for testing [`fullyLive`](https://api.flutter.dev/flutter/flutter_test/LiveTestWidgetsFlutterBindingFramePolicy-class.html) and [`benchmarkLive`](https://api.flutter.dev/flutter/flutter_test/LiveTestWidgetsFlutterBindingFramePolicy-class.html) -policies in terms of its effect on [`WidgetTester.handlePointerEventRecord`](https://master-api.flutter.dev/flutter/flutter_test/WidgetTester/handlePointerEventRecord.html). +policies in terms of its effect on [`WidgetTester.handlePointerEventRecord`](https://api.flutter.dev/flutter/flutter_test/WidgetTester/handlePointerEventRecord.html). diff --git a/dev/bots/README.md b/dev/bots/README.md index bfed67e4ef..491a614e2e 100644 --- a/dev/bots/README.md +++ b/dev/bots/README.md @@ -15,8 +15,8 @@ request permission. The [Cirrus](https://cirrus-ci.org)-based bots run the [`test.dart`](test.dart) script for each PR and submission. This does testing for the tools, for the -framework, and (for submitted changes only) rebuilds and updates the master -branch API docs [staging site](https://master-docs.flutter.dev/). +framework, and (for submitted changes only) rebuilds and updates the main +branch API docs [staging site](https://main-api.flutter.dev/). For tagged dev and beta builds, it also builds and deploys the gallery app to the app stores. It is configured by the [.cirrus.yml](/.cirrus.yml). diff --git a/dev/docs/README.md b/dev/docs/README.md index e8ac002be6..097097fd1a 100644 --- a/dev/docs/README.md +++ b/dev/docs/README.md @@ -15,7 +15,7 @@ the following locations: * [flutter.dev](https://flutter.dev) (main Flutter site) * [Stable channel API Docs](https://api.flutter.dev) -* [Main channel API Docs](https://master-api.flutter.dev) +* [Main channel API Docs](https://main-api.flutter.dev) * Engine Embedder API documentation: * [Android Embedder](../javadoc/index.html) * [iOS Embedder](../ios-embedder/index.html) @@ -39,7 +39,7 @@ to 900 MB.** Offline HTML documentation ZIP bundles: * [Stable channel](https://api.flutter.dev/offline/flutter.docs.zip) - * [Master channel](https://master-api.flutter.dev/offline/flutter.docs.zip) + * [Main channel](https://main-api.flutter.dev/offline/flutter.docs.zip) Or, you can add Flutter to the open-source [Zeal](https://zealdocs.org/) app using the following XML configurations. Follow the instructions in the @@ -47,8 +47,8 @@ application for adding a feed. * Stable channel Zeal XML configuration URL: - * Master channel Zeal XML configuration URL: - + * Main channel Zeal XML configuration URL: + ## Importing a Library diff --git a/dev/tools/create_api_docs.dart b/dev/tools/create_api_docs.dart index 56f6c32695..1849fd2314 100644 --- a/dev/tools/create_api_docs.dart +++ b/dev/tools/create_api_docs.dart @@ -341,7 +341,7 @@ class Configurator { final String branch = FlutterInformation.instance.getBranchName(); final String metadata = template.replaceAll( '{SITE_URL}', - branch == 'stable' ? 'https://api.flutter.dev/' : 'https://master-api.flutter.dev/', + branch == 'stable' ? 'https://api.flutter.dev/' : 'https://main-api.flutter.dev/', ); metadataPath.parent.create(recursive: true); metadataPath.writeAsStringSync(metadata); @@ -412,7 +412,7 @@ class Configurator { final bool isStable = platform.environment['LUCI_BRANCH'] == 'stable'; offlineDir.childFile('flutter.xml').writeAsStringSync('\n' ' ${FlutterInformation.instance.getFlutterVersion()}\n' - ' https://${isStable ? '' : 'master-'}api.flutter.dev/offline/flutter.docset.tar.gz\n' + ' https://${isStable ? '' : 'main-'}api.flutter.dev/offline/flutter.docset.tar.gz\n' '\n'); } diff --git a/examples/api/lib/widgets/interactive_viewer/interactive_viewer.builder.0.dart b/examples/api/lib/widgets/interactive_viewer/interactive_viewer.builder.0.dart index 99faf50a89..b2f05d9c90 100644 --- a/examples/api/lib/widgets/interactive_viewer/interactive_viewer.builder.0.dart +++ b/examples/api/lib/widgets/interactive_viewer/interactive_viewer.builder.0.dart @@ -122,7 +122,7 @@ class _TableBuilder extends StatelessWidget { return SizedBox( // Stack needs constraints, even though we then Clip.none outside of them. // InteractiveViewer.builder always sets constrained to false, giving infinite constraints to the child. - // See: https://master-api.flutter.dev/flutter/widgets/InteractiveViewer/constrained.html + // See: https://api.flutter.dev/flutter/widgets/InteractiveViewer/constrained.html width: 1, height: 1, child: Stack( diff --git a/packages/flutter_tools/lib/src/commands/create.dart b/packages/flutter_tools/lib/src/commands/create.dart index 97d70b0672..1fb2d4a6cc 100644 --- a/packages/flutter_tools/lib/src/commands/create.dart +++ b/packages/flutter_tools/lib/src/commands/create.dart @@ -101,7 +101,7 @@ class CreateCommand extends CreateBase { /// The hostname for the Flutter docs for the current channel. String get _snippetsHost => globals.flutterVersion.channel == 'stable' ? 'api.flutter.dev' - : 'master-api.flutter.dev'; + : 'main-api.flutter.dev'; Future _fetchSampleFromServer(String sampleId) async { // Sanity check the sampleId diff --git a/packages/flutter_tools/test/commands.shard/permeable/create_test.dart b/packages/flutter_tools/test/commands.shard/permeable/create_test.dart index 37ad977dbb..b52344542a 100644 --- a/packages/flutter_tools/test/commands.shard/permeable/create_test.dart +++ b/packages/flutter_tools/test/commands.shard/permeable/create_test.dart @@ -2035,7 +2035,7 @@ void main() { return () { return FakeHttpClient.list([ FakeRequest( - Uri.parse('https://master-api.flutter.dev/snippets/foo.bar.Baz.dart'), + Uri.parse('https://main-api.flutter.dev/snippets/foo.bar.Baz.dart'), response: FakeResponse(body: utf8.encode('void main() {}')), ), ]); @@ -2058,7 +2058,7 @@ void main() { return () { return FakeHttpClient.list([ FakeRequest( - Uri.parse('https://master-api.flutter.dev/snippets/foo.bar.Baz.dart'), + Uri.parse('https://main-api.flutter.dev/snippets/foo.bar.Baz.dart'), response: FakeResponse(body: utf8.encode('void main() { String? foo; print(foo); } // ignore: avoid_print')), ), ]); @@ -2085,7 +2085,7 @@ void main() { return () { return FakeHttpClient.list([ FakeRequest( - Uri.parse('https://master-api.flutter.dev/snippets/index.json'), + Uri.parse('https://main-api.flutter.dev/snippets/index.json'), response: FakeResponse(body: utf8.encode(samplesIndexJson)), ), ]); @@ -2114,7 +2114,7 @@ void main() { return () { return FakeHttpClient.list([ FakeRequest( - Uri.parse('https://master-api.flutter.dev/snippets/index.json'), + Uri.parse('https://main-api.flutter.dev/snippets/index.json'), ), ]); }; @@ -2138,7 +2138,7 @@ void main() { return () { return FakeHttpClient.list([ FakeRequest( - Uri.parse('https://master-api.flutter.dev/snippets/index.json'), + Uri.parse('https://main-api.flutter.dev/snippets/index.json'), response: const FakeResponse(statusCode: HttpStatus.notFound), ), ]);