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


##########
superset-frontend/plugins/legacy-plugin-chart-paired-t-test/src/PairedTTest.tsx:
##########
@@ -114,35 +107,37 @@ const StyledDiv = styled.div`
   `}
 `;
 
-class PairedTTest extends PureComponent<PairedTTestProps> {
-  static defaultProps = defaultProps;
-
-  render() {
-    const { className, metrics, groups, data, alpha, pValPrec, liftValPrec } =
-      this.props;
-
-    return (
-      <StyledDiv>
-        <div className={`superset-legacy-chart-paired-t-test ${className}`}>
-          <div className="paired-ttest-table">
-            <div className="scrollbar-content">
-              {metrics.map((metric, i) => (
-                <TTestTable
-                  key={i}
-                  metric={metric}
-                  groups={groups}
-                  data={data[metric]}
-                  alpha={alpha}
-                  pValPrec={Math.min(pValPrec, 32)}
-                  liftValPrec={Math.min(liftValPrec, 32)}
-                />
-              ))}
-            </div>
+function PairedTTest({
+  alpha = 0.05,
+  className = '',
+  data,
+  groups,
+  liftValPrec = 4,
+  metrics,
+  pValPrec = 6,
+}: PairedTTestProps) {
+  return (
+    <StyledDiv>
+      <div className={`superset-legacy-chart-paired-t-test ${className}`}>

Review Comment:
   **Suggestion:** The wrapper class name uses 
`superset-legacy-chart-paired-t-test`, but the styled rules in this same file 
target `superset-legacy-chart-paired_ttest`; this selector mismatch prevents 
the intended container overflow styling from applying. Use a single consistent 
class name in both the markup and CSS selector. [css layout issue]
   
   <details>
   <summary><b>Severity Level:</b> Major ⚠️</summary>
   
   ```mdx
   ❌ PairedTTest visualization overflow styling broken for all renders.
   ⚠️ Alerts and Reports using VizType.PairedTTest show clipping.
   ```
   </details>
   <details>
   <summary><b>Steps of Reproduction ✅ </b></summary>
   
   ```mdx
   1. Open Superset and create or edit a chart using viz type 
`VizType.PairedTTest` (plugin
   registration visible in 
`superset-frontend/src/visualizations/presets/MainPreset.ts:6-16`
   where `PairedTTestChartPlugin` is imported and used).
   
   2. When the chart renders, the React component `PairedTTest` in
   
`superset-frontend/plugins/legacy-plugin-chart-paired-t-test/src/PairedTTest.tsx:110-139`
   returns a wrapper div with class `superset-legacy-chart-paired-t-test` (line 
121).
   
   3. The same file defines CSS-in-JS rules in `StyledDiv` at 
`PairedTTest.tsx:34-38`
   targeting `.superset-legacy-chart-paired_ttest .scrollbar-container { 
overflow: auto; }`,
   which expects a class name `superset-legacy-chart-paired_ttest` (underscore) 
on an
   ancestor of `.scrollbar-container`.
   
   4. Inspect the chart DOM in browser devtools: the container has class
   `superset-legacy-chart-paired-t-test`, so the 
`.superset-legacy-chart-paired_ttest
   .scrollbar-container` selector never matches, and the intended `overflow: 
auto` styling is
   not applied, causing the Paired T-Test table to lack the expected scroll 
behavior when
   content overflows.
   ```
   </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=45529db21be849e5b93a842cfde4c500&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=45529db21be849e5b93a842cfde4c500&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/plugins/legacy-plugin-chart-paired-t-test/src/PairedTTest.tsx
   **Line:** 121:121
   **Comment:**
        *Css Layout Issue: The wrapper class name uses 
`superset-legacy-chart-paired-t-test`, but the styled rules in this same file 
target `superset-legacy-chart-paired_ttest`; this selector mismatch prevents 
the intended container overflow styling from applying. Use a single consistent 
class name in both the markup and CSS selector.
   
   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%2F39452&comment_hash=01027067dade5b4532bc52804fbfd88c16508bba1f41285347c8c167fa50b035&reaction=like'>👍</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F39452&comment_hash=01027067dade5b4532bc52804fbfd88c16508bba1f41285347c8c167fa50b035&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