Thanks to visit codestin.com
Credit goes to github.com

Skip to content

topic-deprecation-removals#119

Open
coryrylan wants to merge 4 commits into
mainfrom
topic-deprecation-removals
Open

topic-deprecation-removals#119
coryrylan wants to merge 4 commits into
mainfrom
topic-deprecation-removals

Conversation

@coryrylan
Copy link
Copy Markdown
Collaborator

@coryrylan coryrylan commented Jun 4, 2026

Summary by CodeRabbit

Release Notes

  • Bug Fixes

    • Fixed breadcrumb CSS variable wiring and styling for active items.
    • Fixed tabs indicator positioning using CSS Anchors.
  • Removed Features

    • Removed deprecated component slots: title, subtitle, actions from accordion and card headers.
    • Removed deprecated combobox notags property; use tag-layout="hidden" instead.
    • Removed badge trend status variants.
    • Removed button interaction type variants.
    • Removed progress ring deprecated status-icon slot.
    • Removed toast muted status; use prominence="muted" instead.
    • Deprecated panel components; migrate to page-panel.
  • Updated Behavior

    • Updated lint rules to detect deprecated CSS custom properties and attribute values across HTML and CSS contexts.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 4, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

This PR removes multiple deprecated APIs, types, slot patterns, and CSS variables from the component library and updates ESLint rules to provide better deprecation coverage. Changes span core components (Accordion, Card, Progress-Ring, Badge, Toast, Button, Page-Panel), the lint plugin, and site documentation.

Changes

Type System and Core API Cleanup

Layer / File(s) Summary
Deprecated type exports removal
projects/core/build/icons.js, projects/core/src/icon/icons.ts, projects/core/src/internal/types/index.ts
Removes deprecated IconNames, FlatInteraction, Inverse, and TrendStatus type aliases; ICON_NAMES constant and primary types remain.
Component property type narrowing
projects/core/src/button/button.ts, projects/core/src/badge/badge.ts, projects/core/src/toast/toast.ts
Narrows Button.interaction to only Interaction (removes FlatInteraction and Inverse); removes TrendStatus from Badge.status; removes 'muted' literal from Toast.status.
Badge trend status removal
projects/core/src/badge/badge.css, projects/core/src/badge/badge.test.ts
Removes trend-specific CSS rules (trend-down/up/neutral); simplifies badge icon rendering to remove trend-suffix logic; removes trend test coverage.

Slot-Based Component Pattern Modernization

Layer / File(s) Summary
Accordion deprecated slot removal
projects/core/src/accordion/accordion.ts, projects/core/src/accordion/accordion.css, projects/core/src/accordion/accordion.snippets.html, projects/core/src/accordion/accordion.test.ts, projects/core/src/accordion/accordion.test.visual.ts, projects/core/src/accordion/accordion.examples.ts
Removes title, subtitle, actions named slots; updates header to render default slot; renames has-action CSS class to has-suffix; updates test fixtures and visual baseline.
Card header deprecated slot removal
projects/core/src/card/card.ts, projects/core/src/card/card-header.css, projects/core/src/card/card.snippets.html, projects/core/src/card/card.test.ts
Removes title, subtitle, header-action slots; updates to semantic default slot markup (h2, p); adds ::slotted(nve-tabs) spacing rule.
Progress-Ring status-icon slot removal
projects/core/src/progress-ring/progress-ring.ts, projects/core/src/progress-ring/progress-ring.test.ts
Removes status-icon named slot; converts icon rendering to conditional default-slot-embedded icon based on status value; removes slot-tracking logic.

Property and Attribute Removals

Layer / File(s) Summary
Combobox notags property removal
projects/core/src/combobox/combobox.ts, projects/core/src/combobox/combobox.test.ts
Removes deprecated notags boolean property; tag layout control now depends solely on tagLayout === 'hidden'.
Page-Panel closable/expandable removal and actions slot adoption
projects/core/src/page/page-panel/page-panel.ts, projects/core/src/page/page-panel/page-panel.test.ts, projects/core/src/page/page-panel/page-panel.test.visual.ts, projects/core/src/page/page.test.visual.ts, projects/core/src/page/page-panel/page-panel.global.css
Removes closable and expandable properties; updates component to expose actions slot for icon-button management; moves from @scopedRegistry() to @audit(); updates header styling.
Copy-Button popover trigger attribute removal
projects/core/src/copy-button/copy-button.ts, projects/core/src/copy-button/copy-button.test.ts
Removes trigger="btn" attribute from toast and tooltip while retaining anchor-based positioning.

CSS Custom Properties and Selector Modernization

Layer / File(s) Summary
Accordion and button CSS updates
projects/core/src/accordion/accordion-header.css, projects/core/src/accordion/accordion.css, projects/core/src/button/button.css, projects/core/src/button/button.ts, projects/core/src/icon-button/icon-button.css, projects/core/src/alert/alert.css
Adds icon-button sizing rule to accordion; updates state selectors (has-action → has-suffix); removes deprecated button interaction selectors; updates alert flat-variant selector to use container='flat'.
Tabs border-based indicator CSS removal
projects/core/src/tabs/tabs-item.css, projects/core/src/tabs/tabs.css, projects/core/src/tabs/tabs.global.css, projects/core/src/tabs/tabs.test.visual.ts, projects/core/src/tabs/tabs.ts
Removes --border-* custom properties; removes ::after pseudo-element indicator; adds CSS anchor (--selected) support; updates visual test to use --indicator-background.
Breadcrumb and layout/typography style cleanup
projects/core/src/breadcrumb/breadcrumb.css, projects/core/src/breadcrumb/breadcrumb.ts, projects/styles/src/layout.css, projects/styles/src/typography.css
Simplifies breadcrumb variable wiring to use host-level properties directly; removes deprecated grow and eyebrow from shared style blocks; removes deprecated CSS property documentation.
Menu tooltip and page-panel styling
projects/core/src/menu/menu.examples.ts, projects/core/src/page/page-panel/page-panel.global.css
Updates tooltip to use CSS property (interest-delay-start) instead of open-delay attribute; updates page-panel header styling.

Panel Component Deprecation Guidance

Layer / File(s) Summary
Panel deprecation messages and test suppression
projects/core/src/panel/panel.ts, projects/core/src/panel/panel*.test.ts, projects/core/src/panel/panel.examples.ts
Updates JSDoc @deprecated messages for panel components to recommend nve-page-panel-* equivalents; adds ESLint suppressions for test files exercising deprecated tags.
Panel documentation removal
projects/site/src/_11ty/layouts/common.js
Removes Panel entry from site documentation navigation.

ESLint Rule Enhancements

Layer / File(s) Summary
no-deprecated-attributes value-based replacement support
projects/lint/src/eslint/rules/no-deprecated-attributes.ts, projects/lint/src/eslint/rules/no-deprecated-attributes.test.ts
Extends rule to support value-specific replacements (e.g., interaction='flat'container='flat'); adds new message type for value replacements; expands coverage for button and toast deprecated values.
no-deprecated-css-variable HTML support expansion
projects/lint/src/eslint/rules/no-deprecated-css-variable.ts, projects/lint/src/eslint/rules/no-deprecated-css-variable.test.ts, projects/lint/src/eslint/configs/html.ts, projects/lint/README.md
Extends rule from CSS-only detection to support HTML style attributes; adds helper functions for var() detection and selector context; expands test coverage; registers rule in HTML config.
Deprecation-aware attribute validation rules
projects/lint/src/eslint/rules/no-unexpected-attribute-value.ts, projects/lint/src/eslint/rules/no-unexpected-global-attribute-value.ts, projects/lint/src/eslint/internals/attributes.ts
Updates rules to defer deprecated enum values to deprecation rules; updates attribute repair helpers to support multi-token replacements (eyebrowlabel sm, growfull).
Popover and slot deprecation rule updates
projects/lint/src/eslint/rules/no-deprecated-popover-attributes.ts, projects/lint/src/eslint/rules/no-deprecated-popover-attributes.test.ts, projects/lint/src/eslint/rules/no-deprecated-slots.test.ts, projects/lint/src/eslint/rules/no-deprecated-tags.ts, projects/lint/src/eslint/rules/no-deprecated-tags.test.ts
Updates popover rule to support per-attribute replacement strings; updates slot test coverage for card and progress-ring; extends tag deprecation mapping for panel components.

Documentation and Migration Guide Updates

Layer / File(s) Summary
Migration guide and component documentation
projects/site/src/docs/about/migration.md, projects/site/src/docs/elements/progress-ring.md, projects/site/src/docs/integrations/lit.md, projects/site/src/docs/lint/index.md
Updates migration guide to mark Combobox No Tags, Layout Full, and Typography eyebrow as removed; updates progress-ring documentation for default slot icon slotting; updates Lit integration and lint documentation.
Example snippets and toggletip suppression
projects/core/src/accordion/accordion.examples.ts, projects/core/src/menu/menu.examples.ts, projects/core/src/toggletip/toggletip.examples.ts, projects/core/src/toggletip/toggletip.test.axe.ts
Updates accordion snippet and menu example; adds ESLint suppression for toggletip deprecated popover example.

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly Related PRs

  • NVIDIA/elements#102: Updates accordion caret behavior and tests for expanded state direction after suffix-slot migration.
  • NVIDIA/elements#101: Modifies combobox tag-layout handling to replace deprecated notags property usage.

Suggested Labels

type(chore), scope(core), scope(lint), scope(docs), scope(code)

Suggested Reviewers

  • johnyanarella
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch topic-deprecation-removals

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

working on updating

Copy link
Copy Markdown

@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: 2

🤖 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 `@projects/core/src/accordion/accordion.ts`:
- Around line 161-163: The current getter get `#hasSuffixContent` checks the whole
element for [slot="suffix"], causing nested descendants to incorrectly set
has-suffix; instead, first locate the header container (element with
slot="header") and only search within that node for [slot="suffix"]. Update get
`#hasSuffixContent` to: find const header = this.querySelector('[slot="header"]')
(or return false if missing) and then check
Array.from(header.querySelectorAll('[slot="suffix"]')).length > 0 so only suffix
children in the header affect the result.

In `@projects/lint/src/eslint/rules/no-deprecated-css-variable.ts`:
- Around line 151-155: The rule currently passes the entire <style> block text
as the selector context (StyleTag handler uses context.sourceCode.getText(node)
and calls findDeprecatedCssVariables(text, text) and
getDeprecatedCssVariable(name, text), which causes selector-scoped variables to
be matched against unrelated selectors in the same stylesheet; fix by parsing
the stylesheet so you call findDeprecatedCssVariables and
getDeprecatedCssVariable with the specific selector text (or the single rule's
selector string) instead of the full stylesheet: in the StyleTag(HtmlTagNode)
handler iterate CSS rules/selectors, extract each rule's selector string and the
corresponding rule body, then call findDeprecatedCssVariables(selectorText,
ruleBodyOrSelectorText) and getDeprecatedCssVariable(name, selectorText) so
scoped names only match within their selector context.
🪄 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: af357018-7983-4d95-a553-8f0de3af2542

📥 Commits

Reviewing files that changed from the base of the PR and between 94a0a99 and c078deb.

⛔ Files ignored due to path filters (2)
  • projects/core/.visual/accordion.dark.png is excluded by !**/*.png
  • projects/core/.visual/accordion.png is excluded by !**/*.png
📒 Files selected for processing (76)
  • projects/core/build/icons.js
  • projects/core/src/accordion/accordion-header.css
  • projects/core/src/accordion/accordion.css
  • projects/core/src/accordion/accordion.examples.ts
  • projects/core/src/accordion/accordion.snippets.html
  • projects/core/src/accordion/accordion.test.ts
  • projects/core/src/accordion/accordion.test.visual.ts
  • projects/core/src/accordion/accordion.ts
  • projects/core/src/alert/alert.css
  • projects/core/src/badge/badge.css
  • projects/core/src/badge/badge.test.ts
  • projects/core/src/badge/badge.ts
  • projects/core/src/breadcrumb/breadcrumb.css
  • projects/core/src/breadcrumb/breadcrumb.ts
  • projects/core/src/button/button.css
  • projects/core/src/button/button.ts
  • projects/core/src/card/card-header.css
  • projects/core/src/card/card.snippets.html
  • projects/core/src/card/card.test.ts
  • projects/core/src/card/card.ts
  • projects/core/src/combobox/combobox.test.ts
  • projects/core/src/combobox/combobox.ts
  • projects/core/src/copy-button/copy-button.test.ts
  • projects/core/src/copy-button/copy-button.ts
  • projects/core/src/icon-button/icon-button.css
  • projects/core/src/icon/icons.ts
  • projects/core/src/internal/types/index.ts
  • projects/core/src/menu/menu.examples.ts
  • projects/core/src/page/page-panel/page-panel.global.css
  • projects/core/src/page/page-panel/page-panel.test.ts
  • projects/core/src/page/page-panel/page-panel.test.visual.ts
  • projects/core/src/page/page-panel/page-panel.ts
  • projects/core/src/page/page.test.visual.ts
  • projects/core/src/panel/panel-footer.test.ts
  • projects/core/src/panel/panel-header.test.ts
  • projects/core/src/panel/panel.examples.ts
  • projects/core/src/panel/panel.test.axe.ts
  • projects/core/src/panel/panel.test.lighthouse.ts
  • projects/core/src/panel/panel.test.ssr.ts
  • projects/core/src/panel/panel.test.ts
  • projects/core/src/panel/panel.ts
  • projects/core/src/progress-ring/progress-ring.test.ts
  • projects/core/src/progress-ring/progress-ring.ts
  • projects/core/src/tabs/tabs-item.css
  • projects/core/src/tabs/tabs.css
  • projects/core/src/tabs/tabs.global.css
  • projects/core/src/tabs/tabs.test.visual.ts
  • projects/core/src/tabs/tabs.ts
  • projects/core/src/toast/toast.test.ts
  • projects/core/src/toast/toast.ts
  • projects/core/src/toggletip/toggletip.examples.ts
  • projects/core/src/toggletip/toggletip.test.axe.ts
  • projects/lint/README.md
  • projects/lint/src/eslint/configs/html.ts
  • projects/lint/src/eslint/internals/attributes.ts
  • projects/lint/src/eslint/rules/no-deprecated-attributes.test.ts
  • projects/lint/src/eslint/rules/no-deprecated-attributes.ts
  • projects/lint/src/eslint/rules/no-deprecated-css-variable.test.ts
  • projects/lint/src/eslint/rules/no-deprecated-css-variable.ts
  • projects/lint/src/eslint/rules/no-deprecated-global-attribute-value.test.ts
  • projects/lint/src/eslint/rules/no-deprecated-global-attribute-value.ts
  • projects/lint/src/eslint/rules/no-deprecated-popover-attributes.test.ts
  • projects/lint/src/eslint/rules/no-deprecated-popover-attributes.ts
  • projects/lint/src/eslint/rules/no-deprecated-slots.test.ts
  • projects/lint/src/eslint/rules/no-deprecated-tags.test.ts
  • projects/lint/src/eslint/rules/no-deprecated-tags.ts
  • projects/lint/src/eslint/rules/no-unexpected-attribute-value.test.ts
  • projects/lint/src/eslint/rules/no-unexpected-attribute-value.ts
  • projects/lint/src/eslint/rules/no-unexpected-global-attribute-value.test.ts
  • projects/site/src/_11ty/layouts/common.js
  • projects/site/src/docs/about/migration.md
  • projects/site/src/docs/elements/progress-ring.md
  • projects/site/src/docs/integrations/lit.md
  • projects/site/src/docs/lint/index.md
  • projects/styles/src/layout.css
  • projects/styles/src/typography.css
💤 Files with no reviewable changes (18)
  • projects/core/src/tabs/tabs.global.css
  • projects/core/src/icon/icons.ts
  • projects/core/src/card/card-header.css
  • projects/site/src/_11ty/layouts/common.js
  • projects/styles/src/typography.css
  • projects/core/src/tabs/tabs-item.css
  • projects/core/src/tabs/tabs.ts
  • projects/core/src/page/page-panel/page-panel.global.css
  • projects/core/src/breadcrumb/breadcrumb.ts
  • projects/core/src/card/card.ts
  • projects/core/src/icon-button/icon-button.css
  • projects/core/build/icons.js
  • projects/core/src/accordion/accordion-header.css
  • projects/core/src/internal/types/index.ts
  • projects/core/src/combobox/combobox.test.ts
  • projects/core/src/button/button.css
  • projects/core/src/tabs/tabs.css
  • projects/core/src/badge/badge.css

Comment on lines +161 to 163
get #hasSuffixContent(): boolean {
return !!(this?.querySelectorAll ? Array.from(this?.querySelectorAll<HTMLSlotElement>('[slot="suffix"]')) : [])
.length;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Scope suffix detection to header content only.

Line 162 scans the entire light DOM for [slot="suffix"], so nested content can accidentally trigger has-suffix and change header layout/caret direction. Limit detection to suffix children within the header slot content.

Proposed fix
   get `#hasSuffixContent`(): boolean {
-    return !!(this?.querySelectorAll ? Array.from(this?.querySelectorAll<HTMLSlotElement>('[slot="suffix"]')) : [])
-      .length;
+    const header = this.querySelector(AccordionHeader.metadata.tag);
+    if (!header) return false;
+    return header.querySelectorAll(':scope > [slot="suffix"]').length > 0;
   }
🤖 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 `@projects/core/src/accordion/accordion.ts` around lines 161 - 163, The current
getter get `#hasSuffixContent` checks the whole element for [slot="suffix"],
causing nested descendants to incorrectly set has-suffix; instead, first locate
the header container (element with slot="header") and only search within that
node for [slot="suffix"]. Update get `#hasSuffixContent` to: find const header =
this.querySelector('[slot="header"]') (or return false if missing) and then
check Array.from(header.querySelectorAll('[slot="suffix"]')).length > 0 so only
suffix children in the header affect the result.

Comment on lines +151 to +155
StyleTag(node: HtmlTagNode) {
const text = context.sourceCode.getText(node as unknown as Rule.Node);
findDeprecatedCssVariables(text, text).forEach(name => {
const config = getDeprecatedCssVariable(name, text);
if (!config) return;
Copy link
Copy Markdown

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

Selector-scoped checks in <style> blocks use the entire stylesheet as the selector context.

Line 153 and Line 154 pass the full <style> text into selector matching. That makes scoped variables (for example tabs-only --border-*) report on unrelated selectors when the same block also contains nve-tabs anywhere.

Proposed fix
+function findDeprecatedCssVariablesByBlock(cssText: string) {
+  const matches: Array<{ name: string; selector: string }> = [];
+  for (const match of cssText.matchAll(/([^{}]+)\{([^{}]*)\}/g)) {
+    const selector = match[1]?.trim() ?? '';
+    const body = match[2] ?? '';
+    for (const name of findDeprecatedCssVariables(body, selector)) {
+      matches.push({ name, selector });
+    }
+  }
+  return matches;
+}
+
         StyleTag(node: HtmlTagNode) {
           const text = context.sourceCode.getText(node as unknown as Rule.Node);
-          findDeprecatedCssVariables(text, text).forEach(name => {
-            const config = getDeprecatedCssVariable(name, text);
+          findDeprecatedCssVariablesByBlock(text).forEach(({ name, selector }) => {
+            const config = getDeprecatedCssVariable(name, selector);
             if (!config) return;
             context.report({
               messageId: 'deprecated-css-var',
               node: node as unknown as Rule.Node,
               data: { value: name, alternative: config.alternative }
             });
           });
         },
🤖 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 `@projects/lint/src/eslint/rules/no-deprecated-css-variable.ts` around lines
151 - 155, The rule currently passes the entire <style> block text as the
selector context (StyleTag handler uses context.sourceCode.getText(node) and
calls findDeprecatedCssVariables(text, text) and getDeprecatedCssVariable(name,
text), which causes selector-scoped variables to be matched against unrelated
selectors in the same stylesheet; fix by parsing the stylesheet so you call
findDeprecatedCssVariables and getDeprecatedCssVariable with the specific
selector text (or the single rule's selector string) instead of the full
stylesheet: in the StyleTag(HtmlTagNode) handler iterate CSS rules/selectors,
extract each rule's selector string and the corresponding rule body, then call
findDeprecatedCssVariables(selectorText, ruleBodyOrSelectorText) and
getDeprecatedCssVariable(name, selectorText) so scoped names only match within
their selector context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant