-
Notifications
You must be signed in to change notification settings - Fork 4.5k
[BEAM-13064] [Playground] Implement search & filter logic #15768
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
Conversation
# Conflicts: # playground/frontend/lib/pages/playground/components/playground_page_providers.dart # playground/frontend/lib/pages/playground/states/playground_state.dart # playground/frontend/pubspec.lock # playground/frontend/pubspec.yaml
…(added const keyword)
|
cc: @pabloem |
# Conflicts: # playground/frontend/test/modules/editor/repository/code_repository/code_repository_test.mocks.dart
# Conflicts: # playground/frontend/lib/constants/sizes.dart # playground/frontend/lib/pages/playground/playground_page.dart
# Conflicts: # playground/frontend/lib/constants/sizes.dart # playground/frontend/lib/modules/examples/components/example_list/example_list.dart # playground/frontend/lib/modules/examples/components/filter/category_bubble.dart # playground/frontend/lib/modules/examples/components/filter/type_filter.dart # playground/frontend/lib/modules/examples/components/search_field/search_field.dart # playground/frontend/lib/modules/examples/example_selector.dart # playground/frontend/lib/modules/examples/models/category_model.dart # playground/frontend/lib/modules/examples/models/example_model.dart # playground/frontend/lib/modules/examples/repositories/example_repository.dart # playground/frontend/lib/modules/sdk/components/sdk_selector.dart # playground/frontend/lib/pages/playground/playground_page.dart # playground/frontend/lib/pages/playground/states/examples_state.dart
…tions (#83) * Update workflows for playground * Attempt to fix tests * Remove continue on error to catch errors * Fix linter problem for backend dockerfile * Update folder to run backend go linter * Moved flutter test to execution via gradle tasks
damondouglas
left a comment
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.
Hello @miamihotline, after deleting any existing playground/frontend/build directory and running ./gradlew playgroundPrecommit, I receive the following output:
> Task :playground:frontend:pubGet
Running "flutter pub get" in frontend... 2,512ms
> Task :playground:frontend:analyze
Analyzing ....
info - lib/pages/playground/playground_page.dart:32:8 - Duplicate import. Try removing all but one import of the library. - duplicate_import
info - lib/pages/playground/playground_page.dart:33:8 - Duplicate import. Try removing all but one import of the library. - duplicate_import
info - lib/pages/playground/playground_page.dart:34:8 - Duplicate import. Try removing all but one import of the library. - duplicate_import
info - lib/pages/playground/playground_page.dart:35:8 - Duplicate import. Try removing all but one import of the library. - duplicate_import
info - lib/pages/playground/playground_page.dart:36:8 - Duplicate import. Try removing all but one import of the library. - duplicate_import
info - lib/pages/playground/playground_page.dart:37:8 - Duplicate import. Try removing all but one import of the library. - duplicate_import
info - lib/pages/playground/playground_page.dart:38:8 - Duplicate import. Try removing all but one import of the library. - duplicate_import
7 issues found.
> Task :playground:frontend:test
00:24 +2: /usr/local/google/home/damondouglas/projects/beam/playground/frontend/test/pages/playground/states/example_selector_state_test.dart: ExampleSelector state sortCategories should:- update categories and notify all listeners,but should NOT:- wait for full name of example,- be sensitive for register,- affect Example state categories
══╡ EXCEPTION CAUGHT BY FOUNDATION LIBRARY ╞════════════════════════════════════════════════════════
The following TestFailure object was thrown while dispatching notifications for
ExampleSelectorState:
Expected: [Instance of 'CategoryModel']
Actual: [Instance of 'CategoryModel']
Which: at location [0] is <Instance of 'CategoryModel'> instead of <Instance of 'CategoryModel'>
When the exception was thrown, this was the stack:
#0 fail (package:test_api/src/expect/expect.dart:137:31)
#1 _expect (package:test_api/src/expect/expect.dart:132:3)
#2 expect (package:test_api/src/expect/expect.dart:46:3)
#3 expect (package:flutter_test/src/widget_tester.dart:461:3)
#4 main.<anonymous closure>.<anonymous closure> (file:///usr/local/google/home/damondouglas/projects/beam/playground/frontend/test/pages/playground/states/example_selector_state_test.dart:65:7)
#5 ChangeNotifier.notifyListeners (package:flutter/src/foundation/change_notifier.dart:308:24)
#6 ExampleSelectorState.setCategories (package:playground/pages/playground/states/example_selector_state.dart:54:5)
#7 ExampleSelectorState.sortCategories (package:playground/pages/playground/states/example_selector_state.dart:64:5)
#8 main.<anonymous closure> (file:///usr/local/google/home/damondouglas/projects/beam/playground/frontend/test/pages/playground/states/example_selector_state_test.dart:68:11)
#9 Declarer.test.<anonymous closure>.<anonymous closure> (package:test_api/src/backend/declarer.dart:199:19)
<asynchronous suspension>
<asynchronous suspension>
(elided one frame from package:stack_trace)
The ExampleSelectorState sending notification was:
Instance of 'ExampleSelectorState'
════════════════════════════════════════════════════════════════════════════════════════════════════
Hello, @damondouglas , thank you for reviewing, I fixed analyze issues 5 mins ago |
damondouglas
left a comment
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.
Thank you, @miamihotline, I see the following output. I ran flutter test in the playground/frontend directory. I'm wondering if
the code for expect(state.categories, sortedCategories); should be changed?
00:04 +2: beam/playground/frontend/test/pages/playground/states/example_selector_state_test.dart: ExampleSelector state sortCategories should:- update categories and notify all listeners,but should NOT:- wait for full name of example,- be sensitive for register,- affect Example state categories
══╡ EXCEPTION CAUGHT BY FOUNDATION LIBRARY ╞════════════════════════════════════════════════════════
The following TestFailure object was thrown while dispatching notifications for
ExampleSelectorState:
Expected: [Instance of 'CategoryModel']
Actual: [Instance of 'CategoryModel']
Which: at location [0] is <Instance of 'CategoryModel'> instead of <Instance of 'CategoryModel'>
When the exception was thrown, this was the stack:
#0 fail (package:test_api/src/expect/expect.dart:137:31)
#1 _expect (package:test_api/src/expect/expect.dart:132:3)
#2 expect (package:test_api/src/expect/expect.dart:46:3)
#3 expect (package:flutter_test/src/widget_tester.dart:461:3)
#4 main.<anonymous closure>.<anonymous closure> (beam/playground/frontend/test/pages/playground/states/example_selector_state_test.dart:65:7)
#5 ChangeNotifier.notifyListeners (package:flutter/src/foundation/change_notifier.dart:308:24)
#6 ExampleSelectorState.setCategories (package:playground/pages/playground/states/example_selector_state.dart:54:5)
#7 ExampleSelectorState.sortCategories (package:playground/pages/playground/states/example_selector_state.dart:64:5)
#8 main.<anonymous closure> (beam/playground/frontend/test/pages/playground/states/example_selector_state_test.dart:68:11)
#9 Declarer.test.<anonymous closure>.<anonymous closure> (package:test_api/src/backend/declarer.dart:199:19)
<asynchronous suspension>
<asynchronous suspension>
(elided one frame from package:stack_trace)
The ExampleSelectorState sending notification was:
Instance of 'ExampleSelectorState'
|
@damondouglas Thank you for pointing that out, fixed this problem |
# Conflicts: # playground/frontend/lib/modules/editor/repository/code_repository/code_client/grpc_code_client.dart
damondouglas
left a comment
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.
@pabloem LGTM
Implemented sorting functionality to Example Selector widget.
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
R: @username).[BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replaceBEAM-XXXwith the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.CHANGES.mdwith noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
ValidatesRunnercompliance status (on master branch)Examples testing status on various runners
Post-Commit SDK/Transform Integration Tests Status (on master branch)
Pre-Commit Tests Status (on master branch)
See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI.