Skip to content
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

feat: Support media queries in optional modes #47

Merged
merged 1 commit into from
Jun 12, 2023
Merged

Conversation

gethinwebster
Copy link
Member

@gethinwebster gethinwebster commented Jun 9, 2023

Add support for media queries in optional modes, so that we can limit dark mode to non-print media.

See also cloudscape-design/components#1204

@codecov
Copy link

codecov bot commented Jun 9, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.02 🎉

Comparison is base (eab1f5d) 96.72% compared to head (a599dc6) 96.74%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #47      +/-   ##
==========================================
+ Coverage   96.72%   96.74%   +0.02%     
==========================================
  Files          41       41              
  Lines         946      952       +6     
  Branches      107      108       +1     
==========================================
+ Hits          915      921       +6     
  Misses         29       29              
  Partials        2        2              
Impacted Files Coverage Δ
src/__fixtures__/common.ts 100.00% <ø> (ø)
src/shared/declaration/multi.ts 95.65% <ø> (ø)
src/shared/declaration/rule.ts 100.00% <100.00%> (ø)
src/shared/declaration/single.ts 100.00% <100.00%> (ø)
src/shared/declaration/stylesheet.ts 98.30% <100.00%> (+0.12%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@gethinwebster gethinwebster marked this pull request as ready for review June 12, 2023 14:26
@gethinwebster gethinwebster requested a review from a team as a code owner June 12, 2023 14:26
@gethinwebster gethinwebster requested review from just-boris and removed request for a team June 12, 2023 14:26
Copy link
Member

@just-boris just-boris left a comment

Choose a reason for hiding this comment

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

The code looks good, but I am slightly concerned about JS relying on the current mode.

I found one use-case: https://github.com/cloudscape-design/components/blob/dc41633e232ab1619462503d01968415f831d492/src/code-editor/index.tsx#LL69C1-L69C1

Are we okay saying that code editor won't be supported? Or are you planning to make any changes in useVisualMode hook too?

@gethinwebster
Copy link
Member Author

@gethinwebster gethinwebster merged commit 5febd2e into main Jun 12, 2023
@gethinwebster gethinwebster deleted the mode-media branch June 12, 2023 15:26
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