diff --git a/playground/frontend/lib/constants/links.dart b/playground/frontend/lib/constants/links.dart index 7db611b2d75f..e3b34ebc8165 100644 --- a/playground/frontend/lib/constants/links.dart +++ b/playground/frontend/lib/constants/links.dart @@ -17,7 +17,7 @@ */ const kReportIssueLink = 'https://issues.apache.org/jira/projects/BEAM/issues/'; -const kGooglePrivacyPolicyLink = 'https://policies.google.com/privacy'; +const kBeamPrivacyPolicyLink = 'https://beam.apache.org/privacy_policy/'; const kBeamPlaygroundGithubLink = 'https://github.com/apache/beam/tree/master/playground'; const kApacheBeamGithubLink = 'https://github.com/apache/beam'; diff --git a/playground/frontend/lib/pages/playground/components/playground_page_footer.dart b/playground/frontend/lib/pages/playground/components/playground_page_footer.dart index b40256bbd34f..dbf8039875c0 100644 --- a/playground/frontend/lib/pages/playground/components/playground_page_footer.dart +++ b/playground/frontend/lib/pages/playground/components/playground_page_footer.dart @@ -24,7 +24,6 @@ import 'package:playground/constants/links.dart'; import 'package:playground/constants/sizes.dart'; import 'package:playground/modules/analytics/analytics_service.dart'; import 'package:playground/pages/playground/components/feedback/playground_feedback.dart'; -import 'package:playground/pages/playground/components/playground_privacy_policy.dart'; import 'package:url_launcher/url_launcher.dart'; class PlaygroundPageFooter extends StatelessWidget { @@ -62,11 +61,9 @@ class PlaygroundPageFooter extends StatelessWidget { textStyle: const TextStyle(fontWeight: kNormalWeight), ), onPressed: () { - showDialog( - context: context, - builder: (BuildContext context) => - const PlaygroundPrivacyPolicy(), - ); + AnalyticsService.get(context) + .trackOpenLink(kBeamPrivacyPolicyLink); + launch(kBeamPrivacyPolicyLink); }, child: Text(appLocale.privacyPolicy), ), diff --git a/playground/frontend/lib/pages/playground/components/playground_privacy_policy.dart b/playground/frontend/lib/pages/playground/components/playground_privacy_policy.dart deleted file mode 100644 index 013bb1ab0703..000000000000 --- a/playground/frontend/lib/pages/playground/components/playground_privacy_policy.dart +++ /dev/null @@ -1,85 +0,0 @@ -/* - * 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:flutter/gestures.dart'; -import 'package:flutter/material.dart'; -import 'package:playground/constants/colors.dart'; -import 'package:playground/constants/links.dart'; -import 'package:playground/modules/analytics/analytics_service.dart'; -import 'package:url_launcher/url_launcher.dart'; - -const kPrivacyPolicyTextStart = - '''Apache Beam Playground is a free, open source service to help developers learn about the Apache Beam programming model. Source code entered into Apache Beam Playground may be sent to servers running in Google Cloud Platform to be analyzed for errors/warnings, compiled to Java, Golang, and Scala, interpreted with Python and returned to the browser. - -Source code entered into Apache Beam Playground may be stored, processed, and aggregated in order to improve the user experience of Apache Beam Playground and other Apache Beam tools. For example, we may use the source code to help offer better code completion suggestions. The raw source code is deleted after no more than 60 days. - -Apache Beam Playground uses Google Analytics to report feature usage statistics. This data is used to help improve Apache Beam tools over time. - -Learn more about Google’s '''; -const kGooglePrivacyPolicyText = 'privacy policy'; -const kPrivacyPolicyTextEnd = '. We look forward to your '; -const kPrivacyPolicyFeedback = 'feedback'; -const kPrivacyPolicyTitle = 'Privacy Policy'; - -const kDialogPadding = 40.0; -const kModalWidth = 500.0; - -class PlaygroundPrivacyPolicy extends StatelessWidget { - const PlaygroundPrivacyPolicy({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return AlertDialog( - titlePadding: const EdgeInsets.only( - top: kDialogPadding, - left: kDialogPadding, - ), - contentPadding: const EdgeInsets.all(kDialogPadding), - title: const Text(kPrivacyPolicyTitle), - content: ConstrainedBox( - constraints: const BoxConstraints(maxWidth: kModalWidth), - child: RichText( - text: TextSpan(children: [ - const TextSpan(text: kPrivacyPolicyTextStart), - TextSpan( - text: kGooglePrivacyPolicyText, - style: const TextStyle(color: kLinkColor), - recognizer: TapGestureRecognizer() - ..onTap = () { - AnalyticsService.get(context) - .trackOpenLink(kGooglePrivacyPolicyLink); - launch(kGooglePrivacyPolicyLink); - }, - ), - const TextSpan(text: kPrivacyPolicyTextEnd), - TextSpan( - text: kPrivacyPolicyFeedback, - style: const TextStyle(color: kLinkColor), - recognizer: TapGestureRecognizer() - ..onTap = () { - AnalyticsService.get(context).trackOpenLink(kReportIssueLink); - launch(kReportIssueLink); - }, - ), - const TextSpan(text: '.'), - ]), - ), - ), - ); - } -} diff --git a/website/www/site/content/en/privacy_policy/_index.md b/website/www/site/content/en/privacy_policy/_index.md index 71813927e37e..516aa0c3e43d 100644 --- a/website/www/site/content/en/privacy_policy/_index.md +++ b/website/www/site/content/en/privacy_policy/_index.md @@ -25,6 +25,8 @@ Information about your use of this website is collected using server access logs Part of this information is gathered using a tracking cookie set by the [Google Analytics](https://www.google.com/analytics/) service and handled by Google as described in [their privacy policy](https://policies.google.com/privacy). See your browser documentation for instructions on how to disable the cookie if you prefer not to share this data with Google. +Apache Beam Playground website may temporarily store and process data submitted by users through the Playground website. + We use the gathered information to help us make our site more useful to visitors and to better understand how and when our site is used. We do not track or collect personally identifiable information or associate gathered data with any personally identifying information from other sources. By using this website, you consent to the collection of this data in the manner and for the purpose described above.