Skip to content

Clean up deprecated code, unused CSS, and legacy patterns #682

@ravisuhag

Description

@ravisuhag

Summary

Several components contain dead code, deprecated patterns, unused CSS selectors, and legacy workarounds that should be cleaned up to reduce maintenance burden and bundle size.

Goal

Remove all dead code, unused styles, deprecated patterns, and legacy workarounds across the component library.

Affected Components

Component Issue Details
ThemeProvider (#646) item 4 Obsolete -o- (Opera) vendor prefix in transition disabling
Text (#644) items 4, 5 Outdated JSDoc comments; numeric size variants coexist with named sizes — formalize deprecation
FilterChip (#616) item 2 Unused CSS classes not referenced by component
EmptyState (#615) item 2 Unused CSS classes not referenced by component
DropdownMenu (#614) item 1 TODO workaround for Radix Dialog focus lock — Dialog now uses Base UI
Callout (#603) items 4, 6 width prop duplicates style; duplicate .callout-gradient CSS block
Button (#601) item 3 maxWidth and width props duplicate style
Box (#599) items 2, 3 "Old component just copied in v1 folder" — clarify status; only adds box-sizing: border-box

Common Patterns

1. Remove obsolete vendor prefixes

/* Remove — no modern browser needs this */
-o-transition: none;
-webkit-transition: none; /* Check if still needed */

2. Remove unused CSS classes

Audit all CSS modules against their component's JSX to find dead selectors.

3. Remove redundant props that duplicate style

Props like width, maxWidth that just get merged into style add API surface without value.

4. Remove stale workarounds

When the underlying issue is fixed (e.g., Dialog migrated from Radix to Base UI), remove the workaround.

5. Formalize deprecations

Mark deprecated APIs with JSDoc @deprecated tags and console warnings in development.

Acceptance Criteria

  • No unused CSS selectors in component modules
  • No obsolete vendor prefixes
  • No stale TODO/workaround comments for resolved issues
  • Redundant wrapper props removed or justified
  • Deprecated APIs formally marked with @deprecated

Metadata

Metadata

Labels

globalCross-cutting issue affecting multiple componentstriage

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions