Skip to content

FE-1207: add chip to ds - #9130

Merged
alex-e-leon merged 23 commits into
mainfrom
FE-1207-add-chip-to-ds
Aug 4, 2026
Merged

FE-1207: add chip to ds#9130
alex-e-leon merged 23 commits into
mainfrom
FE-1207-add-chip-to-ds

Conversation

@alex-e-leon

Copy link
Copy Markdown
Contributor

🌟 What is the purpose of this PR?

Adds a chip component to the DS

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • does not modify any publishable blocks or libraries, or modifications do not need publishing

📜 Does this require a change to the docs?

The changes in this PR:

  • are internal and do not require a docs change

@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
hash Ready Ready Preview Jul 31, 2026 7:47pm
hashdotdesign-tokens Ready Ready Preview Jul 31, 2026 7:47pm
petrinaut Ready Ready Preview Jul 31, 2026 7:47pm

@cursor

cursor Bot commented Jul 31, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
New UI library surface and styling-only change to disabled error text; no auth, data, or runtime logic changes.

Overview
Adds a new Chip to @hashintel/ds-components, exported from main.ts with a patch changeset.

The component supports sizes, colors, variants (fill, fillLight, outline, subtle), shapes, optional prefix/suffix affixes (icon, dot, or text) with treatments (straight, badge, angle, naked), whole-chip or segmented click targets (label vs affix/remove), and removeable chips (mutually exclusive with suffix). Styling lives in a large Panda chip.recipe.ts with coordinated hover, focus, and divider behavior.

Ladle stories cover variants, shapes, sizes, and affix interactions. Separately, disabled form error text color mixing in errors.recipe.ts switches from srgb to oklab.

Reviewed by Cursor Bugbot for commit 94e5ed9. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions github-actions Bot added area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team area/apps > hash.design Affects the `hash.design` design site (app) labels Jul 31, 2026
Comment thread libs/@hashintel/ds-components/src/components/Chip/chip.recipe.ts
@github-actions github-actions Bot added the area/infra Relates to version control, CI, CD or IaC (area) label Jul 31, 2026
Comment thread libs/@hashintel/ds-components/src/components/Chip/chip.tsx
Comment thread libs/@hashintel/ds-components/src/components/Chip/chip.tsx
Comment thread libs/@hashintel/ds-components/src/components/Chip/chip.recipe.ts

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 94e5ed9. Configure here.

Comment thread libs/@hashintel/ds-components/src/main.ts

@lunelson lunelson 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.

Looks good, my only nitpick is that I believe the remove/dismiss box for chips and tabs should always be on the left or rather at block-start, never the right (block-end). It's widely done on the right (maybe a bad convention inherited from microsoft windows) but once you need to remove several chips of different lengths in a row, in a flex-flow ltr layout, it's clear why this should be at block-start

@alex-e-leon
alex-e-leon added this pull request to the merge queue Aug 4, 2026
@alex-e-leon

Copy link
Copy Markdown
Contributor Author

Looks good, my only nitpick is that I believe the remove/dismiss box for chips and tabs should always be on the left or rather at block-start, never the right (block-end). It's widely done on the right (maybe a bad convention inherited from microsoft windows) but once you need to remove several chips of different lengths in a row, in a flex-flow ltr layout, it's clear why this should be at block-start

I agree with you, but I also think it reads better/the intention of the chips are clearer when remove is at the end.

Personally adding an X at the beginning would confuse me into thinking that the chip represents the item not being present in the list.

Instead I think a better pattern is a) in combo boxes allowing the whole lozenge to be clicked to remove it (instead of just the button) and b) allowing users to remove items with backspace, which solve the issue but keep readability better.

Merged via the queue into main with commit 3e52d9a Aug 4, 2026
49 checks passed
@alex-e-leon
alex-e-leon deleted the FE-1207-add-chip-to-ds branch August 4, 2026 08:06
@hash-worker hash-worker Bot mentioned this pull request Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/apps > hash.design Affects the `hash.design` design site (app) area/infra Relates to version control, CI, CD or IaC (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team

Development

Successfully merging this pull request may close these issues.

2 participants