Repository navigation
feat(chip): update chip xplat topic - #903
IMinchev64 wants to merge 9 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Test and Review for Chip - React / Chrome1. Live Demo Please use the Live Demo design from Figma File : Figma Design
2. Layout Please, use for Indigo theme the Indigo Arrow Icon - indigo-arrow-upward. This is relevant for ALL EXAMPLES with indigo theme for both light and dark mode. 3. Outlined Chip Please use the outline variants for this example 4. Size Please double check the Chip background color for Material theme - Light Mode. Should be #E0E0E0 5. Section "Remove Chip" to be "Read only" with no interactions No need for "restore chip" button
|
| <PlatformBlock for="WebComponents"> | ||
|
|
||
| - The `outlined` property is available in {PackageWebComponents} 7.3.0 and later. | ||
| - The `action` and `remove` parts are available in 7.4.0 and later. In earlier versions, the `base` part is the selection button and the remove icon renders inside it. |
There was a problem hiding this comment.
The action and remove parts and the documented start/end slots shipped in 7.3.1, not 7.4.0. See the 7.3.1 CHANGELOG entry (#2362), or compare components/chip/chip.js and chip.d.ts in the 7.3.0 and 7.3.1 packages. Also, 7.3.0 doesn't mark start/end as deprecated. It doesn't list them at all, and the deprecation note comes from a much older release.
| <div class="container sample vertical"> | ||
| <IgbChip>Chip</IgbChip> | ||
| </div> | ||
| Use the `IgniteUI.Blazor` package. In `IgniteUI.Blazor` 26.1, `IgbChip` doesn't expose the `Outlined`, `Locale`, or `ResourceStrings` properties. |
There was a problem hiding this comment.
This is a good place to say that Blazor 26.1 ships the older chip. Besides the missing Outlined, Locale, and ResourceStrings: base is the selection button, there are no action/remove parts, and the focus styles read --ig-chip-focus-outline-color / --ig-chip-focus-selected-outline-color. You can check it in staticwebassets/igniteui-webcomponents.*.bundle.js of the IgniteUI.Blazor 26.1.98 NuGet package.
|
|
||
| </PlatformBlock> | ||
|
|
||
| Leave <ApiLink pkg="core" type="Chip" member="variant" label="Variant" /> unset for the default type, or set it to <PlatformBlock for="WebComponents, React, Angular">`primary`</PlatformBlock><PlatformBlock for="Blazor">`StyleVariant.Primary`</PlatformBlock> for the primary type. The variant also accepts <PlatformBlock for="WebComponents, React, Angular">`info`, `success`, `warning`, and `danger`</PlatformBlock><PlatformBlock for="Blazor">`StyleVariant.Info`, `StyleVariant.Success`, `StyleVariant.Warning`, and `StyleVariant.Danger`</PlatformBlock> for status colors. |
There was a problem hiding this comment.
Nit: ApiLink labels in shared prose render as-is on every platform, so WC/React/Angular readers see Variant (also Outlined L388, Disabled L472, Selectable/Selected L522, Removable L612) while the property is variant. The tables already use the right casing per platform.
|
|
||
| Keyboard users reach each chip with <kbd>Tab</kbd>, followed by its remove control when the chip is removable. Disabled chips are skipped. | ||
|
|
||
| <PlatformBlock for="WebComponents, React, Blazor"> |
There was a problem hiding this comment.
In the chip that Blazor bundles, the remove key binding falls back to the host when the chip isn't removable. So on a selectable chip without Removable, Space doesn't toggle the selection, and Enter toggles it and also raises Remove. 7.3.1 fixed this ("Space did not toggle the selection, and igcRemove fired on chips that are not removable"). For Blazor, this table and the 2.1.1 row (L1173) hold only when the chip is also removable.
|
|
||
| The {Platform} Chip exposes its state through native semantics and ARIA attributes, and takes its accessible name from its content. | ||
|
|
||
| <PlatformBlock for="WebComponents, React, Blazor"> |
There was a problem hiding this comment.
Not true for Blazor yet. The default select icon has aria-label="select chip", so it isn't hidden. The remove icon renders inside the selection button, so it's a nested control, not a separate one. Because of that, the accessible name includes the icon labels ("Chip remove chip"), which 7.3.1 fixed. Suggest WC/React-only bullets here, plus Blazor bullets or a Blazor known exception.
|
|
||
| <PlatformBlock for="WebComponents, React, Blazor"> | ||
|
|
||
| ### Why did my `::part(base)` styles change after an upgrade? |
There was a problem hiding this comment.
::part(base): change 7.4.0 to 7.3.1. Neither question applies to Blazor yet. Blazor still has the old part structure and still uses the outline variables, so the focus question (L1246) tells Blazor readers to rename to variables that don't exist. Suggest for="WebComponents, React" for both questions.
ChronosSF
left a comment
There was a problem hiding this comment.
This is sample-related but writing it here because it spans all platforms.
Can we have the remove button on the Remove Chip section actually do something. I clicked on it and was surprised it doesn't do anything. I know removing a chip is an application scenario but it doesn't mean we can't implement it for this sample.
Have it remove the chip and add a button in its place that lets you restore it or something simple liek that. You can also just restore it after 3 seconds with a toast counting down or something like that, doesn't have to be super complicated.






Closes #701
React samples: IgniteUI/igniteui-react-examples#1118
WC samples: IgniteUI/igniteui-wc-examples#1294
Blazor samples: IgniteUI/igniteui-blazor-examples#1321
Angular samples: IgniteUI/igniteui-angular-samples#4050
Checklist:
preview/beta./page.mdxor../relative/path.mdx(.mdxextension required)IgxSelectComponent,<igx-combo>code blocksfor the names of classes / tags / propertiescode blockscheck-api/mdxnpm commandsllms.descriptionmetadata and runnpm run check:llms-metadata