Skip to content

chore: Tolerate matchMedia returning null - #4028

Merged
jperals merged 1 commit into
mainfrom
chore/tolerate-null-matchmedia
Nov 18, 2025
Merged

chore: Tolerate matchMedia returning null#4028
jperals merged 1 commit into
mainfrom
chore/tolerate-null-matchmedia

Conversation

@jperals

@jperalsjperals commented Nov 11, 2025

Copy link
Copy Markdown
Member

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

codecovBot commented Nov 11, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.99%. Comparing base (a79c3a7) to head (eeb4361).
⚠️ Report is 5 commits behind head on main.

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 added this pull request to the merge queueNov 18, 2025
Merged via the queue into main with commit fdcaf65Nov 18, 2025
50 checks passed
@jperals
jperals deleted the chore/tolerate-null-matchmedia branch November 18, 2025 07:57
jperals added a commit that referenced this pull request Nov 18, 2025
ngynmt pushed a commit to ngynmt/components that referenced this pull request Jan 5, 2026
Sign up for freeto 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

@jperals@pan-kot