Skip to content

Conversation

@jperals
Copy link
Member

@jperals jperals commented Nov 11, 2025

Description

Support for matchMedia should be more than good enough (MDN docs), but it is returning null sometimes for some team's canaries, causing operational pain.

See AWSUI-61447.

Aiming to refactor by moving useMobile into component-toolkit (cloudscape-design/component-toolkit#173, cloudscape-design/component-toolkit#174), but that is taking longer, so I will do that on the side and expedite this fix in this form first.

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.

@codecov
Copy link

codecov bot commented Nov 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.99%. Comparing base (a79c3a7) to head (eeb4361).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4028   +/-   ##
=======================================
  Coverage   96.99%   96.99%           
=======================================
  Files         861      861           
  Lines       25214    25213    -1     
  Branches     9094     9094           
=======================================
  Hits        24456    24456           
+ Misses        711      710    -1     
  Partials       47       47           

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

@jperals jperals force-pushed the chore/tolerate-null-matchmedia branch from a4badb7 to eeb4361 Compare November 14, 2025 07:26
@jperals jperals marked this pull request as ready for review November 14, 2025 07:43
@jperals jperals requested a review from a team as a code owner November 14, 2025 07:43
@jperals jperals requested review from taheramr and removed request for a team November 14, 2025 07:43
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