Malarg commented on code in PR #24283:
URL: https://github.com/apache/beam/pull/24283#discussion_r1034355929
##########
playground/frontend/lib/pages/embedded_playground/components/embedded_actions.dart:
##########
@@ -58,16 +59,26 @@ class EmbeddedActions extends StatelessWidget {
void _openStandalonePlayground(PlaygroundController controller) {
// The empty list forces the parsing of EmptyExampleLoadingDescriptor
// and prevents the glimpse of the default catalog example.
+
+ final loadingDescriptor = controller.getLoadingDescriptor();
+ final contentDescriptor =
+ loadingDescriptor.whereType<ContentExampleLoadingDescriptor>();
+ final standardDescriptor =
+ loadingDescriptor.whereType<StandardExampleLoadingDescriptor>();
Review Comment:
fixed
##########
playground/frontend/playground_components/lib/src/controllers/snippet_editing_controller.dart:
##########
@@ -99,9 +101,12 @@ class SnippetEditingController extends ChangeNotifier {
/// Creates an [ExampleLoadingDescriptor] that can recover the
/// current content.
ExampleLoadingDescriptor getLoadingDescriptor() {
- // TODO: Return other classes for unchanged standard examples,
- // user-shared examples, and an empty editor,
- // https://github.com/apache/beam/issues/23252
+ if (codeController.fullText.isEmpty) {
+ return EmptyExampleLoadingDescriptor(sdk: sdk);
+ }
+ if (selectedExample != null && !isChanged) {
+ return StandardExampleLoadingDescriptor(path: _selectedExample!.path);
Review Comment:
fixed
--
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]