Skip to content

chore: Explore icon scale - InlineSize#4486

Draft
at-susie wants to merge 36 commits into
mainfrom
explore/small-icon-scale
Draft

chore: Explore icon scale - InlineSize#4486
at-susie wants to merge 36 commits into
mainfrom
explore/small-icon-scale

Conversation

@at-susie
Copy link
Copy Markdown
Member

@at-susie at-susie commented May 4, 2026

Description

Related links, issue #, if available: n/a

How has this been tested?

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

at-susie added 4 commits May 4, 2026 14:44
Introduce an alternative approach to icon size customization that uses
CSS transform: scale() instead of remapping to different named size
variants. The IconProvider gains a new iconScale prop (number, default 1)
that applies a scale transform to all descendant Icon components.

Key differences from the size-remap approach:
- Icons retain their original size class and layout box
- No per-component layout/position adjustments needed
- Supports arbitrary numeric scale factors (e.g. 0.75 for 12px from 16px)
- Nested providers can override or inherit the parent scale
- Replace single iconScale prop with iconSizeNormal and iconSizeInherit props for granular control
- Update IconProvider context to store pixel sizes instead of scale factors
- Modify icon internal component to apply pixel-based sizing via CSS custom properties
- Add token-names utility to generate size token identifiers
- Introduce visual-refresh sizes token configuration for icon variants
- Update demo page to showcase per-variant sizing with nested provider inheritance
- Simplify icon mixin to use CSS variables for size application
- Update themed stroke width demo label for clarity (12px instead of 16px)
- Add copyright and SPDX license header to generated snapshot
- Import appendSelector utility from test-utils-core
- Add comprehensive component wrapper imports and exports
- Include all Cloudscape Design System component wrappers in snapshot
- Update generated test utilities module structure
@codecov
Copy link
Copy Markdown

codecov Bot commented May 4, 2026

Codecov Report

❌ Patch coverage is 34.34343% with 65 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.20%. Comparing base (f493264) to head (16d0bc8).

Files with missing lines Patch % Lines
src/icon/internal.tsx 37.28% 36 Missing and 1 partial ⚠️
src/icon-provider/internal.tsx 26.31% 28 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4486      +/-   ##
==========================================
- Coverage   97.41%   97.20%   -0.22%     
==========================================
  Files         933      933              
  Lines       29595    29689      +94     
  Branches    10757    10798      +41     
==========================================
+ Hits        28831    28860      +29     
- Misses        716      821     +105     
+ Partials       48        8      -40     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

at-susie added 5 commits May 5, 2026 06:28
- Move icon-scale-provider demo page from pages/icon to pages/theming
- Update app layout configuration to recognize theming/icon-scale-provider as app layout page
- Update IconProvider context and interfaces to support per-variant pixel size props
- Replace CSS transform: scale() approach with direct pixel size properties (iconSizeNormal, iconSizeInherit, etc.)
- Update icon internal component and mixins to apply per-variant sizes instead of transform scaling
- Reorganize demo to better reflect theming capabilities rather than icon-specific functionality
@at-susie at-susie marked this pull request as ready for review May 5, 2026 11:57
@at-susie at-susie requested a review from a team as a code owner May 5, 2026 11:57
@at-susie at-susie requested review from gethinwebster and removed request for a team May 5, 2026 11:57
@at-susie at-susie marked this pull request as draft May 5, 2026 11:57
@at-susie at-susie removed the request for review from gethinwebster May 5, 2026 11:57
@at-susie at-susie changed the title chore: Explore icon scale using transform-scale chore: Explore icon scale - InlineSize May 5, 2026
at-susie added 6 commits May 7, 2026 10:12
- Replace individual iconSizeSmall, iconSizeNormal, iconSizeMedium, iconSizeBig, iconSizeLarge, and iconSizeInherit props with a single sizes object
- Create IconProviderProps.Sizes interface with small, normal, medium, big, large, and inherit optional properties
- Update InternalIconProvider to destructure sizes prop and simplify size override map construction
- Reduce dependency array in useMemo from 7 items to 2 (contextSizeOverrides, sizes)
- Update demo page to use new sizes object structure
- Improves API ergonomics by grouping related size configuration into a single cohesive object
…nd fix icon sizing

- Add expanded SideNavigation example with sections to the theming test page
- Set min-inline-size on icon containers in expandable-section to prevent shrinking
- Fix icon mapped-height calculation to use supportedLineHeight instead of size
at-susie added 2 commits May 11, 2026 22:43
- Move icon-scale-provider page from theming to icon-provider directory
- Replace Badge component with StatusIndicator in table category cells
- Add TreeView component examples with connector lines and action patterns
- Remove unused imports (useLayoutEffect, Badge, Toggle, applyTheme, Theme)
- Update page routing reference to reflect new directory structure
- Clean up commented-out Typography section code
- Enhance icon-provider demo with tree view showcase and status indicators
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