Skip to content

fix(data-table): make virtualized loader rows scroll with content#774

Closed
paanSinghCoder wants to merge 1 commit intomainfrom
feature/cld-3048-fix-datatable-loadingrows-in-virtualizedcontent
Closed

fix(data-table): make virtualized loader rows scroll with content#774
paanSinghCoder wants to merge 1 commit intomainfrom
feature/cld-3048-fix-datatable-loadingrows-in-virtualizedcontent

Conversation

@paanSinghCoder
Copy link
Copy Markdown
Contributor

@paanSinghCoder paanSinghCoder commented May 5, 2026

Loader skeleton rows in DataTable.VirtualizedContent were pinned to the bottom via position: sticky. They should scroll with the list and render at the end of the loaded rows.

Test plan

  • Open the virtualized DataTable example, trigger load-more, and confirm skeleton rows appear at the end of the list and scroll with the content (no longer pinned to the viewport bottom).

Loader skeleton rows were pinned to the bottom via position: sticky;
they should render in normal flow at the end of the list.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
apsara Ready Ready Preview, Comment May 5, 2026 9:46am

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 5, 2026

📝 Walkthrough

Walkthrough

The changes modify the data table loader component's styling and semantics. The loader container's CSS class has been renamed from stickyLoaderContainer to loaderContainer, with sticky positioning properties removed while retaining the background color styling. The component now explicitly includes role="rowgroup" to improve accessibility semantics.

Suggested reviewers

  • rohanchkrabrty
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: removing sticky positioning from loader rows so they scroll with content instead of being pinned to the viewport bottom.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The pull request description accurately describes the changeset: converting sticky-positioned loader skeleton rows to scroll with the virtualized list content.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
packages/raystack/components/data-table/components/virtualized-content.tsx (2)

171-203: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

role="rowgroup" is orphaned outside role="table" — WAI-ARIA ownership violation

VirtualLoaderRows (rendered at line 370, after the </div> that closes role="table" at line 369) adds a <div role="rowgroup"> wrapper that is not a descendant of any table, grid, or treegrid element. The WAI-ARIA spec explicitly constrains rowgroup to be contained by grid, table, or treegrid. Failing to satisfy this required-context relationship violates WCAG Success Criterion 1.3.1 and will be flagged by tools such as axe-core.

Two options:

Option A (minimal) — drop the orphaned role, since the loader container is intentionally outside the ARIA table:

♿ Proposed fix – remove invalid role
-    <div role='rowgroup' className={styles.loaderContainer}>
+    <div className={styles.loaderContainer}>

Option B (semantically correct) — move VirtualLoaderRows inside <div role="table">, after the virtualBodyGroup:

♿ Proposed fix – place loader rows inside the ARIA table
         </div>  {/* virtualBodyGroup */}
+        {showLoaderRows && (
+          <VirtualLoaderRows
+            columns={visibleColumns}
+            rowHeight={rowHeight}
+            count={loadingRowCount}
+          />
+        )}
       </div>  {/* role="table" */}
