rusackas commented on code in PR #43917:
URL: https://github.com/apache/superset/pull/43917#discussion_r3975988815


##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/Styles.ts:
##########
@@ -33,10 +33,30 @@ export const Styles = styled.div<{ isDashboardEditMode: 
boolean }>`
       line-height: 1.4;
     }
 
+    /* The sticky thead and totals row each form their own stacking
+     * context, so a z-index on a cell inside them can't outrank the
+     * frozen row labels (z-index 1) in the body. The bands themselves
+     * carry the z-index that keeps them painting over row labels
+     * scrolling underneath. */
     table thead {
       background-color: ${theme.colorBgBase};
       position: ${isDashboardEditMode ? 'inherit' : 'sticky'};
       top: 0;
+      z-index: 2;
+    }
+
+    /* Corner cell(s) sitting above the frozen row-label column: the
+     * placeholder cell spanning the column-attribute rows, and the
+     * row-attribute name cell(s) in the row-header row (which only
+     * renders when there are row dimensions). The z-index keeps them
+     * over the column labels scrolling underneath within the thead. */
+    table.pvtTable thead tr:first-of-type th[aria-hidden='true'],

Review Comment:
   Good catch, fixed in d2487a7d8f1f939c51d03dcc8111076d62ffcee8: dropped the 
rowAttrs-wide spacer and gave the column-attribute name cell a colSpan of 
rowAttrs + 1 (tagged `pvtCornerLabel`, sticky at left 0), so the frozen block 
in every thead row spans the same columns as the merged row label below it. The 
test asserts the corner colSpan matches the row label.



##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/Styles.ts:
##########
@@ -55,6 +75,7 @@ export const Styles = styled.div<{ isDashboardEditMode: 
boolean }>`
     table.pvtTable tbody tr.pvtRowTotals {

Review Comment:
   Yep, it should. Fixed in d2487a7d8f1f939c51d03dcc8111076d62ffcee8: 
`th.pvtRowTotalLabel` is sticky at left 0 with z-index 1 inside the totals 
row's own stacking context, so it stays frozen with the body row labels and the 
totals values scroll under it.



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