codeant-ai-for-open-source[bot] commented on code in PR #38745:
URL: https://github.com/apache/superset/pull/38745#discussion_r2969379176
##########
superset-frontend/src/components/Modal/StandardModal.tsx:
##########
@@ -130,6 +132,7 @@ export function StandardModal({
show={show}
width={`${width}px`}
wrapProps={wrapProps}
+ resizable={resizable}
Review Comment:
**Suggestion:** The `centered` prop is defined with a default of `true` but
never forwarded to the underlying modal, so dialogs are rendered with the base
modal default instead of being centered as intended. [logic error]
<details>
<summary><b>Severity Level:</b> Major ⚠️</summary>
```mdx
- ⚠️ StandardModal dialogs ignore intended centered default behavior.
- ⚠️ Modal positioning inconsistent across dashboard and explore flows.
```
</details>
```suggestion
centered={centered}
```
<details>
<summary><b>Steps of Reproduction ✅ </b></summary>
```mdx
1. Open any `StandardModal` consumer (e.g. dashboard properties at
`superset-frontend/src/dashboard/components/PropertiesModal/index.tsx:621`,
explore
properties at
`superset-frontend/src/explore/components/PropertiesModal/index.tsx:324`,
refresh interval at
`superset-frontend/src/dashboard/components/RefreshIntervalModal.tsx:113`).
2. `StandardModal` sets `centered = true` by default in props destructuring
at
`superset-frontend/src/components/Modal/StandardModal.tsx:115`.
3. The prop is never forwarded to underlying `Modal`
(`StandardModal.tsx:125-136`), so
downstream `Modal` receives `centered` as undefined.
4. Core modal applies `centered={!!centered}` at
`superset-frontend/packages/superset-ui-core/src/components/Modal/Modal.tsx:119`,
so
undefined becomes false and dialogs render non-centered.
```
</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/Modal/StandardModal.tsx
**Line:** 135:135
**Comment:**
*Logic Error: The `centered` prop is defined with a default of `true`
but never forwarded to the underlying modal, so dialogs are rendered with the
base modal default instead of being centered 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%2F38745&comment_hash=64024b719b00efda73e606efc83bfc6d22e95d14b2596520b5cfb467dab191d6&reaction=like'>👍</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F38745&comment_hash=64024b719b00efda73e606efc83bfc6d22e95d14b2596520b5cfb467dab191d6&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]