feat(chip): add outlined version - #2307
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces an outlined visual style for igc-chip, wiring it through the component API, Storybook, tests, and theme styles so consumers can opt into an outlined appearance via a new outlined boolean attribute/property.
Changes:
- Added a new reflected boolean
outlinedproperty toIgcChipComponent, plus Storybook controls and examples. - Extended shared + theme-specific SCSS to style outlined chips across light/dark and theme variants (material/bootstrap/fluent/indigo).
- Added a unit test for toggling the new
outlinedproperty.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| stories/chip.stories.ts | Adds outlined control/args and showcases outlined variants/states in stories. |
| src/components/chip/chip.ts | Introduces the new reflected outlined boolean property on the component. |
| src/components/chip/chip.spec.ts | Adds a unit test for toggling outlined (but still missing required a11y audit coverage). |
| src/components/chip/themes/chip.base.scss | Adjusts base chip styling and adds outlined variant behavior in base styles. |
| src/components/chip/themes/shared/chip.common.scss | Adds core outlined state styling (background/text/border + hover/focus/disabled) via theme tokens. |
| src/components/chip/themes/shared/chip.indigo.scss | Updates indigo shared behaviors (focus shadow tokens, disabled/selected adjustments). |
| src/components/chip/themes/shared/chip.fluent.scss | Adds fluent shared overrides for outlined variant backgrounds. |
| src/components/chip/themes/shared/chip.bootstrap.scss | Adds bootstrap shared overrides for outlined variants (hover/focus behavior). |
| src/components/chip/themes/light/chip.material.scss | Adds light material outlined-variant border/text overrides. |
| src/components/chip/themes/light/chip.indigo.scss | Adds light indigo outlined-variant behaviors + warning disabled color adjustment. |
| src/components/chip/themes/light/chip.fluent.scss | Adds light fluent outlined-variant border/text + hover/focus backgrounds. |
| src/components/chip/themes/light/chip.bootstrap.scss | Adds light bootstrap outlined-variant border/text overrides. |
| src/components/chip/themes/dark/chip.material.scss | Adds dark material outlined-variant border/text overrides. |
| src/components/chip/themes/dark/chip.indigo.scss | Adds dark indigo outlined-variant behaviors + warning disabled color adjustment. |
| src/components/chip/themes/dark/chip.fluent.scss | Adds dark fluent outlined-variant border/text + hover/focus backgrounds. |
| src/components/chip/themes/dark/chip.bootstrap.scss | Adds dark bootstrap outlined-variant border/text overrides. |
| it('should toggle the outlined property successfully', async () => { | ||
| const chip = await fixture<IgcChipComponent>(html`<igc-chip></igc-chip>`); | ||
|
|
||
| chip.outlined = true; | ||
| expect(chip.outlined).to.be.true; | ||
| await elementUpdated(chip); | ||
| expect(chip).dom.to.equal('<igc-chip outlined></igc-chip>', DIFF_OPTIONS); | ||
|
|
||
| chip.outlined = false; | ||
| expect(chip.outlined).to.be.false; | ||
| await elementUpdated(chip); | ||
| expect(chip).dom.to.equal('<igc-chip></igc-chip>', DIFF_OPTIONS); | ||
| }); | ||
|
|
||
| it('should toggle the selectable property successfully', async () => { |
|
@adrianptrv |
He's essentially changing some of the theme CSS variables. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 17 out of 17 changed files in this pull request and generated no new comments.
Suppressed comments (3)
stories/chip.stories.ts:85
- The args interface doc for
outlinedshould follow the same “Whether …” phrasing used across the codebase for boolean properties.
/** Defines if the chip is outlined or not. */
outlined: boolean;
src/components/chip/chip.ts:81
- The new
outlinedproperty JSDoc uses the older “Defines if …” phrasing and omits@default. Most components document booleans as “Whether …” and include an explicit default (e.g.src/components/icon/icon.ts:109-114). Aligning this keeps generated docs and Storybook descriptions consistent.
/**
* Defines if the chip is outlined or not.
*
* @attr
*/
stories/chip.stories.ts:41
- Storybook argTypes description for
outlinedshould match the component’s boolean-doc convention (“Whether …”), otherwise the generated docs read awkwardly/inconsistently.
This issue also appears on line 84 of the same file.
outlined: {
type: 'boolean',
description: 'Defines if the chip is outlined or not.',
control: 'boolean',
table: { defaultValue: { summary: 'false' } },
},
Description
Adding a new outlined version of the Chip. All the new styles from the handoff have been applied.
Needs to be tested together with this theming PR: #592
Type of Change
Related Issues
Closes IgniteUI/igniteui-theming#591
Testing
All the new changes can be tested and compared to the handoff through the Chip stories.
Checklist