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


##########
superset-frontend/src/components/Datasource/DatasourceModal/index.tsx:
##########
@@ -45,23 +45,14 @@ const DatasourceEditor = AsyncEsmComponent(
 );
 
 const StyledDatasourceModal = styled(Modal)`
-  .modal-content {
+  && .ant-modal-content {
     height: 900px;
-    display: flex;
-    flex-direction: column;
-    align-items: stretch;
   }

Review Comment:
   **Suggestion:** The modal body is given flex properties, but its parent 
`.ant-modal-content` is not a flex container, so the body's `flex: 1 1 auto` 
has no effect; this breaks the intended flex chain and can prevent the body 
(and nested tabs/folders) from correctly filling the 900px height, 
reintroducing layout/scroll issues. Make `.ant-modal-content` a flex container 
with column direction so the body can expand as intended. [logic error]
   
   <details>
   <summary><b>Severity Level:</b> Major ⚠️</summary>
   
   ```mdx
   - ❌ Dataset edit modal body does not expand to 900px.
   - ⚠️ Folders tab may show unnecessary inner scrollbars.
   - ⚠️ Layout inconsistency versus previous flex-based modal behavior.
   ```
   </details>
   
   ```suggestion
       display: flex;
       flex-direction: column;
       align-items: stretch;
   ```
   <details>
   <summary><b>Steps of Reproduction ✅ </b></summary>
   
   ```mdx
   1. Start the Superset frontend with this PR applied and navigate to any page 
that opens
   the dataset edit modal as described in the PR ("Open dataset modal" – 
implemented by
   `DatasourceModal` in
   `superset-frontend/src/components/Datasource/DatasourceModal/index.tsx`).
   
   2. Open the dataset edit modal; in the Elements panel, locate the top-level 
modal content
   element rendered by Ant Design (`.ant-modal-content`) that corresponds to
   `StyledDatasourceModal` (defined at lines 47–60 in `index.tsx`).
   
   3. Inspect the computed styles for `.ant-modal-content`: from 
`StyledDatasourceModal` it
   only receives `height: 900px` (line 48) and no `display: flex`, so it 
remains a non-flex
   container; then inspect `.ant-modal-body`, which has `flex: 1 1 auto; 
display: flex;
   flex-direction: column;` from lines 52–55.
   
   4. Because `.ant-modal-content` is not a flex (or grid) container, the 
`flex: 1 1 auto` on
   `.ant-modal-body` has no effect as a flex item; the body's height is 
determined purely by
   its content instead of expanding within the fixed 900px content height, 
which in practice
   causes the inner Datasource editor (including the Folders tab) not to 
reliably fill the
   available vertical space, reintroducing extra inner scrolling/whitespace 
that this PR is
   meant to eliminate.
   ```
   </details>
   <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/DatasourceModal/index.tsx
   **Line:** 50:50
   **Comment:**
        *Logic Error: The modal body is given flex properties, but its parent 
`.ant-modal-content` is not a flex container, so the body's `flex: 1 1 auto` 
has no effect; this breaks the intended flex chain and can prevent the body 
(and nested tabs/folders) from correctly filling the 900px height, 
reintroducing layout/scroll issues. Make `.ant-modal-content` a flex container 
with column direction so the body can expand as intended.
   
   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.
   ```
   </details>
   <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F38123&comment_hash=fe1bf15dd3ab64e485f143deac43c7aa05fdb3d91989e8b61cf2872207a4a70d&reaction=like'>👍</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F38123&comment_hash=fe1bf15dd3ab64e485f143deac43c7aa05fdb3d91989e8b61cf2872207a4a70d&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