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

CPLAT-6104 Add over_react_redux example app #439

Merged
merged 37 commits into from
Jan 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
b946942
Use main.dart for example entrypoint(s)
aaronlademann-wf Dec 4, 2019
1f1b5d7
Split up existing examples into sub-directories
aaronlademann-wf Dec 4, 2019
2fe3179
Add over_react_redux todo example app
aaronlademann-wf Dec 5, 2019
3b185b3
Merge remote-tracking branch 'upstream/master' into CPLAT-6104_over_r…
aaronlademann-wf Dec 18, 2019
5b2f736
Refine recursive JsBackedMap stuff in todo_client example
aaronlademann-wf Dec 18, 2019
7a8b09b
Improve variable names
aaronlademann-wf Dec 18, 2019
3a32887
Remove unnecessary build tooling config
aaronlademann-wf Dec 18, 2019
39d44ab
Remove unused js config
aaronlademann-wf Dec 18, 2019
9525ea8
Specify requiredProps
aaronlademann-wf Dec 18, 2019
e39071a
Bump SDK constraint for example app
aaronlademann-wf Dec 19, 2019
372fc5d
Remove unnecessary white space
aaronlademann-wf Dec 19, 2019
c083a32
Update .gitignore for example app
aaronlademann-wf Dec 19, 2019
56b39f2
Use variadic children consistently in the example app
aaronlademann-wf Dec 19, 2019
2127adc
Don’t use instance state here
aaronlademann-wf Dec 19, 2019
f102454
Don’t use getDerivedStateFromProps
aaronlademann-wf Dec 19, 2019
acd8949
Improve variable names
aaronlademann-wf Dec 19, 2019
0f583d1
Don’t waste time creating sets
aaronlademann-wf Dec 19, 2019
891571c
Simplify JsBackedMap utility
aaronlademann-wf Dec 19, 2019
4dce6c1
Remove unnecessary toList()
aaronlademann-wf Dec 19, 2019
f770c15
Update json_serializable dependency
aaronlademann-wf Dec 20, 2019
59b8dea
Set up testing for todo example app
aaronlademann-wf Dec 20, 2019
9495704
Add tests for example todo app store
aaronlademann-wf Dec 20, 2019
52a007c
Add more tests for example todo app store
aaronlademann-wf Dec 20, 2019
6a889ef
Add tests for example todo app models
aaronlademann-wf Dec 20, 2019
a994114
Add tests for example todo app material-ui js interop
aaronlademann-wf Dec 20, 2019
1e62fba
Add tests for example todo app mui interop’d components
aaronlademann-wf Dec 20, 2019
bfc5ceb
Move test store into a shared utils file
aaronlademann-wf Dec 20, 2019
1ade26b
Begin adding tests for example todo app custom components
aaronlademann-wf Dec 21, 2019
f30949c
Merge ‘upstream/master' into CPLAT-6104_over_react_redux_example_app
aaronlademann-wf Jan 15, 2020
fd5b04b
Update generated file
aaronlademann-wf Jan 15, 2020
00a1cd0
Move local storage side manipulation into middleware to make reducer …
greglittlefield-wf Jan 16, 2020
73f2538
Remove unused type from actions, simplify JSON representation and pay…
greglittlefield-wf Jan 16, 2020
c2ec75a
Fix save menu not detecting changes
greglittlefield-wf Jan 16, 2020
dd01aec
Fix "Save As" not working for default value
greglittlefield-wf Jan 16, 2020
863df28
Simplify LocalStorage initialization
greglittlefield-wf Jan 16, 2020
6b72ee6
Merge pull request #451 from Workiva/localstorage-cleanup
rm-astro-wf Jan 16, 2020
5a84e2a
Address CR feedback
aaronlademann-wf Jan 17, 2020
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
1 change: 1 addition & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ analyzer:
exclude:
- _site/**
- test_fixtures/**
- app/**
linter:
rules:
# -------------------
Expand Down
16 changes: 16 additions & 0 deletions app/over_react_redux/todo_client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.packages
.pub
packages
build/
.dart_tool

# Directory created by dartdoc
doc/api/

# JetBrains IDEs
.idea/
*.iml
*.ipr
*.iws
.arcconfig
.vscode
27 changes: 27 additions & 0 deletions app/over_react_redux/todo_client/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# OverReact Redux Example "Todo" Application

## Running
```
pub get
webdev serve
```

Open [http://localhost:8080](http://localhost:8080).

## Using Redux Dev Tools
This example app is already set up to utilize a `DevToolsStore` so
that you can inspect the data using the Redux Devtools extension!

Download the Redux Devtools extension:
- [Google Chrome Extension](https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd?hl=en)
- [Firefox Extension](https://addons.mozilla.org/en-US/firefox/addon/reduxdevtools/)

> Additional information about `redux_dev_tools` and `DevToolsStore`s can be found [here](https://github.com/brianegan/redux_dev_tools#redux_dev_tools)

## Compiling Sass

To compile the `.scss` file(s) into CSS, run

```
pub run w_common:compile_sass -s expanded
```
90 changes: 90 additions & 0 deletions app/over_react_redux/todo_client/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
include: package:pedantic/analysis_options.1.8.0.yaml

linter:
rules:
# -------------------
# Pedantic
# -------------------
avoid_empty_else: true
avoid_init_to_null: true
avoid_relative_lib_imports: true
avoid_return_types_on_setters: true
avoid_shadowing_type_parameters: true
avoid_types_as_parameter_names: true
curly_braces_in_flow_control_structures: true
empty_catches: true
empty_constructor_bodies: true
empty_statements: true
library_names: true
library_prefixes: true
no_duplicate_case_values: true
null_closures: true
prefer_contains: true
prefer_equal_for_default_values: true
prefer_is_empty: true
prefer_is_not_empty: true
prefer_iterable_whereType: true
recursive_getters: true
slash_for_doc_comments: true
type_init_formals: true
unawaited_futures: true
unnecessary_const: true
unnecessary_new: true
unnecessary_null_in_if_null_operators: true
unrelated_type_equality_checks: true
use_rethrow_when_possible: true
valid_regexps: true

# -------------------
# Other
# -------------------
annotate_overrides: true
avoid_bool_literals_in_conditional_expressions: true
avoid_classes_with_only_static_members: true
avoid_double_and_int_checks: true
avoid_null_checks_in_equality_operators: true
avoid_returning_null_for_void: true
avoid_returning_this: true
avoid_setters_without_getters: true
avoid_single_cascade_in_expression_statements: true
avoid_slow_async_io: true
avoid_types_on_closure_parameters: false
avoid_unused_constructor_parameters: true
avoid_void_async: true
await_only_futures: true
camel_case_types: true
cancel_subscriptions: true
close_sinks: true
comment_references: true
hash_and_equals: true
implementation_imports: true
iterable_contains_unrelated_type: true
list_remove_unrelated_type: true
literal_only_boolean_expressions: true
no_adjacent_strings_in_list: true
package_names: true
prefer_collection_literals: true
prefer_conditional_assignment: true
prefer_const_declarations: true
prefer_constructors_over_static_methods: true
prefer_function_declarations_over_variables: true
prefer_generic_function_type_aliases: true
prefer_if_null_operators: true
prefer_initializing_formals: true
prefer_null_aware_operators: true
prefer_single_quotes: true
prefer_spread_collections: true
prefer_typing_uninitialized_variables: true
provide_deprecation_message: true
test_types_in_equals: true
unnecessary_await_in_return: true
unnecessary_brace_in_string_interps: true
unnecessary_getters_setters: true
unnecessary_lambdas: true
unnecessary_null_aware_assignments: true
unnecessary_overrides: true
unnecessary_statements: true
unsafe_html: true
use_function_type_syntax_for_parameters: true
use_to_and_as_if_applicable: true
void_checks: true
10 changes: 10 additions & 0 deletions app/over_react_redux/todo_client/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
targets:
$default:
builders:
test_html_builder:
options:
templates:
"test/unit/_templates/react_test_template.html":
- "test/unit/browser/redux/**_test.dart"
"test/unit/_templates/react_components_test_template.html":
- "test/unit/browser/components/**_test.dart"
11 changes: 11 additions & 0 deletions app/over_react_redux/todo_client/dart_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
platforms:
- chrome
concurrency: 4
filename: "*_test.dart"

presets:
# Pass "-P debug" to enable debugging configuration
debug:
pause_after_load: true
exclude_tags: undebuggable
reporter: expanded
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$max-app-width: 600px;
61 changes: 61 additions & 0 deletions app/over_react_redux/todo_client/lib/sass/src/_empty_view.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
.empty-view {
margin-top: 10%;
padding: 1.5rem;
text-align: center;
color: #8a8a8a;
}

.empty-view p:last-child {
margin-bottom: 0;
}

.empty-view__message-heading {
padding: 0;
margin-top: 0;
margin-bottom: 1.6rem;
font-size: 1.8rem;
font-weight: normal;
color: inherit;
}

.empty-view__icon {
width: 8rem;
height: 8rem;
font-size: 8rem;
margin-bottom: 2rem;
color: #cbcbcb;
}

.empty-view-vblock {
display: flex;
flex: 1 1 0%;
flex-flow: column nowrap;
align-items: stretch;
justify-content: center;
height: 100%;
}

.empty-view-vblock .empty-view {
margin-top: 0;
}

.empty-view-page-frame {
height: 100vh;
overflow: hidden;
position: relative;
display: flex;
flex: 1 1 0%;
flex-direction: column;
flex-wrap: nowrap;
align-items: stretch;
justify-content: center;
}

.empty-view-page-frame > .MuiGrid-item {
max-width: none;
min-height: 0;
}

.empty-view-page-frame .empty-view {
margin-top: 0;
}
13 changes: 13 additions & 0 deletions app/over_react_redux/todo_client/lib/sass/src/_scaffolding.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
body {
overflow: hidden;
}

.app-shell,
#todo-container {
width: 100vw;
height: 100vh;
}

.hide-using-aria[aria-hidden="true"] {
visibility: hidden;
}
16 changes: 16 additions & 0 deletions app/over_react_redux/todo_client/lib/sass/src/_todo_list.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.app-content {
overflow-y: auto;
padding-top: 32px;
height: calc(100% - 32px);
}

@media screen and (min-width: 600px) {
.app-content {
overflow-y: hidden;
}

.app-content__container,
.app-content__container-grid {
height: 100%;
}
}
93 changes: 93 additions & 0 deletions app/over_react_redux/todo_client/lib/sass/styles.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions app/over_react_redux/todo_client/lib/sass/styles.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions app/over_react_redux/todo_client/lib/sass/styles.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@import 'src/constants';
@import 'src/scaffolding';
@import 'src/todo_list';
@import 'src/empty_view';
Loading