rusackas commented on code in PR #43917:
URL: https://github.com/apache/superset/pull/43917#discussion_r4139052121
##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.tsx:
##########
@@ -911,8 +901,21 @@ export function TableRenderer(props: TableRendererProps) {
subArrow =
attrIdx + 1 < maxColVisible! ? arrowExpanded : arrowCollapsed;
}
+ // With row dimensions, the corner block above the frozen row labels
+ // is rowAttrs.length + 1 columns wide: the row-attribute columns plus
+ // the padding column that renderTableRow folds into the last row
+ // label. Span the column-attribute name across that whole block so a
+ // single sticky cell freezes it, rather than a rowAttrs-wide spacer
+ // that leaves the name's own column scrolling through the corner.
+ const hasRowAttrs = settingsRowAttrs.length !== 0;
const attrNameCell = (
- <th key="label" className="pvtAxisLabel">
+ <th
+ key="label"
+ className={
+ hasRowAttrs ? 'pvtAxisLabel pvtCornerLabel' : 'pvtAxisLabel'
+ }
+ colSpan={hasRowAttrs ? settingsRowAttrs.length + 1 : undefined}
Review Comment:
This whole table uses `role="grid"`, not native table semantics, and nothing
in it sets `scope`/`headers` anywhere else either, so bolting it onto just this
one cell wouldn't really fix the association model. A real a11y pass on the
grid's header relationships feels like separate work from a sticky-positioning
fix.
##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.tsx:
##########
@@ -911,8 +901,21 @@ export function TableRenderer(props: TableRendererProps) {
subArrow =
attrIdx + 1 < maxColVisible! ? arrowExpanded : arrowCollapsed;
}
+ // With row dimensions, the corner block above the frozen row labels
+ // is rowAttrs.length + 1 columns wide: the row-attribute columns plus
+ // the padding column that renderTableRow folds into the last row
+ // label. Span the column-attribute name across that whole block so a
+ // single sticky cell freezes it, rather than a rowAttrs-wide spacer
Review Comment:
Fixed, both comments now call out that this only holds for a single row
dimension since `canFreezeRowLabels` falls back to non-sticky otherwise.
--
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]