Skip to content

[useMediaQuery] Add warning and docs for using useMediaQuery('print') #44790

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 12, 2025

Conversation

good-jinu
Copy link
Contributor

@good-jinu good-jinu commented Dec 17, 2024

Closes #17595

If these 'print' query warnings are deemed unnecessary, they will be removed.
Review them please.

- Explained that 'print' queries may not accurately reflect re-rendering changes in print environments.
- Added warning for using `print` query
@mui-bot
Copy link

mui-bot commented Dec 17, 2024

Netlify deploy preview

@material-ui/core/useMediaQuery: parsed: +2.95% , gzip: +4.16%
@material-ui/core: parsed: +0.07% , gzip: +0.15%
@material-ui/system: parsed: +0.47% , gzip: +0.73%

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against 927ab3d

@good-jinu good-jinu changed the title Add warning for using useMediaQuery('print') [material-ui][useMediaQuery]Add warning for using useMediaQuery('print') Dec 17, 2024
@zannager zannager requested a review from siriwatknp December 17, 2024 15:20
@aarongarciah aarongarciah added package: system Specific to @mui/system docs Improvements or additions to the documentation labels Dec 26, 2024
@ZeeshanTamboli ZeeshanTamboli changed the title [material-ui][useMediaQuery]Add warning for using useMediaQuery('print') [material-ui][useMediaQuery] Add warning for using useMediaQuery('print') Dec 27, 2024
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Mar 23, 2025
@good-jinu good-jinu force-pushed the docs/use-media-query-print branch from 13649ee to c1fbb29 Compare March 23, 2025 15:12
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Mar 23, 2025
@ZeeshanTamboli ZeeshanTamboli added v6.x needs cherry-pick The PR should be cherry-picked to master after merge labels Apr 11, 2025
@ZeeshanTamboli ZeeshanTamboli changed the title [material-ui][useMediaQuery] Add warning for using useMediaQuery('print') [material-ui][useMediaQuery] Add warning and docs for using useMediaQuery('print') Apr 12, 2025
@ZeeshanTamboli ZeeshanTamboli changed the title [material-ui][useMediaQuery] Add warning and docs for using useMediaQuery('print') [useMediaQuery] Add warning and docs for using useMediaQuery('print') Apr 12, 2025
Copy link
Member

@ZeeshanTamboli ZeeshanTamboli left a comment

Choose a reason for hiding this comment

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

@good-jinu Thanks for the PR.

@ZeeshanTamboli ZeeshanTamboli merged commit daf9478 into mui:master Apr 12, 2025
22 checks passed
Copy link

Cherry-pick PRs will be created targeting branches: v6.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation hook: useMediaQuery needs cherry-pick The PR should be cherry-picked to master after merge package: system Specific to @mui/system v6.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[material-ui] useMediaQuery('print') doesn't work when print started from window.print
7 participants