-      {showLoaderRows && (
-        <VirtualLoaderRows
-          columns={visibleColumns}
-          rowHeight={rowHeight}
-          count={loadingRowCount}
-        />
-      )}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/raystack/components/data-table/components/virtualized-content.tsx`
around lines 171 - 203, The wrapper div in VirtualLoaderRows uses
role="rowgroup" but is rendered outside the element with role="table", causing
an ARIA ownership violation; to fix, remove the invalid role attribute from the
outer div in VirtualLoaderRows (the div with className={styles.loaderContainer})
so it no longer claims rowgroup semantics when outside the table, or
alternatively move the VirtualLoaderRows JSX so it is rendered inside the
element that has role="table" (after the virtualBodyGroup) if you want to
preserve rowgroup semantics; update references to the div in
virtualized-content.tsx (the loaderContainer div and its children that map over
columns/rows) accordingly.

171-203: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

role="rowgroup" placed outside role="table" — invalid ARIA ownership

Per WAI-ARIA 1.2, rowgroup must be owned by a table, grid, or treegrid. VirtualLoaderRows is rendered after the closing tag of <div role="table"> (line 373), placing the role="rowgroup" wrapper and its role="row" / role="cell" descendants in an invalid context that screen readers may ignore or report as orphaned.

Two options:

Option A (minimal fix) — drop the role from the loader wrapper since it is intentionally outside the table:

♿ Proposed fix – remove invalid role
-    <div role='rowgroup' className={styles.loaderContainer}>
+    <div className={styles.loaderContainer}>

Option B (semantically correct) — move VirtualLoaderRows inside <div role="table">, after the virtualBodyGroup:

         </div>  {/* virtualBodyGroup */}
+        {showLoaderRows && (
+          <VirtualLoaderRows
+            columns={visibleColumns}
+            rowHeight={rowHeight}
+            count={loadingRowCount}
+          />
+        )}
       </div>  {/* role="table" */}
-      {showLoaderRows && (
-        <VirtualLoaderRows
-          columns={visibleColumns}
-          rowHeight={rowHeight}
-          count={loadingRowCount}
-        />
-      )}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/raystack/components/data-table/components/virtualized-content.tsx`
around lines 171 - 203, The loader markup currently uses role="rowgroup" (and
nested role="row"/"cell") in VirtualLoaderRows (the JSX returned in
virtualized-content.tsx), which sits outside the <div role="table"> and creates
invalid ARIA ownership; fix by either: A) minimal fix — remove the
role="rowgroup" on the outer div (and if you prefer keep semantics outside the
table, also remove role="row" and role="cell" from the child divs) so the loader
has no table ARIA roles, or B) semantic fix — move the VirtualLoaderRows render
so it is placed inside the element that uses role="table" (after
virtualBodyGroup) so the existing role="rowgroup"/"row"/"cell" attributes are
valid; update references to the component/function name (VirtualLoaderRows or
the function that returns this JSX) accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@packages/raystack/components/data-table/components/virtualized-content.tsx`:
- Around line 171-203: The wrapper div in VirtualLoaderRows uses role="rowgroup"
but is rendered outside the element with role="table", causing an ARIA ownership
violation; to fix, remove the invalid role attribute from the outer div in
VirtualLoaderRows (the div with className={styles.loaderContainer}) so it no
longer claims rowgroup semantics when outside the table, or alternatively move
the VirtualLoaderRows JSX so it is rendered inside the element that has
role="table" (after the virtualBodyGroup) if you want to preserve rowgroup
semantics; update references to the div in virtualized-content.tsx (the
loaderContainer div and its children that map over columns/rows) accordingly.
- Around line 171-203: The loader markup currently uses role="rowgroup" (and
nested role="row"/"cell") in VirtualLoaderRows (the JSX returned in
virtualized-content.tsx), which sits outside the <div role="table"> and creates
invalid ARIA ownership; fix by either: A) minimal fix — remove the
role="rowgroup" on the outer div (and if you prefer keep semantics outside the
table, also remove role="row" and role="cell" from the child divs) so the loader
has no table ARIA roles, or B) semantic fix — move the VirtualLoaderRows render
so it is placed inside the element that uses role="table" (after
virtualBodyGroup) so the existing role="rowgroup"/"row"/"cell" attributes are
valid; update references to the component/function name (VirtualLoaderRows or
the function that returns this JSX) accordingly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e35734a2-9d41-426b-b9ff-bcfd63cb8c9b

📥 Commits

Reviewing files that changed from the base of the PR and between 78b7563 and 165aab5.

📒 Files selected for processing (2)
  • packages/raystack/components/data-table/components/virtualized-content.tsx
  • packages/raystack/components/data-table/data-table.module.css

@paanSinghCoder paanSinghCoder deleted the feature/cld-3048-fix-datatable-loadingrows-in-virtualizedcontent branch May 6, 2026 02:53
@paanSinghCoder
Copy link
Copy Markdown
Contributor Author

Replaced by #776 (same diff, renamed branch).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant