Malarg commented on code in PR #25397:
URL: https://github.com/apache/beam/pull/25397#discussion_r1108376180
##########
playground/frontend/playground_components/lib/src/controllers/code_runner.dart:
##########
@@ -122,8 +135,21 @@ class CodeRunner extends ChangeNotifier {
}
Future<void> cancelRun() async {
+ final hasInternet = (await Connectivity().checkConnectivity()).isConnected;
+ if (!hasInternet) {
+ _result = RunCodeResult(
+ status: _result?.status ?? RunCodeStatus.unspecified,
+ output: _result?.output,
+ log: _result?.log ?? '',
+ errorMessage: 'errors.internetUnavailable'.tr(),
+ graph: _result?.graph,
+ );
+ notifyListeners();
+ return;
+ }
+
snippetEditingController = null;
- await _runSubscription?.cancel();
+ unawaited(_runSubscription?.cancel());
Review Comment:
done
##########
playground/frontend/lib/modules/examples/components/filter/filter.dart:
##########
@@ -77,22 +78,29 @@ class _Types extends StatelessWidget {
}
class _Tags extends StatelessWidget {
- const _Tags();
+ final ScrollController scrollController = ScrollController();
Review Comment:
done
##########
playground/frontend/lib/pages/standalone_playground/notifiers/example_selector_state.dart:
##########
@@ -47,14 +47,28 @@ class ExampleSelectorState with ChangeNotifier {
void addSelectedTag(String tag) {
selectedTags.add(tag);
+ _sortTagsBySelected();
notifyListeners();
}
void removeSelectedTag(String tag) {
selectedTags.remove(tag);
+ _sortTagsBySelected();
notifyListeners();
}
+ void _sortTagsBySelected() {
+ tags.sort((a, b) {
+ if (selectedTags.contains(a) && !selectedTags.contains(b)) {
+ return -1;
+ } else if (!selectedTags.contains(a) && selectedTags.contains(b)) {
+ return 1;
+ } else {
+ return 0;
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]