Skip to content

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

Merged
ZeeshanTamboli merged 6 commits into
mui:masterfrom
good-jinu:docs/use-media-query-print
Apr 12, 2025
Merged

ZeeshanTamboli merged 6 commits into
mui:masterfrom
good-jinu:docs/use-media-query-print

Conversation

@good-jinu

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

Copy link
Copy Markdown
Contributor

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

mui-bot commented Dec 17, 2024 •

Copy link
Copy Markdown

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 scope: system The system, the design tokens / styling foundations used across components. eg. @mui/system with MUI 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

@ZeeshanTamboli ZeeshanTamboli left a comment

Copy link
Copy Markdown
Member

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
@github-actions

Copy link
Copy Markdown
Contributor

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

github-actions Bot pushed a commit that referenced this pull request Apr 12, 2025
…)` (#44790)

Co-authored-by: ZeeshanTamboli <zeeshan.tamboli@gmail.com>
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. scope: system The system, the design tokens / styling foundations used across components. eg. @mui/system with MUI 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