Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/raystack/components/data-table/data-table.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -238,4 +238,6 @@

.filterContainer {
flex-wrap: wrap;
min-width: 0;
flex-shrink: 1;
}
13 changes: 11 additions & 2 deletions packages/raystack/components/filter-chip/filter-chip.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@
background: var(--rs-color-background-base-primary);
border-radius: var(--rs-radius-2);
text-wrap: nowrap;
width: fit-content;
min-width: min-content;
overflow: clip;
flex-grow: 0;
width: fit-content;
min-width: 0px;
flex-basis: auto;
flex-shrink: 1;
max-width: 100%;
Comment on lines 10 to +16
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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Don't clip the chip before any of its fixed sections can shrink.

Lines 23-26, 27-36, and 78-89 keep the label, operator, and remove button non-shrinking. With the new overflow: clip and max-width: 100% here, a long filter label can clip the tail of the chip and hide the trailing remove button on narrow layouts. Make the label/value section shrinkable and ellipsize that content before clipping the whole chip.

🤖 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/filter-chip/filter-chip.module.css` around lines
10 - 16, The current rule using overflow: clip and max-width: 100% causes the
entire chip to be clipped before its non-shrinking sections (label, operator,
remove button) can shrink; remove or move overflow: clip and max-width: 100% off
the root chip rule and instead make the label/value section shrinkable and
ellipsize: ensure the label container has min-width: 0, flex-shrink: 1 (or flex:
1 1 auto), and add overflow: hidden; white-space: nowrap; text-overflow:
ellipsis so the text truncates before the chip is clipped, while keeping the
operator/remove button as non-shrinking (e.g., flex: 0 0 auto).

}

.chip-default {
Expand Down Expand Up @@ -43,6 +47,11 @@
background: transparent;
min-height: unset;
padding: 0;
field-sizing: content;
max-width: 200px;
width: auto;
min-width: 50px;
flex-shrink: 1;
text-overflow: ellipsis;
}

Expand Down
Loading