feat: hierarchical sticky rows for expandable Table rows (AWSUI-59346)#4819
Draft
ernst-dev wants to merge 2 commits into
Draft
feat: hierarchical sticky rows for expandable Table rows (AWSUI-59346)#4819ernst-dev wants to merge 2 commits into
ernst-dev wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4819 +/- ##
=======================================
Coverage 97.61% 97.61%
=======================================
Files 952 953 +1
Lines 30816 30840 +24
Branches 11318 11325 +7
=======================================
+ Hits 30081 30105 +24
Misses 688 688
Partials 47 47 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ernst-dev
had a problem deploying
to
allure-report
July 23, 2026 16:27 — with
GitHub Actions
Failure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
[WIP / v0] First-cut implementation of hierarchical sticky rows for expandable (tree) Tables — SIM
AWSUI-59346.When enabled, expanded ancestor (parent) rows stay stuck to the top of the table while the user scrolls through their descendant rows — like sticky section headers that reflect the current position in the hierarchy. Each expanded level stacks directly below the sticky header as you scroll deeper.
This is an opt-in, additive enhancement built on top of the existing
expandableRows+stickyHeadermachinery and the browser's nativeposition: sticky. No existing behavior changes when the flag is off.What's implemented (v0 — done)
TableProps.ExpandableRows.stickyAncestorRows?: boolean(with JSDoc). Effective only together withstickyHeader.src/table/sticky-ancestor-rows/index.ts:getStickyAncestorRowOffset()— pure helper computing each level'sinset-block-startoffset (header offset +(level-1) * rowHeight), with input normalization/clamping.useStickyAncestorRows()— hook that measures the header height (reusing the existing thead ref +useResizeObserver) and returns per-row class + inline offset/z-index props. Deeper levels get a lower z-index so shallower ancestors win overlaps.internal.tsxwiring: expanded data rows receive the sticky class + inline offset. Leaf/collapsed rows and the disabled case are untouched..sticky-ancestor-row(guarded by@supports (position: sticky)), cells get a background so scrolled content doesn't bleed through.pages/table/hierarchical-sticky-rows.page.tsx(4-level deep tree, toggle to enable/disable).src/table/__tests__/sticky-ancestor-rows.test.tsx(8 tests — pure-helper math + render assertions that the class is applied only to expanded parents and only when enabled).Remaining work (NOT in this WIP)
DEFAULT_STICKY_ANCESTOR_ROW_HEIGHT(40px) estimate; wrapped content / custom vertical alignment can cause slight overlap. Needs per-row/level measurement.position: stickyon<tr>has cross-browser quirks; likely move stickiness to the<td>cells (as sticky-columns does) for robustness.rowHeight/ offset config, and behavior whenstickyHeaderis false.Related links, issue #, if available: SIM
AWSUI-59346(Cloudscape feature request: "Hierarchical sticky rows for expandable table rows")How has this been tested?
eslint— clean on all changed/new files.quick-build— success.build(production) — success (documenter/component-definitions regenerated).table.test.tsx+expandable-rows.test.tsx(48 tests) green; documenter snapshot suite (97 tests) green.table/hierarchical-sticky-rowswith a 4-level tree and an enable/disable toggle. Automated cross-browser/visual testing is deferred (see remaining work).Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
position: stickyguarded by@supports; cross-browser hardening is follow-up.Security
Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.