Skip to content

Conversation

@TrevorBurnham
Copy link
Contributor

Description of changes:

This CR refactors the three visual mode hooks (useCurrentMode, useDensityMode, and useReducedMotion) to reduce duplication. All behavior should be identical.

This change reduces raw bundle size by 444 bytes, and should make maintenance for these functions a bit easier.


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

@TrevorBurnham TrevorBurnham requested a review from a team as a code owner October 31, 2025 19:49
@TrevorBurnham TrevorBurnham requested review from pan-kot and removed request for a team October 31, 2025 19:49
@codecov
Copy link

codecov bot commented Nov 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.77%. Comparing base (54c5ad9) to head (7ede906).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #171      +/-   ##
==========================================
- Coverage   98.78%   98.77%   -0.01%     
==========================================
  Files          36       36              
  Lines         904      900       -4     
  Branches      255      241      -14     
==========================================
- Hits          893      889       -4     
  Misses         11       11              

☔ 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.

@pan-kot pan-kot added this pull request to the merge queue Nov 4, 2025
Merged via the queue into cloudscape-design:main with commit 650399a Nov 4, 2025
43 checks passed
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.

2 participants