-
Notifications
You must be signed in to change notification settings - Fork 4.5k
[Tour of Beam]: Welcome Screen frontend layout #22794
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
Merged
damccorm
merged 20 commits into
apache:master
from
akvelon:issue22583_tob_welcome_screen
Sep 2, 2022
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
3aff786
Tour of Beam frontend blank project
alexeyinkin 6d86ad2
TOBF (ToB frontend): welcome screen (#226)
nausharipov fddc784
removed whitespace from readme (issue-22583)
23f9e1b
renamed "content" to "child" to mimic widgets
3a88e3d
README in tour-of-beam
fb7b41a
translation path rename,
2ddf925
Merge branch 'apache:master' into issue22583_tob_welcome_screen
alexeyinkin 0480e9a
report issue in github, grey dot color
6c31d4a
table instead of row to clip the laptop image
3e3fe35
horizontalHalves & verticalHalves
060079c
cropped laptop image
b3842b6
row in an expensive intrinsic height
2ba2d40
laptop image in the bottom
8f69df6
ScreenBreakpoints
f4486b9
intrinsic height is not needed!
40b8a2e
_WideWelcome and _NarrowWelcome
5b38e50
draft readme
22d08d9
blank line in readme
39368e3
removed irrelevant info from readme
3605cc6
removed whitespace
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| <!-- | ||
| 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. | ||
| --> | ||
|
|
||
| # Overview | ||
|
|
||
| This folder holds code that supports the user interface for [Tour of Beam](../). | ||
|
|
||
| # Requirements | ||
|
|
||
| To develop, build and test code in this folder requires the following: | ||
|
|
||
| - https://flutter.dev/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # This file tracks properties of this Flutter project. | ||
| # Used by Flutter tool to assess capabilities and perform upgrades etc. | ||
| # | ||
| # This file should be version controlled. | ||
|
|
||
| version: | ||
| revision: f1875d570e39de09040c8f79aa13cc56baab8db1 | ||
| channel: stable | ||
|
|
||
| project_type: app | ||
|
|
||
| # Tracks metadata for the flutter migrate command | ||
| migration: | ||
| platforms: | ||
| - platform: root | ||
| create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 | ||
| base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 | ||
| - platform: web | ||
| create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 | ||
| base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 | ||
|
|
||
| # User provided section | ||
|
|
||
| # List of Local paths (relative to this file) that should be | ||
| # ignored by the migrate tool. | ||
| # | ||
| # Files that are not part of the templates will be ignored by default. | ||
| unmanaged_files: | ||
| - 'lib/main.dart' | ||
| - 'ios/Runner.xcodeproj/project.pbxproj' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| <!-- | ||
| 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. | ||
| --> | ||
|
|
||
| # Tour of Beam | ||
| These are the main sources of the Tour of Beam website. | ||
|
|
||
| # About | ||
|
|
||
| # Getting started | ||
| Flutter installation guide: https://docs.flutter.dev/get-started/install | ||
| Run the app: `flutter run --web-renderer html` | ||
|
|
||
| # Deployment | ||
|
|
||
| # Tests | ||
| Install ChromeDriver to run integration tests in a browser: https://docs.flutter.dev/testing/integration-tests#running-in-a-browser | ||
| Run integration tests: | ||
| flutter drive \ | ||
| --driver=test_driver/integration_test.dart \ | ||
| --target=integration_test/counter_test.dart \ | ||
| -d web-server | ||
|
|
||
| # Packages | ||
| `flutter pub get` | ||
|
|
||
| # Contribution guide | ||
| For checks: `./gradlew rat` | ||
|
|
||
| # Additional resources | ||
|
|
||
| # Troubleshooting |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # 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. | ||
|
|
||
| include: package:total_lints/app.yaml |
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.
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.
19 changes: 19 additions & 0 deletions
19
learning/tour-of-beam/frontend/assets/svg/welcome-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.
39 changes: 39 additions & 0 deletions
39
learning/tour-of-beam/frontend/assets/translations/en.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # 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. | ||
|
|
||
| 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' | ||
| 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.' | ||
| selectLanguage: 'Please select the default language (you may change the language at any time):' | ||
| startLearning: 'Start learning' | ||
| dialogs: | ||
| signInIf: If you would like to save your progress and track completed modules | ||
| complexity: | ||
| basic: 'Basic level' | ||
| medium: 'Medium level' | ||
| advanced: 'Advanced level' |
43 changes: 43 additions & 0 deletions
43
learning/tour-of-beam/frontend/integration_test/app_test.dart
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| /* | ||
| * 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_test/flutter_test.dart'; | ||
| import 'package:integration_test/integration_test.dart'; | ||
| import 'package:tour_of_beam/components/toggle_theme_button.dart'; | ||
| import 'package:tour_of_beam/main.dart' as app; | ||
|
|
||
| void main() { | ||
| IntegrationTestWidgetsFlutterBinding.ensureInitialized(); | ||
|
|
||
| group('theme', () { | ||
| testWidgets('mode toggle', (tester) async { | ||
| app.main(); | ||
| await tester.pumpAndSettle(); | ||
| final Finder switchToDarkModeButton = | ||
| find.widgetWithText(ToggleThemeButton, 'ui.darkMode'.tr()); | ||
| expect(switchToDarkModeButton, findsOneWidget); | ||
| await tester.tap(switchToDarkModeButton); | ||
| await tester.pumpAndSettle(); | ||
| expect( | ||
| find.widgetWithText(ToggleThemeButton, 'ui.lightMode'.tr()), | ||
| findsOneWidget, | ||
| ); | ||
| }); | ||
| }); | ||
| } |
65 changes: 65 additions & 0 deletions
65
learning/tour-of-beam/frontend/lib/components/complexity.dart
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| /* | ||
| * 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 '../constants/colors.dart'; | ||
| import '../constants/sizes.dart'; | ||
|
|
||
| enum Complexity { basic, medium, advanced } | ||
|
|
||
| class ComplexityWidget extends StatelessWidget { | ||
| final Complexity complexity; | ||
|
|
||
| const ComplexityWidget({required this.complexity}); | ||
|
|
||
| @override | ||
| Widget build(BuildContext context) { | ||
| return Row(children: _dots[complexity]!); | ||
| } | ||
|
|
||
| static const Map<Complexity, List<Widget>> _dots = { | ||
| Complexity.basic: [_Dot.green, _Dot.grey, _Dot.grey], | ||
| Complexity.medium: [_Dot.orange, _Dot.orange, _Dot.grey], | ||
| Complexity.advanced: [_Dot.red, _Dot.red, _Dot.red], | ||
| }; | ||
| } | ||
|
|
||
| class _Dot extends StatelessWidget { | ||
| final Color color; | ||
|
|
||
| const _Dot({required this.color}); | ||
|
|
||
| @override | ||
| Widget build(BuildContext context) { | ||
| return Container( | ||
| margin: const EdgeInsets.only(left: 1), | ||
| width: TobSizes.size4, | ||
| height: TobSizes.size4, | ||
| decoration: BoxDecoration( | ||
| shape: BoxShape.circle, | ||
| color: color, | ||
| ), | ||
| ); | ||
| } | ||
|
|
||
| static const grey = _Dot(color: TobColors.grey4); | ||
| static const green = _Dot(color: TobColors.green); | ||
| static const orange = _Dot(color: TobColors.orange); | ||
| static const red = _Dot(color: TobColors.red); | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless I was in dark mode, the two orange dots were not distinguishable from the grey.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's do
0x30808080that fits both light and dark?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implemented the above.