-
Notifications
You must be signed in to change notification settings - Fork 21
feat: dpr srcset options #307
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
Conversation
Features
Bug Fixes
Chore
ContributorsCommit-Lint commandsYou can trigger Commit-Lint actions by commenting on this PR:
|
cd96a39 to
961025b
Compare
frederickfogerty
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really good to me at a first pass! The tests look great and thanks for updating the types and the documentation.
I'm debating a bit the naming of the parameters - maybe including target isn't necessary (even though we use it intentionally). We could potentially just use DPRRatios or manualDPRRatios to make things clearer. I will discuss with the team and come back to you on this.
Other than the comment I left below, this looks really great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work, this is looking great 👍🏼. I left a couple of minor comments.
README.md
Outdated
| ); | ||
| ``` | ||
|
|
||
| will generate the following custom `q` to `dpr` mapping: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit, let's capitalize this to keep it consistent.
| will generate the following custom `q` to `dpr` mapping: | |
| Will generate the following custom `q` to `dpr` mapping: |
dist/index.cjs.js
Outdated
| return target; | ||
| } | ||
|
|
||
| function _typeof(obj) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 🪄
sherwinski
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking the time to do this @sylcastaing! A small nitpick from my end: we generally avoid checking in the dist/ directory in PRs as that is all handled during the release step.
|
@sylcastaing so I discussed with my team and we'd like to call the parameters |
Ok thanks ! I have time tomorrow morning (Paris TZ) to make the last changes |
|
Merci @sylcastaing, ca sonne bien ! À demain 👋 |
|
I have push a new commit (not sure if the commit message is correct) with :
|
luqven
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm 👍🏼
Will let @frederickfogerty approve once he's had a chance to review.
frederickfogerty
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks so much for the contribution here @sylcastaing
# [3.3.0](v3.2.2...v3.3.0) (2021-12-16) ### Features * dpr srcset options ([#307](#307)) ([380abf0](380abf0)) [skip ci]
# [3.4.0](v3.2.2...v3.4.0) (2021-12-16) ### Features * dpr srcset options ([#307](#307)) ([380abf0](380abf0))
# [3.4.0](v3.2.2...v3.4.0) (2021-12-16) ### Features * dpr srcset options ([#307](#307)) ([380abf0](380abf0))
Description
This PR add 2 new options to control DPR
srcsetgeneration :targetDPRRatiosto generate DPR we need Allow configure srcSet DPR generation #304targetDPRRatiosQualitiesto control image quality by DPR Allow different Quality presets for buildSrcSet #284No breaking changes.
buildSrcSetreturn the same as before if we don't provide this new options.Checklist: New Feature
chore(readme): fix typo. See the end of this file for more information.BREAKING CHANGEin the body of the commit.Steps to Test
targetDPRRatiosResult :
targetDPRRatiosQualitiesResult :