You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/12/29 16:49:53 UTC

[GitHub] [beam] Malarg opened a new pull request, #24820: issue24170 google colab link added

Malarg opened a new pull request, #24820:
URL: https://github.com/apache/beam/pull/24820

   Google colab link added
   
   ------------------------
   
   Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
   
    - [ ] Mention the appropriate issue in your description (for example: `addresses #123`), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment `fixes #<ISSUE NUMBER>` instead.
    - [ ] Update `CHANGES.md` with noteworthy changes.
    - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   See the [Contributor Guide](https://beam.apache.org/contribute) for more tips on [how to make review process smoother](https://beam.apache.org/contribute/get-started-contributing/#make-the-reviewers-job-easier).
   
   To check the build health, please visit [https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md](https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md)
   
   GitHub Actions Tests Status (on master branch)
   ------------------------------------------------------------------------------------------------
   [![Build python source distribution and wheels](https://github.com/apache/beam/workflows/Build%20python%20source%20distribution%20and%20wheels/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Build+python+source+distribution+and+wheels%22+branch%3Amaster+event%3Aschedule)
   [![Python tests](https://github.com/apache/beam/workflows/Python%20tests/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Python+Tests%22+branch%3Amaster+event%3Aschedule)
   [![Java tests](https://github.com/apache/beam/workflows/Java%20Tests/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Java+Tests%22+branch%3Amaster+event%3Aschedule)
   [![Go tests](https://github.com/apache/beam/workflows/Go%20tests/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Go+tests%22+branch%3Amaster+event%3Aschedule)
   
   See [CI.md](https://github.com/apache/beam/blob/master/CI.md) for more information about GitHub Actions CI.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] alexeyinkin commented on a diff in pull request #24820: issue24170 google colab link added

Posted by GitBox <gi...@apache.org>.
alexeyinkin commented on code in PR #24820:
URL: https://github.com/apache/beam/pull/24820#discussion_r1060540598


##########
playground/frontend/lib/pages/embedded_playground/widgets/embedded_actions.dart:
##########
@@ -40,19 +41,41 @@ class EmbeddedActions extends StatelessWidget {
 
   @override
   Widget build(BuildContext context) {
-    return Padding(
-      padding: const EdgeInsets.all(kMdSpacing),
-      child: SizedBox(
-        width: kTryPlaygroundButtonWidth,
-        height: kTryPlaygroundButtonHeight,
-        child: Consumer<PlaygroundController>(
-          builder: (context, controller, child) => ElevatedButton.icon(
-            icon: SvgPicture.asset(kLinkIconAsset),
-            label: Text(AppLocalizations.of(context)!.tryInPlayground),
-            onPressed: () => _openStandalonePlayground(controller),
-          ),
+    return Row(
+      children: [
+        Consumer<PlaygroundController>(
+          builder: (_, controller, __) {
+            final selectedExample = controller.selectedExample;
+            final hasGithubLink = selectedExample?.urlVcs != null;
+            final hasColabLink = selectedExample?.urlNotebook != null;
+
+            return Row(
+              children: [
+                if (hasGithubLink)
+                  LinkButton.github(selectedExample?.urlVcs ?? ''),
+                if (hasColabLink) ...[
+                  const SizedBox(width: kMdSpacing),

Review Comment:
   This spacing should not belong to any of the buttons.
   
   Option 1:
   
   https://github.com/alexeyinkin/mefolio-standalone/blob/ab95a0f8cca06c589a24f1ffe82b1c8bef847c86/flutter/lib/util/util.dart#L2
   
   https://github.com/alexeyinkin/mefolio-standalone/blob/ab95a0f8cca06c589a24f1ffe82b1c8bef847c86/flutter/lib/pages/contact/widgets/contacts.dart#L23
   
   Option 2: Wrap all buttons with padding.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] Malarg commented on a diff in pull request #24820: issue24170 google colab link added

Posted by GitBox <gi...@apache.org>.
Malarg commented on code in PR #24820:
URL: https://github.com/apache/beam/pull/24820#discussion_r1059241872


##########
playground/frontend/playground_components/lib/src/models/example.dart:
##########
@@ -39,7 +39,8 @@ class Example extends ExampleBase {
     super.contextLine,
     super.description,
     super.isMultiFile,
-    super.link,
+    super.urlNotebook,
+    super.urlVcs,
     super.pipelineOptions,
     super.tags,
     super.viewOptions,

Review Comment:
   done



##########
playground/frontend/playground_components/lib/src/models/example_base.dart:
##########
@@ -55,7 +55,8 @@ class ExampleBase with Comparable<ExampleBase>, EquatableMixin {
   final int contextLine;
   final String description;
   final bool isMultiFile;
-  final String? link;
+  final String? urlNotebook;
+  final String? urlVcs;

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] Malarg commented on a diff in pull request #24820: issue24170 google colab link added

Posted by GitBox <gi...@apache.org>.
Malarg commented on code in PR #24820:
URL: https://github.com/apache/beam/pull/24820#discussion_r1060582276


##########
playground/frontend/lib/pages/embedded_playground/widgets/embedded_actions.dart:
##########
@@ -40,19 +41,41 @@ class EmbeddedActions extends StatelessWidget {
 
   @override
   Widget build(BuildContext context) {
-    return Padding(
-      padding: const EdgeInsets.all(kMdSpacing),
-      child: SizedBox(
-        width: kTryPlaygroundButtonWidth,
-        height: kTryPlaygroundButtonHeight,
-        child: Consumer<PlaygroundController>(
-          builder: (context, controller, child) => ElevatedButton.icon(
-            icon: SvgPicture.asset(kLinkIconAsset),
-            label: Text(AppLocalizations.of(context)!.tryInPlayground),
-            onPressed: () => _openStandalonePlayground(controller),
-          ),
+    return Row(
+      children: [
+        Consumer<PlaygroundController>(
+          builder: (_, controller, __) {
+            final selectedExample = controller.selectedExample;
+            final hasGithubLink = selectedExample?.urlVcs != null;
+            final hasColabLink = selectedExample?.urlNotebook != null;
+
+            return Row(
+              children: [
+                if (hasGithubLink)
+                  LinkButton.github(selectedExample?.urlVcs ?? ''),
+                if (hasColabLink) ...[
+                  const SizedBox(width: kMdSpacing),

Review Comment:
   Paddings added



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] pabloem commented on pull request #24820: issue24170 google colab link added

Posted by "pabloem (via GitHub)" <gi...@apache.org>.
pabloem commented on PR #24820:
URL: https://github.com/apache/beam/pull/24820#issuecomment-1416834212

   thanks y;all!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] pabloem merged pull request #24820: issue24170 google colab link added

Posted by "pabloem (via GitHub)" <gi...@apache.org>.
pabloem merged PR #24820:
URL: https://github.com/apache/beam/pull/24820


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] Malarg commented on pull request #24820: issue24170 google colab link added

Posted by GitBox <gi...@apache.org>.
Malarg commented on PR #24820:
URL: https://github.com/apache/beam/pull/24820#issuecomment-1367459271

   @alexeyinkin fyi


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] Malarg commented on a diff in pull request #24820: issue24170 google colab link added

Posted by GitBox <gi...@apache.org>.
Malarg commented on code in PR #24820:
URL: https://github.com/apache/beam/pull/24820#discussion_r1059241910


##########
playground/frontend/playground_components/lib/src/repositories/example_client/grpc_example_client.dart:
##########
@@ -333,7 +333,8 @@ class GrpcExampleClient implements ExampleClient {
       contextLine: example.contextLine,
       pipelineOptions: example.pipelineOptions,
       isMultiFile: example.multifile,
-      link: example.link,
+      urlNotebook: example.urlNotebook,
+      urlVcs: example.urlVcs,
       complexity: example.complexity.model,

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] Malarg commented on a diff in pull request #24820: issue24170 google colab link added

Posted by GitBox <gi...@apache.org>.
Malarg commented on code in PR #24820:
URL: https://github.com/apache/beam/pull/24820#discussion_r1059241820


##########
playground/frontend/assets/github.svg:
##########
@@ -17,7 +17,7 @@
     under the License.
 -->
 
-<svg width="20" height="21" viewBox="0 0 20 21" fill="none" xmlns="http://www.w3.org/2000/svg">
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">

Review Comment:
   fixed



##########
playground/frontend/lib/components/link_button.dart:
##########
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import 'package:easy_localization/easy_localization.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_svg/svg.dart';
+import 'package:url_launcher/url_launcher.dart';
+
+import '../constants/assets.dart';
+
+class LinkButton extends StatelessWidget {
+  final String iconPath;
+  final String text;
+  final String url;
+
+  const LinkButton({
+    required this.iconPath,
+    required this.text,
+    required this.url,
+  });
+
+  factory LinkButton.colab(String url) {
+    return LinkButton(
+      iconPath: kColabIconAsset,
+      text: 'intents.playground.openGoogleColab'.tr(),
+      url: url,
+    );
+  }
+
+  factory LinkButton.github(String url) {
+    return LinkButton(
+      iconPath: kGithubIconAsset,
+      text: 'intents.playground.viewOnGithub'.tr(),
+      url: url,
+    );
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    return TextButton.icon(
+      icon: SvgPicture.asset(iconPath),
+      onPressed: () {
+        launchUrl(Uri.parse(url));
+      },
+      label: Text(text),
+    );
+  }
+}

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] Malarg commented on a diff in pull request #24820: issue24170 google colab link added

Posted by GitBox <gi...@apache.org>.
Malarg commented on code in PR #24820:
URL: https://github.com/apache/beam/pull/24820#discussion_r1059240665


##########
playground/frontend/lib/components/link_button.dart:
##########
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import 'package:easy_localization/easy_localization.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_svg/svg.dart';
+import 'package:url_launcher/url_launcher.dart';
+
+import '../constants/assets.dart';
+
+class LinkButton extends StatelessWidget {
+  final String iconPath;
+  final String text;
+  final String url;
+
+  const LinkButton({
+    required this.iconPath,
+    required this.text,
+    required this.url,
+  });
+
+  factory LinkButton.colab(String url) {
+    return LinkButton(
+      iconPath: kColabIconAsset,
+      text: 'intents.playground.openGoogleColab'.tr(),
+      url: url,
+    );
+  }
+
+  factory LinkButton.github(String url) {
+    return LinkButton(
+      iconPath: kGithubIconAsset,
+      text: 'intents.playground.viewOnGithub'.tr(),
+      url: url,
+    );
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    return TextButton.icon(
+      icon: SvgPicture.asset(iconPath),

Review Comment:
   1. To me, the icons look nice together :)
   2. Grey Google Colab icon will be less recognizable for users. I don't want to change official logo



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] alexeyinkin commented on a diff in pull request #24820: issue24170 google colab link added

Posted by GitBox <gi...@apache.org>.
alexeyinkin commented on code in PR #24820:
URL: https://github.com/apache/beam/pull/24820#discussion_r1059292857


##########
playground/frontend/lib/constants/assets.dart:
##########
@@ -23,6 +23,7 @@ const kOutputRightIconAsset = 'output_right.svg';
 const kOutputLeftIconAsset = 'output_left.svg';
 const kShortcutsIconAsset = 'shortcuts.svg';
 const kGithubIconAsset = 'github.svg';
+const kColabIconAsset = 'colab.svg';

Review Comment:
   Colab field is in `master` already, so you may try. But I am not pushing.



##########
playground/frontend/lib/components/link_button.dart:
##########
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import 'package:easy_localization/easy_localization.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_svg/svg.dart';
+import 'package:url_launcher/url_launcher.dart';
+
+import '../constants/assets.dart';
+
+class LinkButton extends StatelessWidget {
+  final String iconPath;
+  final String text;
+  final String url;
+
+  const LinkButton({
+    required this.iconPath,
+    required this.text,
+    required this.url,
+  });
+
+  factory LinkButton.colab(String url) {
+    return LinkButton(
+      iconPath: kColabIconAsset,
+      text: 'intents.playground.openGoogleColab'.tr(),
+      url: url,
+    );
+  }
+
+  factory LinkButton.github(String url) {
+    return LinkButton(
+      iconPath: kGithubIconAsset,
+      text: 'intents.playground.viewOnGithub'.tr(),
+      url: url,
+    );
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    return TextButton.icon(
+      icon: SvgPicture.asset(iconPath),

Review Comment:
   Please post the two screenshots here: colored and grey, so we can see without running and vote.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] alexeyinkin commented on a diff in pull request #24820: issue24170 google colab link added

Posted by GitBox <gi...@apache.org>.
alexeyinkin commented on code in PR #24820:
URL: https://github.com/apache/beam/pull/24820#discussion_r1059066253


##########
playground/frontend/lib/components/link_button.dart:
##########
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import 'package:easy_localization/easy_localization.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_svg/svg.dart';
+import 'package:url_launcher/url_launcher.dart';
+
+import '../constants/assets.dart';
+
+class LinkButton extends StatelessWidget {
+  final String iconPath;
+  final String text;
+  final String url;
+
+  const LinkButton({
+    required this.iconPath,
+    required this.text,
+    required this.url,
+  });
+
+  factory LinkButton.colab(String url) {
+    return LinkButton(
+      iconPath: kColabIconAsset,
+      text: 'intents.playground.openGoogleColab'.tr(),
+      url: url,
+    );
+  }
+
+  factory LinkButton.github(String url) {
+    return LinkButton(
+      iconPath: kGithubIconAsset,
+      text: 'intents.playground.viewOnGithub'.tr(),
+      url: url,
+    );
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    return TextButton.icon(
+      icon: SvgPicture.asset(iconPath),
+      onPressed: () {
+        launchUrl(Uri.parse(url));
+      },
+      label: Text(text),
+    );
+  }
+}

Review Comment:
   Newline.



##########
playground/frontend/assets/github.svg:
##########
@@ -17,7 +17,7 @@
     under the License.
 -->
 
-<svg width="20" height="21" viewBox="0 0 20 21" fill="none" xmlns="http://www.w3.org/2000/svg">
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">

Review Comment:
   It is off-center now.



##########
playground/frontend/lib/components/link_button.dart:
##########
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import 'package:easy_localization/easy_localization.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_svg/svg.dart';
+import 'package:url_launcher/url_launcher.dart';
+
+import '../constants/assets.dart';
+
+class LinkButton extends StatelessWidget {
+  final String iconPath;
+  final String text;
+  final String url;
+
+  const LinkButton({
+    required this.iconPath,
+    required this.text,
+    required this.url,
+  });
+
+  factory LinkButton.colab(String url) {
+    return LinkButton(
+      iconPath: kColabIconAsset,
+      text: 'intents.playground.openGoogleColab'.tr(),
+      url: url,
+    );
+  }
+
+  factory LinkButton.github(String url) {
+    return LinkButton(
+      iconPath: kGithubIconAsset,
+      text: 'intents.playground.viewOnGithub'.tr(),
+      url: url,
+    );
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    return TextButton.icon(
+      icon: SvgPicture.asset(iconPath),

Review Comment:
   Make the Colab icon grey to match GitHub?



##########
playground/frontend/playground_components/lib/src/models/example.dart:
##########
@@ -39,7 +39,8 @@ class Example extends ExampleBase {
     super.contextLine,
     super.description,
     super.isMultiFile,
-    super.link,
+    super.urlNotebook,
+    super.urlVcs,
     super.pipelineOptions,
     super.tags,
     super.viewOptions,

Review Comment:
   Sort? Here and below.



##########
playground/frontend/playground_components/lib/src/repositories/example_client/grpc_example_client.dart:
##########
@@ -333,7 +333,8 @@ class GrpcExampleClient implements ExampleClient {
       contextLine: example.contextLine,
       pipelineOptions: example.pipelineOptions,
       isMultiFile: example.multifile,
-      link: example.link,
+      urlNotebook: example.urlNotebook,
+      urlVcs: example.urlVcs,
       complexity: example.complexity.model,

Review Comment:
   Sort all fields?



##########
playground/frontend/lib/constants/assets.dart:
##########
@@ -23,6 +23,7 @@ const kOutputRightIconAsset = 'output_right.svg';
 const kOutputLeftIconAsset = 'output_left.svg';
 const kShortcutsIconAsset = 'shortcuts.svg';
 const kGithubIconAsset = 'github.svg';
+const kColabIconAsset = 'colab.svg';

Review Comment:
   On some (unmerged?) branch we were dropping these constants in favor of flutter_gen. Can this PR be done on that branch?



##########
playground/frontend/playground_components/lib/src/models/example_base.dart:
##########
@@ -55,7 +55,8 @@ class ExampleBase with Comparable<ExampleBase>, EquatableMixin {
   final int contextLine;
   final String description;
   final bool isMultiFile;
-  final String? link;
+  final String? urlNotebook;
+  final String? urlVcs;

Review Comment:
   Sort? Here and below.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] Malarg commented on pull request #24820: issue24170 google colab link added

Posted by GitBox <gi...@apache.org>.
Malarg commented on PR #24820:
URL: https://github.com/apache/beam/pull/24820#issuecomment-1376686968

   R: @damondouglas


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] Malarg commented on a diff in pull request #24820: issue24170 google colab link added

Posted by GitBox <gi...@apache.org>.
Malarg commented on code in PR #24820:
URL: https://github.com/apache/beam/pull/24820#discussion_r1060282567


##########
playground/frontend/lib/components/link_button.dart:
##########
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import 'package:easy_localization/easy_localization.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_svg/svg.dart';
+import 'package:url_launcher/url_launcher.dart';
+
+import '../constants/assets.dart';
+
+class LinkButton extends StatelessWidget {
+  final String iconPath;
+  final String text;
+  final String url;
+
+  const LinkButton({
+    required this.iconPath,
+    required this.text,
+    required this.url,
+  });
+
+  factory LinkButton.colab(String url) {
+    return LinkButton(
+      iconPath: kColabIconAsset,
+      text: 'intents.playground.openGoogleColab'.tr(),
+      url: url,
+    );
+  }
+
+  factory LinkButton.github(String url) {
+    return LinkButton(
+      iconPath: kGithubIconAsset,
+      text: 'intents.playground.viewOnGithub'.tr(),
+      url: url,
+    );
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    return TextButton.icon(
+      icon: SvgPicture.asset(iconPath),

Review Comment:
   <img width="296" alt="Снимок экрана 2023-01-03 в 09 07 58" src="https://user-images.githubusercontent.com/17158960/210303162-58604ea8-14cb-4507-bd97-071d081c9497.png">
   <img width="298" alt="Снимок экрана 2023-01-03 в 09 02 27" src="https://user-images.githubusercontent.com/17158960/210303165-586a90c5-da84-47ef-af63-564fc16973ce.png">
   <img width="296" alt="Снимок экрана 2023-01-03 в 09 05 49" src="https://user-images.githubusercontent.com/17158960/210303167-7f3ae3a3-9f0e-4383-8853-761a74fb4903.png">
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] alexeyinkin commented on pull request #24820: issue24170 google colab link added

Posted by GitBox <gi...@apache.org>.
alexeyinkin commented on PR #24820:
URL: https://github.com/apache/beam/pull/24820#issuecomment-1367795737

   LGTM (internal review).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] Malarg commented on a diff in pull request #24820: issue24170 google colab link added

Posted by GitBox <gi...@apache.org>.
Malarg commented on code in PR #24820:
URL: https://github.com/apache/beam/pull/24820#discussion_r1059239951


##########
playground/frontend/lib/constants/assets.dart:
##########
@@ -23,6 +23,7 @@ const kOutputRightIconAsset = 'output_right.svg';
 const kOutputLeftIconAsset = 'output_left.svg';
 const kShortcutsIconAsset = 'shortcuts.svg';
 const kGithubIconAsset = 'github.svg';
+const kColabIconAsset = 'colab.svg';

Review Comment:
   I don't think, that it's a good idea, because in this PR we are depends on colab link code on backend. So if we try to create PR on that branch with this code, where will be a lot of additional changes. I think it will be better to resolve conflicts



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] github-actions[bot] commented on pull request #24820: issue24170 google colab link added

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #24820:
URL: https://github.com/apache/beam/pull/24820#issuecomment-1376687875

   Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org