korbit-ai[bot] commented on code in PR #33357:
URL: https://github.com/apache/superset/pull/33357#discussion_r2074007003


##########
superset-frontend/plugins/plugin-chart-table/src/DataTable/components/SearchSelectDropdown.tsx:
##########
@@ -0,0 +1,51 @@
+/**
+ * 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.
+ */
+/* eslint-disable import/no-extraneous-dependencies */
+import { styled } from '@superset-ui/core';
+import { Select } from 'antd';
+import { SearchOption } from '../../types';
+
+const StyledSelect = styled(Select)`
+  width: 120px;
+  margin-right: 8px;
+`;
+
+interface SearchSelectDropdownProps {
+  value?: string;
+  onChange: (searchCol: string) => void;
+  searchOptions: SearchOption[];
+}
+
+function SearchSelectDropdown({
+  value,
+  onChange,
+  searchOptions,
+}: SearchSelectDropdownProps) {
+  return (
+    <StyledSelect
+      value={value || searchOptions?.[0]?.value}

Review Comment:
   ### Unsafe Fallback Value Logic <sub>![category 
Functionality](https://img.shields.io/badge/Functionality-0284c7)</sub>
   
   <details>
     <summary>Tell me more</summary>
   
   ###### What is the issue?
   The fallback value logic may fail if searchOptions is an empty array, 
leading to a potential undefined value being assigned.
   
   ###### Why this matters
   If searchOptions is empty and no value is provided, the component will 
attempt to use undefined as a value for the Select component, which could cause 
unexpected behavior or errors.
   
   ###### Suggested change ∙ *Feature Preview*
   Add a safer fallback value check:
   ```typescript
   value={value || (searchOptions?.[0]?.value ?? '')}
   ```
   
   
   ###### Provide feedback to improve future suggestions
   [![Nice 
Catch](https://img.shields.io/badge/👍%20Nice%20Catch-71BC78)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/5eb1b1bc-eafd-4b5c-9f51-a24e1748da37/upvote)
 
[![Incorrect](https://img.shields.io/badge/👎%20Incorrect-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/5eb1b1bc-eafd-4b5c-9f51-a24e1748da37?what_not_true=true)
  [![Not in 
Scope](https://img.shields.io/badge/👎%20Out%20of%20PR%20scope-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/5eb1b1bc-eafd-4b5c-9f51-a24e1748da37?what_out_of_scope=true)
 [![Not in coding 
standard](https://img.shields.io/badge/👎%20Not%20in%20our%20standards-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/5eb1b1bc-eafd-4b5c-9f51-a24e1748da37?what_not_in_standard=true)
 
[![Other](https://img.shields.io/badge/👎%20Other-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/5eb1b1bc-eafd-4b5c-9f51-a24e1748da37)
   </details>
   
   <sub>
   
   💬 Looking for more details? Reply to this comment to chat with Korbit.
   </sub>
   
   <!--- korbi internal id:8ed47c1e-12ff-4272-a4fc-b7bda99f6207 -->
   
   
   [](8ed47c1e-12ff-4272-a4fc-b7bda99f6207)



##########
superset-frontend/plugins/plugin-chart-table/src/DataTable/components/SearchSelectDropdown.tsx:
##########
@@ -0,0 +1,51 @@
+/**
+ * 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.
+ */
+/* eslint-disable import/no-extraneous-dependencies */
+import { styled } from '@superset-ui/core';
+import { Select } from 'antd';
+import { SearchOption } from '../../types';
+
+const StyledSelect = styled(Select)`
+  width: 120px;
+  margin-right: 8px;

Review Comment:
   ### Hard-coded style values <sub>![category 
Readability](https://img.shields.io/badge/Readability-0284c7)</sub>
   
   <details>
     <summary>Tell me more</summary>
   
   ###### What is the issue?
   Hard-coded numeric values in the styled component without clear meaning or 
explanation.
   
   ###### Why this matters
   Magic numbers make the code less maintainable and harder to understand the 
purpose of specific values.
   
   ###### Suggested change ∙ *Feature Preview*
   ```typescript
   const SELECT_WIDTH = 120;
   const SELECT_MARGIN = 8;
   
   const StyledSelect = styled(Select)`
     width: ${SELECT_WIDTH}px;
     margin-right: ${SELECT_MARGIN}px;
   `;
   ```
   
   
   ###### Provide feedback to improve future suggestions
   [![Nice 
Catch](https://img.shields.io/badge/👍%20Nice%20Catch-71BC78)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/404c79b1-9ee4-4e82-b9be-567ca1decf07/upvote)
 
[![Incorrect](https://img.shields.io/badge/👎%20Incorrect-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/404c79b1-9ee4-4e82-b9be-567ca1decf07?what_not_true=true)
  [![Not in 
Scope](https://img.shields.io/badge/👎%20Out%20of%20PR%20scope-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/404c79b1-9ee4-4e82-b9be-567ca1decf07?what_out_of_scope=true)
 [![Not in coding 
standard](https://img.shields.io/badge/👎%20Not%20in%20our%20standards-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/404c79b1-9ee4-4e82-b9be-567ca1decf07?what_not_in_standard=true)
 
[![Other](https://img.shields.io/badge/👎%20Other-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/404c79b1-9ee4-4e82-b9be-567ca1decf07)
   </details>
   
   <sub>
   
   💬 Looking for more details? Reply to this comment to chat with Korbit.
   </sub>
   
   <!--- korbi internal id:0ad272ca-db93-437b-aa20-e52b2eb59f15 -->
   
   
   [](0ad272ca-db93-437b-aa20-e52b2eb59f15)



##########
superset-frontend/plugins/plugin-chart-table/src/DataTable/components/SearchSelectDropdown.tsx:
##########
@@ -0,0 +1,51 @@
+/**
+ * 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.
+ */
+/* eslint-disable import/no-extraneous-dependencies */
+import { styled } from '@superset-ui/core';
+import { Select } from 'antd';
+import { SearchOption } from '../../types';
+
+const StyledSelect = styled(Select)`
+  width: 120px;
+  margin-right: 8px;
+`;
+
+interface SearchSelectDropdownProps {
+  value?: string;
+  onChange: (searchCol: string) => void;
+  searchOptions: SearchOption[];
+}
+
+function SearchSelectDropdown({
+  value,
+  onChange,
+  searchOptions,
+}: SearchSelectDropdownProps) {
+  return (
+    <StyledSelect
+      value={value || searchOptions?.[0]?.value}
+      options={searchOptions}
+      onChange={(value: string) => {
+        onChange(value);
+      }}

Review Comment:
   ### Unnecessarily verbose event handler <sub>![category 
Readability](https://img.shields.io/badge/Readability-0284c7)</sub>
   
   <details>
     <summary>Tell me more</summary>
   
   ###### What is the issue?
   The onChange handler is unnecessarily verbose with a wrapper arrow function 
that only passes the value through.
   
   ###### Why this matters
   Adding unnecessary layers of function wrapping makes the code more difficult 
to read at a glance and adds cognitive overhead.
   
   ###### Suggested change ∙ *Feature Preview*
   ```typescript
   onChange={onChange}
   ```
   
   
   ###### Provide feedback to improve future suggestions
   [![Nice 
Catch](https://img.shields.io/badge/👍%20Nice%20Catch-71BC78)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/f095dcc3-7020-4d7d-b97e-f9719d924ac5/upvote)
 
[![Incorrect](https://img.shields.io/badge/👎%20Incorrect-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/f095dcc3-7020-4d7d-b97e-f9719d924ac5?what_not_true=true)
  [![Not in 
Scope](https://img.shields.io/badge/👎%20Out%20of%20PR%20scope-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/f095dcc3-7020-4d7d-b97e-f9719d924ac5?what_out_of_scope=true)
 [![Not in coding 
standard](https://img.shields.io/badge/👎%20Not%20in%20our%20standards-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/f095dcc3-7020-4d7d-b97e-f9719d924ac5?what_not_in_standard=true)
 
[![Other](https://img.shields.io/badge/👎%20Other-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/f095dcc3-7020-4d7d-b97e-f9719d924ac5)
   </details>
   
   <sub>
   
   💬 Looking for more details? Reply to this comment to chat with Korbit.
   </sub>
   
   <!--- korbi internal id:ba5796d2-7a55-4918-89ab-b3d106703933 -->
   
   
   [](ba5796d2-7a55-4918-89ab-b3d106703933)



##########
superset-frontend/plugins/plugin-chart-table/src/DataTable/components/GlobalFilter.tsx:
##########
@@ -16,34 +16,55 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import { memo, ComponentType, ChangeEventHandler } from 'react';
+import {
+  memo,
+  ComponentType,
+  ChangeEventHandler,
+  useRef,
+  useEffect,
+} from 'react';
 import { Row, FilterValue } from 'react-table';
 import useAsyncState from '../utils/useAsyncState';
 
 export interface SearchInputProps {
   count: number;
   value: string;
   onChange: ChangeEventHandler<HTMLInputElement>;
+  onBlur?: () => void;
+  inputRef?: React.RefObject<HTMLInputElement>;
 }
 
+const isSearchFocused = new Map();

Review Comment:
   ### Global State Map Memory Leak <sub>![category 
Performance](https://img.shields.io/badge/Performance-4f46e5)</sub>
   
   <details>
     <summary>Tell me more</summary>
   
   ###### What is the issue?
   Using a global Map to track focus state across multiple instances can lead 
to memory leaks and state persistence issues
   
   ###### Why this matters
   When multiple table instances are created and destroyed, the focus states in 
the Map will persist, potentially causing incorrect focus behavior and memory 
leaks as the Map retains references to destroyed components
   
   ###### Suggested change ∙ *Feature Preview*
   Move the focus state into component state using useState or into a React 
context if sharing between components is needed:
   ```typescript
   function GlobalFilter<D extends object>({ ... }) {
     const [isSearchFocused, setIsSearchFocused] = useState(false);
   
     const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
       const target = e.target as HTMLInputElement;
       e.preventDefault();
       setIsSearchFocused(true);
       setValue(target.value);
     };
   
     const handleBlur = () => {
       setIsSearchFocused(false);
     };
     
     useEffect(() => {
       if (
         serverPagination &&
         isSearchFocused &&
         document.activeElement !== inputRef.current
       ) {
         inputRef.current?.focus();
       }
     }, [value]);
   }
   ```
   
   
   ###### Provide feedback to improve future suggestions
   [![Nice 
Catch](https://img.shields.io/badge/👍%20Nice%20Catch-71BC78)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/dcf8c8fe-e2d1-4163-b221-851ca94458cc/upvote)
 
[![Incorrect](https://img.shields.io/badge/👎%20Incorrect-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/dcf8c8fe-e2d1-4163-b221-851ca94458cc?what_not_true=true)
  [![Not in 
Scope](https://img.shields.io/badge/👎%20Out%20of%20PR%20scope-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/dcf8c8fe-e2d1-4163-b221-851ca94458cc?what_out_of_scope=true)
 [![Not in coding 
standard](https://img.shields.io/badge/👎%20Not%20in%20our%20standards-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/dcf8c8fe-e2d1-4163-b221-851ca94458cc?what_not_in_standard=true)
 
[![Other](https://img.shields.io/badge/👎%20Other-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/dcf8c8fe-e2d1-4163-b221-851ca94458cc)
   </details>
   
   <sub>
   
   💬 Looking for more details? Reply to this comment to chat with Korbit.
   </sub>
   
   <!--- korbi internal id:62d6fd32-9f9f-42db-8322-01722025e799 -->
   
   
   [](62d6fd32-9f9f-42db-8322-01722025e799)



##########
superset-frontend/plugins/plugin-chart-table/src/DataTable/utils/externalAPIs.ts:
##########
@@ -30,3 +30,11 @@ export const updateExternalFormData = (
       pageSize,
     },
   });
+
+export const updateTableOwnState = (
+  setDataMask: SetDataMaskHook = () => {},

Review Comment:
   ### Unclear default function implementation <sub>![category 
Readability](https://img.shields.io/badge/Readability-0284c7)</sub>
   
   <details>
     <summary>Tell me more</summary>
   
   ###### What is the issue?
   The default empty function implementation obscures the purpose of the 
setDataMask parameter and its expected behavior.
   
   ###### Why this matters
   While providing defaults can be helpful, in this case it makes it less clear 
that this is a required callback for updating the data mask state.
   
   ###### Suggested change ∙ *Feature Preview*
   Remove the default implementation and make the parameter required:
   ```typescript
   export const updateTableOwnState = (
     setDataMask: SetDataMaskHook,
     modifiedOwnState: TableOwnState,
   )
   ```
   
   
   ###### Provide feedback to improve future suggestions
   [![Nice 
Catch](https://img.shields.io/badge/👍%20Nice%20Catch-71BC78)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/9685ffa4-8a01-4f9c-92e7-15a58a9b434d/upvote)
 
[![Incorrect](https://img.shields.io/badge/👎%20Incorrect-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/9685ffa4-8a01-4f9c-92e7-15a58a9b434d?what_not_true=true)
  [![Not in 
Scope](https://img.shields.io/badge/👎%20Out%20of%20PR%20scope-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/9685ffa4-8a01-4f9c-92e7-15a58a9b434d?what_out_of_scope=true)
 [![Not in coding 
standard](https://img.shields.io/badge/👎%20Not%20in%20our%20standards-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/9685ffa4-8a01-4f9c-92e7-15a58a9b434d?what_not_in_standard=true)
 
[![Other](https://img.shields.io/badge/👎%20Other-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/9685ffa4-8a01-4f9c-92e7-15a58a9b434d)
   </details>
   
   <sub>
   
   💬 Looking for more details? Reply to this comment to chat with Korbit.
   </sub>
   
   <!--- korbi internal id:2f0e5a6f-85b7-4ae9-89e4-e15cc15b8277 -->
   
   
   [](2f0e5a6f-85b7-4ae9-89e4-e15cc15b8277)



##########
superset-frontend/plugins/plugin-chart-table/src/DataTable/utils/externalAPIs.ts:
##########
@@ -30,3 +30,11 @@
       pageSize,
     },
   });
+
+export const updateTableOwnState = (
+  setDataMask: SetDataMaskHook = () => {},
+  modifiedOwnState: object,

Review Comment:
   ### Overly permissive object type for table state <sub>![category 
Functionality](https://img.shields.io/badge/Functionality-0284c7)</sub>
   
   <details>
     <summary>Tell me more</summary>
   
   ###### What is the issue?
   Using the generic 'object' type is too permissive and could allow invalid 
state updates to pass through type checking.
   
   ###### Why this matters
   Without proper type constraints, the function might accept invalid state 
properties that could cause runtime errors or unexpected behavior in the table 
component.
   
   ###### Suggested change ∙ *Feature Preview*
   Define a specific interface for the table state and use it to type the 
parameter:
   ```typescript
   interface TableOwnState {
     currentPage?: number;
     pageSize?: number;
     sortColumn?: string;
     sortOrder?: 'asc' | 'desc';
     searchText?: string;
   }
   
   export const updateTableOwnState = (
     setDataMask: SetDataMaskHook = () => {},
     modifiedOwnState: Partial<TableOwnState>,
   ) =>
     setDataMask({
       ownState: modifiedOwnState,
     });
   ```
   
   
   ###### Provide feedback to improve future suggestions
   [![Nice 
Catch](https://img.shields.io/badge/👍%20Nice%20Catch-71BC78)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/55601b5f-a270-49de-93cd-f2dd20bf9742/upvote)
 
[![Incorrect](https://img.shields.io/badge/👎%20Incorrect-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/55601b5f-a270-49de-93cd-f2dd20bf9742?what_not_true=true)
  [![Not in 
Scope](https://img.shields.io/badge/👎%20Out%20of%20PR%20scope-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/55601b5f-a270-49de-93cd-f2dd20bf9742?what_out_of_scope=true)
 [![Not in coding 
standard](https://img.shields.io/badge/👎%20Not%20in%20our%20standards-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/55601b5f-a270-49de-93cd-f2dd20bf9742?what_not_in_standard=true)
 
[![Other](https://img.shields.io/badge/👎%20Other-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/55601b5f-a270-49de-93cd-f2dd20bf9742)
   </details>
   
   <sub>
   
   💬 Looking for more details? Reply to this comment to chat with Korbit.
   </sub>
   
   <!--- korbi internal id:51455ccf-29a9-4d8a-aa9a-4bbddf8dcd2c -->
   
   
   [](51455ccf-29a9-4d8a-aa9a-4bbddf8dcd2c)



##########
superset-frontend/plugins/plugin-chart-table/src/DataTable/components/GlobalFilter.tsx:
##########
@@ -66,17 +92,37 @@
     200,
   );
 
+  // Only preserve focus if search is focused for this instance
+  useEffect(() => {
+    if (
+      serverPagination &&
+      isSearchFocused.get(id) &&
+      document.activeElement !== inputRef.current
+    ) {
+      inputRef.current?.focus();
+    }
+  }, [value, id]);

Review Comment:
   ### Inefficient Focus Effect Dependencies <sub>![category 
Performance](https://img.shields.io/badge/Performance-4f46e5)</sub>
   
   <details>
     <summary>Tell me more</summary>
   
   ###### What is the issue?
   The useEffect hook runs on every value change, potentially causing 
unnecessary focus checks and DOM manipulations.
   
   ###### Why this matters
   Frequent re-renders and DOM operations can impact performance, especially 
with rapid value changes during typing.
   
   ###### Suggested change ∙ *Feature Preview*
   Optimize the effect dependencies to only run when necessary:
   ```typescript
   useEffect(() => {
     if (serverPagination && isSearchFocused && document.activeElement !== 
inputRef.current) {
       inputRef.current?.focus();
     }
   }, [serverPagination, isSearchFocused]);
   ```
   
   
   ###### Provide feedback to improve future suggestions
   [![Nice 
Catch](https://img.shields.io/badge/👍%20Nice%20Catch-71BC78)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/b5279421-9afe-447a-bfec-26922e56a880/upvote)
 
[![Incorrect](https://img.shields.io/badge/👎%20Incorrect-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/b5279421-9afe-447a-bfec-26922e56a880?what_not_true=true)
  [![Not in 
Scope](https://img.shields.io/badge/👎%20Out%20of%20PR%20scope-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/b5279421-9afe-447a-bfec-26922e56a880?what_out_of_scope=true)
 [![Not in coding 
standard](https://img.shields.io/badge/👎%20Not%20in%20our%20standards-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/b5279421-9afe-447a-bfec-26922e56a880?what_not_in_standard=true)
 
[![Other](https://img.shields.io/badge/👎%20Other-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/b5279421-9afe-447a-bfec-26922e56a880)
   </details>
   
   <sub>
   
   💬 Looking for more details? Reply to this comment to chat with Korbit.
   </sub>
   
   <!--- korbi internal id:4d8fbec2-b6d8-4279-99d1-39d8dbbc5576 -->
   
   
   [](4d8fbec2-b6d8-4279-99d1-39d8dbbc5576)



##########
superset-frontend/plugins/plugin-chart-table/src/DataTable/components/SearchSelectDropdown.tsx:
##########
@@ -0,0 +1,51 @@
+/**
+ * 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.
+ */
+/* eslint-disable import/no-extraneous-dependencies */
+import { styled } from '@superset-ui/core';
+import { Select } from 'antd';
+import { SearchOption } from '../../types';
+
+const StyledSelect = styled(Select)`
+  width: 120px;
+  margin-right: 8px;
+`;
+
+interface SearchSelectDropdownProps {
+  value?: string;
+  onChange: (searchCol: string) => void;
+  searchOptions: SearchOption[];
+}

Review Comment:
   ### Missing Interface Property Documentation <sub>![category 
Documentation](https://img.shields.io/badge/Documentation-7c3aed)</sub>
   
   <details>
     <summary>Tell me more</summary>
   
   ###### What is the issue?
   The interface lacks documentation explaining the purpose of its properties 
and their constraints.
   
   ###### Why this matters
   Without clear property descriptions, other developers may misuse the 
component or need to investigate the implementation to understand the expected 
values and behaviors.
   
   ###### Suggested change ∙ *Feature Preview*
   ```typescript
   interface SearchSelectDropdownProps {
     /** The currently selected search column value */
     value?: string;
     /** Callback triggered when a new search column is selected */
     onChange: (searchCol: string) => void;
     /** Available search column options to populate the dropdown */
     searchOptions: SearchOption[];
   }
   ```
   
   
   ###### Provide feedback to improve future suggestions
   [![Nice 
Catch](https://img.shields.io/badge/👍%20Nice%20Catch-71BC78)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/85b419a7-5e76-4925-8bad-1bbbf50e5cab/upvote)
 
[![Incorrect](https://img.shields.io/badge/👎%20Incorrect-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/85b419a7-5e76-4925-8bad-1bbbf50e5cab?what_not_true=true)
  [![Not in 
Scope](https://img.shields.io/badge/👎%20Out%20of%20PR%20scope-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/85b419a7-5e76-4925-8bad-1bbbf50e5cab?what_out_of_scope=true)
 [![Not in coding 
standard](https://img.shields.io/badge/👎%20Not%20in%20our%20standards-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/85b419a7-5e76-4925-8bad-1bbbf50e5cab?what_not_in_standard=true)
 
[![Other](https://img.shields.io/badge/👎%20Other-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/85b419a7-5e76-4925-8bad-1bbbf50e5cab)
   </details>
   
   <sub>
   
   💬 Looking for more details? Reply to this comment to chat with Korbit.
   </sub>
   
   <!--- korbi internal id:617f046b-dc7c-43f3-bb9b-d4c7a6e05aaf -->
   
   
   [](617f046b-dc7c-43f3-bb9b-d4c7a6e05aaf)



##########
superset-frontend/plugins/plugin-chart-table/src/DataTable/components/GlobalFilter.tsx:
##########
@@ -66,17 +92,37 @@
     200,
   );
 
+  // Only preserve focus if search is focused for this instance
+  useEffect(() => {

Review Comment:
   ### Incomplete useEffect documentation <sub>![category 
Documentation](https://img.shields.io/badge/Documentation-7c3aed)</sub>
   
   <details>
     <summary>Tell me more</summary>
   
   ###### What is the issue?
   The useEffect comment doesn't explain why focus preservation is needed.
   
   ###### Why this matters
   Without understanding the rationale, developers might remove this seemingly 
unnecessary focus management code.
   
   ###### Suggested change ∙ *Feature Preview*
   // Preserve focus during server-side filtering to maintain a better user 
experience
   useEffect(() => {
   
   
   ###### Provide feedback to improve future suggestions
   [![Nice 
Catch](https://img.shields.io/badge/👍%20Nice%20Catch-71BC78)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/3f5b9090-40d5-4350-955a-47aa26c88960/upvote)
 
[![Incorrect](https://img.shields.io/badge/👎%20Incorrect-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/3f5b9090-40d5-4350-955a-47aa26c88960?what_not_true=true)
  [![Not in 
Scope](https://img.shields.io/badge/👎%20Out%20of%20PR%20scope-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/3f5b9090-40d5-4350-955a-47aa26c88960?what_out_of_scope=true)
 [![Not in coding 
standard](https://img.shields.io/badge/👎%20Not%20in%20our%20standards-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/3f5b9090-40d5-4350-955a-47aa26c88960?what_not_in_standard=true)
 
[![Other](https://img.shields.io/badge/👎%20Other-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/3f5b9090-40d5-4350-955a-47aa26c88960)
   </details>
   
   <sub>
   
   💬 Looking for more details? Reply to this comment to chat with Korbit.
   </sub>
   
   <!--- korbi internal id:42dd487b-0bff-4195-a7f4-46a5a48c0f1e -->
   
   
   [](42dd487b-0bff-4195-a7f4-46a5a48c0f1e)



##########
superset/views/base.py:
##########
@@ -109,6 +109,8 @@
     "JWT_ACCESS_CSRF_COOKIE_NAME",
     "SQLLAB_QUERY_RESULT_TIMEOUT",
     "SYNC_DB_PERMISSIONS_IN_ASYNC_MODE",
+    "TABLE_VIZ_MAX_ROW_CLIENT",
+    "TABLE_VIZ_MAX_ROW_SERVER",

Review Comment:
   ### Ambiguous constant names <sub>![category 
Readability](https://img.shields.io/badge/Readability-0284c7)</sub>
   
   <details>
     <summary>Tell me more</summary>
   
   ###### What is the issue?
   The newly added constants have ambiguous names that don't clearly convey 
their purpose - whether they represent a limit, threshold, or other value.
   
   ###### Why this matters
   Developers will need to look elsewhere in the codebase to understand what 
these constants control, reducing code readability and maintainability.
   
   ###### Suggested change ∙ *Feature Preview*
   Rename to more descriptive names like:
   ```python
   "TABLE_VIZ_CLIENT_SIDE_ROW_LIMIT",
   "TABLE_VIZ_SERVER_SIDE_ROW_LIMIT",
   ```
   
   
   ###### Provide feedback to improve future suggestions
   [![Nice 
Catch](https://img.shields.io/badge/👍%20Nice%20Catch-71BC78)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/7ee0cc10-0f5f-4b8b-8ad1-20e7e722855b/upvote)
 
[![Incorrect](https://img.shields.io/badge/👎%20Incorrect-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/7ee0cc10-0f5f-4b8b-8ad1-20e7e722855b?what_not_true=true)
  [![Not in 
Scope](https://img.shields.io/badge/👎%20Out%20of%20PR%20scope-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/7ee0cc10-0f5f-4b8b-8ad1-20e7e722855b?what_out_of_scope=true)
 [![Not in coding 
standard](https://img.shields.io/badge/👎%20Not%20in%20our%20standards-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/7ee0cc10-0f5f-4b8b-8ad1-20e7e722855b?what_not_in_standard=true)
 
[![Other](https://img.shields.io/badge/👎%20Other-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/7ee0cc10-0f5f-4b8b-8ad1-20e7e722855b)
   </details>
   
   <sub>
   
   💬 Looking for more details? Reply to this comment to chat with Korbit.
   </sub>
   
   <!--- korbi internal id:9164ddf8-9ad5-4269-80b8-cdc27daff3c3 -->
   
   
   [](9164ddf8-9ad5-4269-80b8-cdc27daff3c3)



-- 
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: notifications-unsubscr...@superset.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to