You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/08/10 07:11:45 UTC

[GitHub] [beam] alexeyinkin commented on a diff in pull request #22477: [Playground] Share any code feature frontend

alexeyinkin commented on code in PR #22477:
URL: https://github.com/apache/beam/pull/22477#discussion_r942097577


##########
playground/frontend/lib/modules/editor/components/share_dropdown/share_dropdown_body.dart:
##########
@@ -0,0 +1,58 @@
+/*
+ * 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 'package:playground/modules/editor/components/share_dropdown/share_tabs/share_tabs.dart';
+import 'package:playground/modules/editor/components/share_dropdown/share_tabs_headers.dart';
+import 'package:playground/modules/output/components/output_header/tab_header.dart';
+
+const _kTabsCount = 2;
+
+class ShareDropdownBody extends StatefulWidget {
+  const ShareDropdownBody({super.key});
+
+  @override
+  State<ShareDropdownBody> createState() => _ShareDropdownBodyState();
+}
+
+class _ShareDropdownBodyState extends State<ShareDropdownBody>
+    with SingleTickerProviderStateMixin {
+  late final tabController = TabController(vsync: this, length: _kTabsCount);
+
+  @override
+  void dispose() {
+    tabController.dispose();
+    super.dispose();
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    return Column(
+      crossAxisAlignment: CrossAxisAlignment.start,
+      children: [
+        TabHeader(
+          tabController: tabController,
+          tabsWidget: ShareTabsHeaders(tabController: tabController),
+        ),
+        Expanded(
+          child: ShareTabs(tabController: tabController),

Review Comment:
   I made it before starting the work at Akvelon, and it gained 58% popularity before that. We can technically fork it to the Akvelon repo, but then it will split the user base with no clear benefit.
   
   Also we do use other packages by 3rd parties:
   https://pub.dev/packages/aligned_dialog
   https://pub.dev/packages/expansion_widget
   https://pub.dev/packages/highlight
   
   and do not attempt to own them although the last one is nearly abandoned (there's just no alternative).
   Although we are forking https://pub.dev/packages/code_text_field to take ownership of the new text editor features.
   
   I would prefer not using `keyed_collection_widgets` at all than forking, as the fork would weaken maintainability.



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org