Skip to content

fix: emcn component library design engineering polish#3672

Open
adithyaakrishna wants to merge 4 commits intosimstudioai:stagingfrom
adithyaakrishna:feat/emcn
Open

fix: emcn component library design engineering polish#3672
adithyaakrishna wants to merge 4 commits intosimstudioai:stagingfrom
adithyaakrishna:feat/emcn

Conversation

@adithyaakrishna
Copy link

Summary

Comprehensive polish of the emcn compos library along with addressing a11y issues and design token consistency

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other: Components Polish

Testing

  • Visual regression: Button variants (tertiary no longer uses !important, base class restructured), toast auto-dismiss now 5s default, dropdown menu wider
  • Touch devices: Verify hover states no longer stick on tap
  • Keyboard navigation: Tab through Input, Textarea, Slider, Switch all now show visible focus indicators
  • Reduced motion: Toggle prefer reduced motion (macos setting), all animations should be disabled

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@cursor
Copy link

cursor bot commented Mar 19, 2026

PR Summary

Medium Risk
Broad UI styling and interaction changes across shared components (hover behavior, focus rings, z-index, animations) could cause subtle regressions in visual states or stacking in many screens, but no core business logic is affected.

Overview
Introduces a consistent global z-index scale (--z-*) and applies it to layered primitives like DropdownMenu, Modal/SModal, Tooltip, Popover submenus, and Toast.

Adds a Tailwind hover-hover variant and updates many components to use it so hover styles only apply on true hover-capable devices (preventing “stuck” hover on touch), while also tightening focus-visible borders/rings on inputs and controls.

Improves a11y/UX polish: larger hit areas for small controls (e.g., modal close, checkbox/switch/slider thumbs, tag remove), disables animations under prefers-reduced-motion, removes Prism !important overrides via higher specificity, standardizes icon aria-hidden, and changes toast default auto-dismiss to 5s.

Written by Cursor Bugbot for commit 74c6b77. This will update automatically on new commits. Configure here.

@vercel
Copy link

vercel bot commented Mar 19, 2026

@adithyaakrishna is attempting to deploy a commit to the Sim Team on Vercel.

A member of the Team first needs to authorize it.

primary:
'bg-[#1D1D1D] text-[var(--text-inverse)] hover:text-[var(--text-inverse)] hover:bg-[#2A2A2A] dark:bg-white dark:hover:bg-[#E0E0E0]',
destructive: 'bg-[var(--text-error)] text-white hover:text-white hover:brightness-106',
'bg-[var(--c-1D1D1D)] text-[var(--text-inverse)] hover-hover:text-[var(--text-inverse)] hover-hover:bg-[var(--c-2A2A2A)] dark:bg-white dark:hover-hover:bg-[var(--c-E0E0E0)]',
Copy link

Choose a reason for hiding this comment

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

Missing CSS variable --c-1D1D1D causes invisible buttons

High Severity

The primary button variant references var(--c-1D1D1D) for its background and related colors, but --c-1D1D1D is not defined in the extended palette in globals.css. My grep of the entire globals.css confirmed zero matches for 1D1D1D. Other color variables like --c-2A2A2A and --c-E0E0E0 are defined, but --c-1D1D1D is missing from both light and dark theme sections. This means the primary button variant and the active button-group item will have no background color, making them visually broken.

Additional Locations (1)
Fix in Cursor Fix in Web

'bg-[var(--brand-tertiary-2)] text-[var(--text-inverse)] hover-hover:text-[var(--text-inverse)] hover-hover:bg-[#2DAC72] dark:bg-[var(--brand-tertiary-2)] dark:hover-hover:bg-[#2DAC72] dark:text-[var(--text-inverse)] dark:hover-hover:text-[var(--text-inverse)]',
ghost: 'text-[var(--text-secondary)] hover-hover:text-[var(--text-primary)]',
subtle:
'text-[var(--text-body)] hover-hover:text-[var(--text-body)] hover-hover:bg-[var(--surface-4)]',
Copy link

Choose a reason for hiding this comment

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

Ghost-secondary button lost hover text color change

Medium Severity

The ghost-secondary variant only defines text-[var(--text-muted)] with no hover state. Previously, the base button class included hover:text-[var(--text-primary)] which applied to all variants. Now that the base class no longer sets text color or hover text color, each variant is responsible for its own. The ghost-secondary variant lost its hover feedback, unlike ghost and other variants which explicitly define hover-hover:text-[var(--text-primary)].

Fix in Cursor Fix in Web

Copy link

@cursor cursor bot left a comment

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.

There are 3 total unresolved issues (including 2 from previous reviews).

Fix All in Cursor

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

<DismissableLayerBranch
className={cn(
'fixed z-[10000201] min-w-[120px]',
'fixed z-[calc(var(--z-popover)+1)] min-w-[120px]',
Copy link

Choose a reason for hiding this comment

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

Submenu z-index far below parent popover z-index

High Severity

The hover submenu portal z-index changed from z-[10000201] to z-[calc(var(--z-popover)+1)] which resolves to 201, but the parent PopoverContent at line 583 still uses z-[10000200]. The submenu now renders far below its parent popover in the stacking order, making nested submenus invisible (hidden behind the parent).

Fix in Cursor Fix in Web

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant