rusackas commented on code in PR #43917:
URL: https://github.com/apache/superset/pull/43917#discussion_r4118835721
##########
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:
Verified this locally — the fix is real. `attrNameCell` now spans
`rowAttrs.length + 1` columns (class `pvtCornerLabel`) in place of the old
`rowAttrs`-wide spacer, so the frozen block in every thead row matches the
merged row-label span below it. Test asserts the colSpan match directly. Ran
the suite, 5/5 pass.
##########
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:
Also verified — `th.pvtRowTotalLabel` in `tr.pvtRowTotals` is sticky at
left:0 with z-index 1 now, frozen with the body row labels while the totals
values scroll underneath. Covered by the same test run, 5/5 pass.
--
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]