rusackas commented on code in PR #43917:
URL: https://github.com/apache/superset/pull/43917#discussion_r3943091282
##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/Styles.ts:
##########
@@ -39,6 +39,20 @@ export const Styles = styled.div<{ isDashboardEditMode:
boolean }>`
top: 0;
}
+ /* 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 final header row. Needs a
+ * higher z-index than .pvtRowLabel so it stays on top when both
+ * stick at the same scroll position. */
+ table.pvtTable thead tr:first-of-type th[aria-hidden='true'],
+ table.pvtTable thead tr:last-of-type th.pvtAxisLabel {
+ position: ${isDashboardEditMode ? 'inherit' : 'sticky'};
+ top: 0;
+ left: 0;
+ z-index: 2;
Review Comment:
Good catch, thanks @sadpandajoe. The corner cell's `z-index` was trapped
inside the thead's own stacking context. Moved the `z-index` onto `thead` (and
`tr.pvtRowTotals`, same problem on the bottom edge) so the bands themselves
outrank the row labels.
##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/Styles.ts:
##########
@@ -120,6 +134,10 @@ export const Styles = styled.div<{ isDashboardEditMode:
boolean }>`
table.pvtTable tbody tr th.pvtRowLabel {
vertical-align: baseline;
+ position: ${isDashboardEditMode ? 'inherit' : 'sticky'};
+ left: 0;
+ z-index: 1;
+ background-color: ${theme.colorBgBase};
}
Review Comment:
Yep, they should. Restated `.active` and `.hoverable:hover` for the frozen
cells so they win again. The hover tint goes on as a `background-image` over
the opaque base, otherwise the translucent fill token lets scrolled-under cells
show through.
##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/Styles.ts:
##########
@@ -39,6 +39,20 @@ export const Styles = styled.div<{ isDashboardEditMode:
boolean }>`
top: 0;
}
+ /* 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 final header row. Needs a
+ * higher z-index than .pvtRowLabel so it stays on top when both
+ * stick at the same scroll position. */
+ table.pvtTable thead tr:first-of-type th[aria-hidden='true'],
+ table.pvtTable thead tr:last-of-type th.pvtAxisLabel {
Review Comment:
Right, with no row dimensions that selector was grabbing the column
attribute name. The renderer tags the row-header `<tr>` as `pvtRowHeaderRow`
(it only renders when there are row dims) and the corner rule keys off that.
Added a columns-only fixture that checks nothing in the thead freezes.
--
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]