-
Notifications
You must be signed in to change notification settings - Fork 29
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(lib-react-components): thumbnail image sizing #6360
base: master
Are you sure you want to change the base?
fix(lib-react-components): thumbnail image sizing #6360
Conversation
484a51d
to
99acec3
Compare
99acec3
to
5f25352
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.
Unfortunately this PR does unexpectedly change the size of images in markdown. Images are no longer constrained to their container without fill
(height: 100%, width: 100%).
Planet Hunters TESS has a bunch of images in its field guide, and when run on this branch, they push the field guide width way off the viewport. See https://local.zooniverse.org:3000/projects/nora-dot-eisner/planet-hunters-tess/classify/workflow/11235?env=production
The unexpected image behavior is also visible in lib-react-component's Storybook. Here's a screenshot of production:
Oh, that’s annoying, but it explains why the rule is there. I was able to reproduce the original bug in PFE, by adding Layout tables in HTML are a bad practice, so maybe the solution is to discourage people from using them. |
Remove the Grommet `fill` prop from thumbnail images, which should fix odd sizing problems in markdown images.
I missed this because I've been looking at the storybook on a widescreen monitor. 🤦 I can reproduce it if I shrink my browser window too. |
5f25352
to
7b2d2af
Compare
@goplayoutside3 I can fix the storybook by adding |
I'll push a commit with that styling change, but feel free to close this if it creates more problems than it solves. I've checked it locally with PH-TESS and Wildwatch Burrowing Owl, and it seems OK. |
Remove the Grommet
fill
prop from thumbnail images, which should fix odd sizing problems in markdown images.Please request review from
@zooniverse/frontend
team or an individual member of that team.Package
Linked Issue and/or Talk Post
How to Review
yarn bootstrap:es6
to build the component libraries and Next.js apps, then run the project app locally withyarn start
.Shaun's test project has some images in markdown tables:
https://local.zooniverse.org:3000/projects/darkeshard/test-project-2022/about/results
WildWatch Burrowing Owl has a bunch of thumbnail image components in the tutorial, field guide and survey task. None of them should have changed on this branch.
https://local.zooniverse.org:3000/projects/sandiegozooglobal/wildwatch-burrowing-owl/classify/workflow/26938
The new home page might be using the
ThumbnailImage
component to render recent subjects, see #6333. You can runapp-root
locally to verify that those haven't changed size.The styling changes here shouldn't have changed the thumbnail images in the storybook, or in the
Markdownz
stories either.Checklist
PR Creator - Please cater the checklist to fit the review needed for your code changes.
PR Reviewer - Use the checklist during your review. Each point should be checkmarked or discussed before PR approval.
General
yarn panic && yarn bootstrap
ordocker-compose up --build
and FEM works as expectedGeneral UX
Example Staging Project: i-fancy-cats
Bug Fix