Skip to content

fix: filterchip wrap#826

Closed
rohanchkrabrty wants to merge 1 commit into
mainfrom
fix-filterchip
Closed

fix: filterchip wrap#826
rohanchkrabrty wants to merge 1 commit into
mainfrom
fix-filterchip

Conversation

@rohanchkrabrty
Copy link
Copy Markdown
Contributor

Draft PR

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 2, 2026

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

Project Deployment Actions Updated (UTC)
apsara Ready Ready Preview, Comment Jun 2, 2026 5:43am

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 2, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

This PR applies flexbox layout constraints to filter UI components across two CSS files. The .filterContainer in data-table receives min-width: 0 and flex-shrink: 1 to enable proper flex sizing behavior. The .chip component and .chip input in filter-chip gain additional flex properties including overflow: clip, explicit min/max widths, flex-shrink, and field-sizing constraints to manage content overflow and input sizing within filter chips.

Suggested reviewers

  • paanSinghCoder
  • Shreyag02
  • rsbh
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description 'Draft PR' is generic and provides no meaningful information about the changeset or its purpose. Provide a meaningful description explaining what wrapping issue was fixed and why the CSS changes (min-width, flex-shrink, etc.) address it.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: filterchip wrap' directly addresses the main changes which involve CSS modifications to filter-chip and data-table components to fix wrapping behavior.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ 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.

@rohanchkrabrty rohanchkrabrty marked this pull request as draft June 2, 2026 05:44
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.

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 `@packages/raystack/components/filter-chip/filter-chip.module.css`:
- Around line 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).
🪄 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: 8116ffd9-0626-45b8-aed5-29ddb1d4ec96

📥 Commits

Reviewing files that changed from the base of the PR and between c3a2d0e and 18aea55.

📒 Files selected for processing (2)
  • packages/raystack/components/data-table/data-table.module.css
  • packages/raystack/components/filter-chip/filter-chip.module.css

Comment on lines 10 to +16
overflow: clip;
flex-grow: 0;
width: fit-content;
min-width: 0px;
flex-basis: auto;
flex-shrink: 1;
max-width: 100%;
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).

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