Skip to content

Add a badges slot to DataTable columns - #225

Open
andrewhuhh wants to merge 3 commits into
mainfrom
feat/data-table-cell-badges
Open

andrewhuhh wants to merge 3 commits into
mainfrom
feat/data-table-cell-badges

Conversation

@andrewhuhh

@andrewhuhh andrewhuhh commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

A DataTable cell ellipsizes plain text, but a value with something after it (a status badge, or an info icon with a tooltip) needs a flex row. Each table built that row by hand, with inline overflow, text-overflow and flex-shrink styles, and a cell that missed one of them clipped its icon or lost its name.

DataTableColumn now takes badges: (row, index) => ReactNode, rendered right after the value through NameLine. Under pressure, badges with collapse shrink first. Then a long value truncates with an ellipsis down to a 12-character floor, and only then do the badges clip. The value's text title and the cell's mono and wrap options work as before.

The table page's narrow-cells example now uses the slot instead of its own flex row and truncate class. Desktop baselines are unchanged. At 390px the name column is only 64px wide, so the long imported row keeps its name and drops the badge, where before it showed the clipped badge and no name:

Before After
Before After

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@infisical-review-police

Copy link
Copy Markdown

💬 Discussion in Slack: #pr-review-cipher-225-add-a-badges-slot-to-datatable-columns

Posted by Review Police — reviews, comments, new commits, and CI failures will stream into this channel.

@capy-ai capy-ai 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.

Capy found 1 potential issue (1 medium).

View 1 other finding in Capy.

Open in Capy

Comment thread src/ui/data-table.tsx Resolved
@greptile-apps

greptile-apps Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

Adds a badges slot to DataTable columns and uses NameLine to keep badges beside truncated values.

  • DataTable columns can show badges after their values.

All three supplied previous findings are addressed. No new actionable issues were found.

Reviews (3) · Last reviewed commit: "Keep a badge column's cell structure the..." · Reviewed by Greptile

Comment thread src/ui/data-table.tsx Resolved
Comment thread src/ui/data-table.tsx Resolved
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

@capy-ai capy-ai 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.

Capy found no issues.

View 1 other finding in Capy.

Open in Capy

Comment thread src/ui/data-table.tsx Resolved
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

@capy-ai capy-ai 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.

Capy found no issues.

View 1 other finding in Capy.

Open in Capy

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant