Skip to content

fix: render data table separators as table cells#29793

Open
AlgoArtist06 wants to merge 2 commits into
calcom:mainfrom
AlgoArtist06:agent/fix-separator-row-dom
Open

fix: render data table separators as table cells#29793
AlgoArtist06 wants to merge 2 commits into
calcom:mainfrom
AlgoArtist06:agent/fix-separator-row-dom

Conversation

@AlgoArtist06

@AlgoArtist06 AlgoArtist06 commented Jul 17, 2026

Copy link
Copy Markdown

What does this PR do?

Data table separator rows currently place a <div> directly inside a <tr>, producing React DOM-nesting warnings and risking hydration differences. This change renders the separator as a semantic table cell while preserving its styling, and extracts the renderer for focused regression coverage.

Visual Demo (For contributors especially)

N/A — no visual change. The rendered separator element changes from <div> to <td>.

How should this be tested?

  • No environment variables or test data are required.
  • Run yarn vitest run apps/web/modules/data-table/components/SeparatorRowRenderer.test.tsx.
  • Expected: the separator label is rendered in a <td> whose parent is the table <tr>.
  • Full validation: NODE_OPTIONS=--max-old-space-size=8192 yarn type-check:ci --force

@github-actions github-actions Bot added the 🐛 bug Something isn't working label Jul 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Welcome to Cal.diy, @AlgoArtist06! Thanks for opening this pull request.

A few things to keep in mind:

  • This is Cal.diy, not Cal.com. Cal.diy is a community-driven, fully open-source fork of Cal.com licensed under MIT. Your changes here will be part of Cal.diy — they will not be deployed to the Cal.com production app.
  • Please review our Contributing Guidelines if you haven't already.
  • Make sure your PR title follows the Conventional Commits format.

A maintainer will review your PR soon. Thanks for contributing!

@AlgoArtist06

Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Extracts separator-row rendering from DataTable.tsx into a reusable SeparatorRowRenderer component. The component renders a styled table cell using separator and optional class names, and DataTableBody now uses the imported component. A React Testing Library test verifies the separator label appears within a td inside a tr.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR replaces the invalid
with valid table markup, addressing the warning and hydration risk in #28184.
Out of Scope Changes check ✅ Passed The changes stay focused on the separator renderer and its regression test, with no unrelated scope evident.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title accurately summarizes the main change: separator rows now render as table cells.
Description check ✅ Passed The description matches the change set and explains the table-cell fix, regression test, and issue link.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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.

Inline comments:
In `@apps/web/modules/data-table/components/SeparatorRowRenderer.tsx`:
- Line 3: Update the TableCell import in SeparatorRowRenderer.tsx to use the
direct TableNew source module instead of the `@calcom/ui/components/table` barrel
import.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 01c4a89a-a8d9-4381-82a6-495ad7f7e250

📥 Commits

Reviewing files that changed from the base of the PR and between f004349 and 996bcac.

📒 Files selected for processing (3)
  • apps/web/modules/data-table/components/DataTable.tsx
  • apps/web/modules/data-table/components/SeparatorRowRenderer.test.tsx
  • apps/web/modules/data-table/components/SeparatorRowRenderer.tsx

Comment thread apps/web/modules/data-table/components/SeparatorRowRenderer.tsx Outdated
@AlgoArtist06

Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@AlgoArtist06
AlgoArtist06 marked this pull request as ready for review July 17, 2026 07:21
@CLAassistant

CLAassistant commented Jul 23, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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

Labels

🐛 bug Something isn't working size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SeparatorRowRenderer renders <div> inside <tr>, causing invalid DOM nesting warning

2 participants