Skip to content

refactor(ui): centralize compact icon button sizing in EMCN - #7991

Open
BillLeoutsakosvl346 wants to merge 5 commits into
stagingfrom
codex/control-fix-icon-button-sizing
Open

BillLeoutsakosvl346 wants to merge 5 commits into
stagingfrom
codex/control-fix-icon-button-sizing

Conversation

@BillLeoutsakosvl346

@BillLeoutsakosvl346 BillLeoutsakosvl346 commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Product icon buttons repeatedly set square dimensions and zero padding through consumer classes. Add Button's iconSize option and migrate all 25 matching EMCN Button locations across 10 product files, including the shared workflow action-bar recipe.

compact preserves spacing-based sizing (size-6); compact-fixed preserves fixed 24px sizing. Both own zero padding while retaining the selected size and variant's typography, corners, icon strokes and colors. This keeps the original behavior when the browser's font size changes. Consumers retain positioning, canvas width overrides, icons, labels, disabled conditions and handlers. Omitting the new option leaves existing buttons unchanged.

BulkActionButton and ComposerActionButton exclude the inherited iconSize and iconPadding props because these specialized controls already own their geometry. Their rendering is unchanged. Landing pages, global CSS, dependencies and audit tooling are excluded.

Validation

  • 350 EMCN tests pass. All 26 workspace type checks and lint checks, API validation, import-specifier checks and diff checks pass.
  • The initial migration's category audit removed all 32 targeted overrides; seven additional action-bar usages were verified through their shared recipe. Consumer AST and render comparisons preserve handlers and the original class sets, including 448 action-bar combinations and 210 existing Button variant/size/padding combinations.
  • The original 920 isolated Chromium comparisons cover light/dark themes, normal/enlarged root font sizes and idle/hover/focus/active/disabled states. The subsequent specialized-prop restrictions affect types only.
  • External combined-source compiler assertions confirm fixed-geometry controls reject generic icon sizing while Button retains both meaningful sizing options. No audit helpers or extra type-test fixtures are included in this PR.

@vercel

vercel Bot commented Sep 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Sep 21, 2026 3:32am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; the latest commit resolves the prior comment-format issue without introducing a new actionable defect.

Summary

Centralizes compact icon-button geometry in the EMCN Button component and migrates matching consumers.

  • Adds responsive and fixed compact icon-size variants while preserving existing size and visual treatments.
  • Prevents specialized bulk and composer action buttons from accepting generic geometry props.
  • Updates coverage for equivalent class output and prop precedence.
  • The latest commit replaces the prior non-TSDoc suppression comment with a TSDoc block directive while retaining the documented import order.

Reviews (4) · Last reviewed commit: "style(test): use TSDoc for the import-or..."

Comment thread packages/emcn/src/components/button/button.test.tsx Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 12 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptileai @cubic-dev-ai Please review the current head; the previous scored reviews cover earlier commits.

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

@greptileai @cubic-dev-ai Please review the current head; the previous scored reviews cover earlier commits.

@BillLeoutsakosvl346 I’ve started reviewing the changes since the last completed review. I’ll post the results here when it’s done.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

0 issues found across 3 files (changes from recent commits).

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

Comment thread packages/emcn/src/components/button/button.test.tsx Outdated
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptileai @cubic-dev-ai Please review the latest commit. The import-order directive now uses TSDoc while retaining the documented import order and passing Biome.

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

@greptileai @cubic-dev-ai Please review the latest commit. The import-order directive now uses TSDoc while retaining the documented import order and passing Biome.

@BillLeoutsakosvl346 I’ve started reviewing the changes since the last completed review. I’ll post the results here when it’s done.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

0 issues found across 1 file (changes from recent commits).

Re-trigger cubic

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai Please run a full review of this PR against its base branch on the current head, rather than an incremental review of only the latest commit. The latest incremental review reported no issues; this is the final review of the complete change.

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai Please run a full review of this PR against its base branch on the current head, rather than an incremental review of only the latest commit. The latest incremental review reported no issues; this is the final review of the complete change.

@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 14 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

Before / after visual comparison

Representative icon-button sizing combinations after replacing local size classes with shared sizes.

Within each numbered tile: first control = before; second control = after.

Rendered component fixtures with application CSS and local data, rather than authenticated product-page screenshots. These are representative visual examples, not end-to-end behavior coverage.

The fixture uses a generic X icon to isolate button sizing; these are not screenshots of the actual caller icons. This comparison covers the sizing migration, not every message-action interaction.

Current PR head checked at posting: 0be585b6b3.

Before and after: buttons light

Additional theme/state comparisons

Before and after: buttons dark

This branch was previously deployed

1 inactive deployment
Preview 0be585b6 Deployed Sep 21, 2026 by vercel[bot]
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