bito-code-review[bot] commented on code in PR #42009:
URL: https://github.com/apache/superset/pull/42009#discussion_r3578671282


##########
superset-frontend/src/features/datasets/AddDataset/DatasetPanel/DatasetPanel.tsx:
##########
@@ -235,6 +236,11 @@ const renderExistingDatasetAlert = (dataset?: 
DatasetObject) => (
               openInNewTab(stripAppRoot(dataset.explore_url));
             }
           }}
+          onKeyDown={handleKeyboardActivation(() => {
+            if (dataset?.explore_url) {
+              openInNewTab(stripAppRoot(dataset.explore_url));
+            }
+          })}

Review Comment:
   <!-- Bito Reply -->
   The suggestion to extract the duplicate logic into a shared `openExplore` 
function is appropriate. It improves maintainability by centralizing the logic 
for opening the explore URL, ensuring consistency between the `onClick` and 
`onKeyDown` handlers.
   
   
**superset-frontend/src/features/datasets/AddDataset/DatasetPanel/DatasetPanel.tsx**
   ```
   const openExplore = () => {
     if (dataset?.explore_url) {
       openInNewTab(stripAppRoot(dataset.explore_url));
     }
   };
   ```



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to