-
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(classifier): proportional height for subject images #6276
Conversation
4b0e19f
to
6ab0c49
Compare
6ab0c49
to
a15f608
Compare
a15f608
to
a70d010
Compare
A fixed height subject breaks the layout on small screens, so this won't work on a phone. Having said that, the current |
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 changing from max-height
to height
results in a bug where the viewer no longer adjusts to viewports < 1000px. The subject image must adjust as the viewport width adjusts. See https://local.zooniverse.org:3000/projects/fr/fulsdavid/the-daily-minor-planet/classify/workflow/22354?env=production&demo=true as an example where subject images are always square images.
🚨 Here's a screenshot of my phone's Safari browser with this branch run locally. The image is squished:
@eatyourgreens I realize I'm repeating what you commented about phones earlier, but how do you want to proceed with this PR? It introduces a bug. For instance, I can look at the production version of Daily Minor Planet on my phone and the subject image is scaled correctly. That's changed in this PR. |
I'm not sure. CSS |
I'd suggest using |
When 'limit subject height' is enabled, style subject images with a proportional height of 90% of the viewport height, up to a maximum size of the original image height.
e8fee6d
to
07da390
Compare
I played around with this a bit more tonight but couldn't get it to work on tablet-sized screens. |
When 'limit subject height' is enabled, style subject images with a proportional height of 90% of the viewport height, up to a maximum size of the original image height.
Please request review from
@zooniverse/frontend
team or an individual member of that team.Package
Linked Issue and/or Talk Post
How to Review
Subject height should now be fixed during all workflow tasks, but never larger than the viewport.
https://local.zooniverse.org:3000/projects/chloezycheng/science-scribbler-synapse-safari/classify/workflow/26732
Screen.Recording.2024-09-10.at.13.54.07.mov
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