Skip to content

fix(platform): apply column widths to data table body cells#1115

Merged
yannickmonney merged 1 commit into
mainfrom
fix/1111-customer-table-column-widths
Apr 8, 2026
Merged

fix(platform): apply column widths to data table body cells#1115
yannickmonney merged 1 commit into
mainfrom
fix/1111-customer-table-column-widths

Conversation

@yannickmonney
Copy link
Copy Markdown
Contributor

@yannickmonney yannickmonney commented Apr 8, 2026

Summary

  • Fixes On the customer list, name and email merged #1111
  • Adds inline width styles to <TableCell> elements in both data rows and skeleton rows of the data-table component, matching the existing pattern on <TableHead> header cells
  • After the recent split of name+email into separate customer table columns, the missing cell widths caused columns to visually merge

Test plan

  • Added 2 new tests verifying column widths are applied to data and skeleton cells
  • All 14 data-table tests pass
  • Lint and typecheck pass
  • Verify customer table displays name and email in distinct columns

Summary by CodeRabbit

  • Bug Fixes

    • Fixed data table column width styling to properly apply explicit width definitions to both skeleton rows (during loading) and actual data rows.
  • Tests

    • Added test coverage for column width styling functionality.

Add inline width styles to <TableCell> elements in both data rows and
skeleton rows, mirroring the existing pattern on <TableHead> header
cells. This fixes merged/collapsed columns (e.g. customer name+email)
when explicit column sizes are defined.

Closes #1111
Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@yannickmonney yannickmonney merged commit f8eca85 into main Apr 8, 2026
21 of 23 checks passed
@yannickmonney yannickmonney deleted the fix/1111-customer-table-column-widths branch April 8, 2026 08:09
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 8, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: f0fc7ab8-48af-452c-81ac-7546a8b83374

📥 Commits

Reviewing files that changed from the base of the PR and between daa845d and 8db618f.

📒 Files selected for processing (2)
  • services/platform/app/components/ui/data-table/data-table.test.tsx
  • services/platform/app/components/ui/data-table/data-table.tsx

📝 Walkthrough

Walkthrough

This pull request addresses a column layout issue in the DataTable component by implementing explicit width styling for table cells. The test file introduces a new columnsWithSize fixture with predefined column sizes and adds test cases verifying that both data rows and skeleton rows apply inline width styles based on column size properties. The implementation updates both skeleton row and data row cell rendering to conditionally apply inline style.width when the column's size differs from the default value of 150px.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/1111-customer-table-column-widths

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.

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.

On the customer list, name and email merged

1 participant