-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fix(web-react): Recalculate FileUploader image preview by crop values #1124
Conversation
✅ Deploy Preview for spirit-design-system-storybook ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for spirit-design-system-react ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 27a3a13. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 3 targetsSent with 💌 from NxCloud. |
✅ Deploy Preview for spirit-design-system-demo ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for spirit-design-system-validations canceled.
|
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 is my first impression, haven't tested it yet.
packages/web-react/src/components/FileUploader/useFileUploaderStyleProps.ts
Outdated
Show resolved
Hide resolved
packages/web-react/src/components/FileUploader/useFileUploaderStyleProps.ts
Outdated
Show resolved
Hide resolved
fa702ca
to
fb17044
Compare
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.
Still haven't tested (as we said, it's not easy), but it looks good. 👍🏻
packages/web-react/src/components/FileUploader/__tests__/useFileUploaderStyleProps.test.ts
Show resolved
Hide resolved
packages/web-react/src/components/FileUploader/useFileUploaderStyleProps.ts
Outdated
Show resolved
Hide resolved
* need to use additional dimensions - natural width and height to calculate dimensions of previewed image * also need to better calculate the scale of the entire image and also position when we need to display the possible crop refs #DS-1038
* need to use additional dimensions - natural width and height to calculate dimensions of previewed image * also need to better calculate the scale of the entire image and also position when we need to display the possible crop refs #DS-1038
* allow larger base64 image to increase quality of previewed image refs #DS-1039
* allow larger base64 image to increase quality of previewed image refs #DS-1039
fb17044
to
27a3a13
Compare
Description
calculate dimensions of previewed image
position when we need to display the possible crop
Additional context
https://almamedia.slack.com/archives/C050YPZ3YRW/p1698830929192449
Issue reference
https://jira.lmc.cz/browse/DS-1038
Before submitting the PR, please make sure you do the following
fixes #123
).