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


##########
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}`}>
+        <div className="paired-ttest-table">
+          <div className="scrollbar-content">

Review Comment:
   **Suggestion:** The scroll wrapper class used by the stylesheet is no longer 
rendered, so the `overflow: auto` rule never applies and wide t-test tables can 
no longer scroll. Restore the `.scrollbar-container` wrapper (or retarget the 
CSS selector to an element that actually exists) so overflow behavior matches 
the previous component. [css layout issue]
   
   <details>
   <summary><b>Severity Level:</b> Major ⚠️</summary>
   
   ```mdx
   - ❌ Paired t-test Explore view truncates wide metric tables.
   - ⚠️ Paired t-test alerts/reports show clipped non-scrollable tables.
   ```
   </details>
   <details>
   <summary><b>Steps of Reproduction ✅ </b></summary>
   
   ```mdx
   1. In the Explore view, create or open a chart with viz type 
`VizType.PairedTTest`, which
   is registered via `new PairedTTestChartPlugin().configure({ key: 
VizType.PairedTTest })`
   in `superset-frontend/src/visualizations/presets/MainPreset.ts:135` 
(confirmed by Grep).
   
   2. At runtime the PairedTTest plugin loads `PairedTTest` from
   
`superset-frontend/plugins/legacy-plugin-chart-paired-t-test/src/index.ts:41-48`
 using
   `loadChart: () => import('./PairedTTest')`, so the React component in 
`PairedTTest.tsx` is
   what renders the table layout.
   
   3. Inspect the rendered DOM or the JSX in `PairedTTest.tsx:120-137`, which 
shows the
   structure: `<div className="superset-legacy-chart-paired-t-test">` → `<div
   className="paired-ttest-table">` → `<div className="scrollbar-content">` 
without any
   element using the `scrollbar-container` class.
   
   4. The styled wrapper at `PairedTTest.tsx:34-38` defines `overflow: auto` 
only on
   `.superset-legacy-chart-paired-t-test .scrollbar-container`, and a search for
   `scrollbar-container` in the codebase
   
(`superset-frontend/plugins/legacy-plugin-chart-paired-t-test/src/PairedTTest.tsx:36`
 via
   Grep) shows no corresponding DOM element, so the overflow rule never 
applies; when the
   t-test table rendered by `TTestTable` is wider than its container, the user 
cannot scroll
   horizontally and columns are clipped.
   ```
   </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=89e95aefd80a4603b38aa17871424896&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=89e95aefd80a4603b38aa17871424896&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:** 36:123
   **Comment:**
        *Css Layout Issue: The scroll wrapper class used by the stylesheet is 
no longer rendered, so the `overflow: auto` rule never applies and wide t-test 
tables can no longer scroll. Restore the `.scrollbar-container` wrapper (or 
retarget the CSS selector to an element that actually exists) so overflow 
behavior matches the previous component.
   
   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=7d8cfb88e02f9e02a77510f25b74461f8eed5dd66ef1afee827282f19e8bb82b&reaction=like'>👍</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F39452&comment_hash=7d8cfb88e02f9e02a77510f25b74461f8eed5dd66ef1afee827282f19e8bb82b&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