codeant-ai-for-open-source[bot] commented on code in PR #39257:
URL: https://github.com/apache/superset/pull/39257#discussion_r3651599402


##########
superset-frontend/src/components/Datasource/components/DatasourceEditor/DatasourceEditor.tsx:
##########
@@ -2372,7 +2431,11 @@ function DatasourceEditor({
         label: (
           <CollectionTabTitle collection={sortedMetrics} title={t('Metrics')} 
/>
         ),
-        children: renderMetricCollection(),
+        children: (
+          <StyledTableTabWrapper className="wide-sql-layout">

Review Comment:
   **Suggestion:** The Metrics tab is wrapped in the wide layout, but its SQL 
expression cell is not assigned the `datasource-sql-cell` class and still has 
the existing inline `maxWidth` of 240px. As a result, the metrics SQL editor 
remains constrained instead of receiving the wider layout described by this 
change. Remove the fixed inline width and apply the wide-layout cell styling to 
the metrics expression column. [logic error]
   
   <details>
   <summary><b>Severity Level:</b> Major ⚠️</summary>
   
   ```mdx
   - ⚠️ Metrics SQL editors remain narrowly constrained.
   - ⚠️ Dataset metric editing misses the PR’s wider-layout usability 
improvement.
   ```
   </details>
   <details>
   <summary><b>Steps of Reproduction ✅ </b></summary>
   
   ```mdx
   1. Open the Datasets edit flow, which renders `DatasourceEditor` in
   
`superset-frontend/src/components/Datasource/components/DatasourceEditor/DatasourceEditor.tsx`.
   
   2. Select the Metrics tab; the tab content is wrapped by 
`StyledTableTabWrapper
   className="wide-sql-layout"` at line 2435 and renders 
`renderMetricCollection()` at line
   2436.
   
   3. Inspect the metrics collection configuration at lines 2297-2305: the 
`expression` cell
   receives only an inline `maxWidth: '240px'` style and is not assigned the
   `datasource-sql-cell` class.
   
   4. Observe that the `.wide-sql-layout .datasource-sql-cell` rules at lines 
406-409
   therefore do not apply, so the Metrics SQL expression editor remains 
constrained to
   approximately 240px while the Calculated Columns editor receives the wider 
layout.
   ```
   </details>
   
   [![Fix in 
Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=c78ab24d0cf04bdd96b814feb9eaec93&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
 [![Fix in VSCode 
Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=c78ab24d0cf04bdd96b814feb9eaec93&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent 🤖 </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** 
superset-frontend/src/components/Datasource/components/DatasourceEditor/DatasourceEditor.tsx
   **Line:** 2435:2435
   **Comment:**
        *Logic Error: The Metrics tab is wrapped in the wide layout, but its 
SQL expression cell is not assigned the `datasource-sql-cell` class and still 
has the existing inline `maxWidth` of 240px. As a result, the metrics SQL 
editor remains constrained instead of receiving the wider layout described by 
this change. Remove the fixed inline width and apply the wide-layout cell 
styling to the metrics expression column.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve 
this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask 
user if the user wants to fix the rest of the comments as well. if said yes, 
then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F39257&comment_hash=cd7030216cbb88e6f2050770f8cc1d0f7c902d3d14131579127bb58ac4881641&reaction=like'>👍</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F39257&comment_hash=cd7030216cbb88e6f2050770f8cc1d0f7c902d3d14131579127bb58ac4881641&reaction=dislike'>👎</a>



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