fix: warn in dev mode if density is provided above 2x - #973
Merged
Conversation
Deploying with
|
| Latest commit: |
486f8a1
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://2077866c.nuxt-image.pages.dev |
| Branch Preview URL: | https://fix-warn-density-2.nuxt-image.pages.dev |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #973 +/- ##
==========================================
- Coverage 89.18% 89.15% -0.04%
==========================================
Files 44 44
Lines 2904 2914 +10
Branches 322 324 +2
==========================================
+ Hits 2590 2598 +8
- Misses 313 315 +2
Partials 1 1
☔ View full report in Codecov by Sentry. |
pi0
reviewed
Sep 10, 2023
pi0
reviewed
Sep 10, 2023
pi0
approved these changes
Sep 10, 2023
Co-authored-by: Pooya Parsa <pooya@pi0.io>
Co-authored-by: Pooya Parsa <pooya@pi0.io>
Merged
riddla
pushed a commit
to tricks-gmbh/nuxt-image
that referenced
this pull request
Mar 1, 2024
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
resolves #912
This PR warns in dev mode if user is setting a density > 2x, linking to https://observablehq.com/@eeeps/visual-acuity-and-device-pixel-ratio.
It doesn't hard-disable this although this might be something we consider in future.
This also refactors the density parsing expression slightly to use a Set for deduplicating.