shubhamraj-git commented on code in PR #45205:
URL: https://github.com/apache/airflow/pull/45205#discussion_r1897680793


##########
airflow/ui/src/pages/Variables/VariableAction.tsx:
##########
@@ -0,0 +1,66 @@
+/*!
+ * 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.
+ */
+// TODO: Disable lint will be removed once the implementation completed
+
+/* eslint-disable no-alert */
+import { IconButton } from "@chakra-ui/react";
+import { FiEdit, FiEye, FiMoreVertical, FiTrash } from "react-icons/fi";
+
+import { Menu } from "../../components/ui/Menu";
+
+type VariableActionsProps = {
+  readonly variableKey: string;
+};
+
+export const VariableActions = ({ variableKey }: VariableActionsProps) => (
+  <Menu.Root>
+    <Menu.Trigger asChild>
+      <IconButton aria-label="Action menu" variant="ghost">
+        <FiMoreVertical />
+      </IconButton>
+    </Menu.Trigger>
+
+    <Menu.Content>
+      <Menu.Item
+        onClick={() =>
+          alert(`To be implemented: Selected key is ${variableKey}`)

Review Comment:
   Ohh okay.
   
   So view is also an action component which the legacy UI had it on the 
variables list page, where when user clicked it, they get to see the details, 
such as key, values and description. 
   
   Now columns in the legacy ui had a fix width, so any of the content 
overflowing was truncated and ended with three dots (...) , so to see overall 
content user had to use the view action button.
   
   Now in the new UI, tables have horizontal scrolling available. So all the 
data gets printed on the list page itself, since no width restrictions. In my 
opinion this will be a problem, since keys supports 250 chars and other two 
parameter value and description supports more than key also. This will not 
allow page to look good. So I think we need restrict the width, block 
horizontal scrolling and have a view button. What would you say?



-- 
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]

Reply via email to