Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract playground components #23253

Merged
merged 18 commits into from
Sep 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build_playground_frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
GO_VERSION: 1.18.0
BEAM_VERSION: 2.40.0
TERRAFORM_VERSION: 1.0.9
FLUTTER_VERSION: 3.0.1-stable
FLUTTER_VERSION: 3.3.2
STAND_SUFFIX: ''
GOOGLE_DOMAIN: '-dot-apache-beam-testing.appspot.com'
steps:
Expand All @@ -44,8 +44,8 @@ jobs:
java-version: '8'
- name: install flutter
run: |
wget https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_$FLUTTER_VERSION.tar.xz &&\
tar -xf flutter_linux_$FLUTTER_VERSION.tar.xz &&\
wget https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_$FLUTTER_VERSION-stable.tar.xz &&\
tar -xf flutter_linux_$FLUTTER_VERSION-stable.tar.xz &&\
mv flutter /opt/ &&\
ln -s /opt/flutter/bin/flutter /usr/local/bin/flutter &&\
ln -s /opt/flutter/bin/dart /usr/local/bin/dart &&\
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ website/www/yarn-error.log
**/.flutter-plugins
**/.flutter-plugins-dependencies
**/generated_plugin_registrant.dart
**/*.mocks.dart
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We now generate the mocks after checkout. See the Dockerfile update.


# Ignore Beam Playground Terraform
**/.terraform
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions learning/tour-of-beam/frontend/assets/svg/github-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions learning/tour-of-beam/frontend/assets/svg/google-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions learning/tour-of-beam/frontend/assets/svg/profile-about.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions learning/tour-of-beam/frontend/assets/svg/profile-delete.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions learning/tour-of-beam/frontend/assets/svg/profile-logout.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions learning/tour-of-beam/frontend/assets/svg/unit-progress-0.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions learning/tour-of-beam/frontend/assets/svg/unit-progress-100.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 24 additions & 15 deletions learning/tour-of-beam/frontend/assets/translations/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,33 @@
# under the License.

ui:
copyright: '© The Apache Software Foundation'
darkMode: 'Dark Mode'
lightMode: 'Light Mode'
privacyPolicy: 'Privacy Policy'
reportIssue: 'Report Issue in GitHub'
signIn: 'Sign in'
continueGitHub: 'Continue with GitHub'
continueGoogle: 'Continue with Google'
about: About Tour of Beam
builtWith: Built with Apache Beam
continueGitHub: Continue with GitHub
continueGoogle: Continue with Google
copyright: © The Apache Software Foundation
deleteAccount: Delete my account
privacyPolicy: Privacy Policy
reportIssue: Report Issue in GitHub
signIn: Sign in
signOut: Sign out
toWebsite: To Apache Beam website

pages:
welcome:
title: 'Welcome to the Tour of Beam!'
ifSaveProgress: 'Your journey is broken down into learning modules. If you would like to save your progress and track completed modules, please'
signIn: ' sign in.'
ifSaveProgress: Your journey is broken down into learning modules. If you would like to save your progress and track completed modules, please
selectLanguage: 'Please select the default language (you may change the language at any time):'
startLearning: 'Start learning'
signIn: ' sign in.'
startTour: Start your tour
title: Welcome to the Tour of Beam!
tour:
completeUnit: Complete Unit
summaryTitle: Table of Contents

dialogs:
signInIf: If you would like to save your progress and track completed modules

complexity:
basic: 'Basic level'
medium: 'Medium level'
advanced: 'Advanced level'
basic: Basic level
medium: Medium level
advanced: Advanced level
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'package:tour_of_beam/components/toggle_theme_button.dart';
import 'package:playground_components/playground_components.dart';
import 'package:tour_of_beam/main.dart' as app;

void main() {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* 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/material.dart';
import 'package:playground_components/playground_components.dart';

class ExpansionTileWrapper extends StatelessWidget {
final ExpansionTile expansionTile;
const ExpansionTileWrapper(this.expansionTile);

@override
Widget build(BuildContext context) {
return Theme(
data: Theme.of(context).copyWith(
hoverColor: BeamColors.transparent,
splashColor: BeamColors.transparent,
highlightColor: BeamColors.transparent,
dividerColor: BeamColors.transparent,
unselectedWidgetColor: Colors.grey,
colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.grey),
visualDensity: const VisualDensity(vertical: -4),
listTileTheme: const ListTileThemeData(dense: true),
),
child: expansionTile,
);
}
}
29 changes: 29 additions & 0 deletions learning/tour-of-beam/frontend/lib/components/filler_text.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* 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/material.dart';

class FillerText extends StatelessWidget {
final int width;
const FillerText({required this.width});

@override
Widget build(BuildContext context) {
return Text(''.padRight(width, 'Just a filler text. '));
}
}
Loading