Skip to content
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

Image modal fixes #299

Merged
merged 2 commits into from
Oct 28, 2021
Merged

Image modal fixes #299

merged 2 commits into from
Oct 28, 2021

Conversation

xvandish
Copy link
Contributor

@xvandish xvandish commented Oct 21, 2021

expand btn fit within container, constrain tall images to viewport height, attatch click handler to expand btn

Description of Change

This knocks out 3 bugs.

  1. Constrains expand button to within image.
  2. Constrains tall images to viewport height, so the entire image is visible
  3. Attaches click handler to the expand button (worked before because clicks propagated to image, except in the case where the expand button was outside of the image)

Related Issue

#290 #297

Motivation and Context

Checklist

  • Ran npm run lint and updated code style accordingly
  • npm run test passes
  • PR has a description and all contributors/stakeholder are noted/cc'ed
  • tests are updated and/or added to cover new code
  • relevant documentation is changed and/or added

@xvandish
Copy link
Contributor Author

For a future PR, I have a partially working idea for scaling the expand button based on the size of the image, in case an image smaller than the current dimensions (60x60) is displayed -

@afischer afischer changed the title expand btn fit within container, constrain tall images to viewport he… Image modal fixes Oct 21, 2021
Copy link
Member

@afischer afischer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fixes, looks great!

styles/partials/core/_furniture.scss Outdated Show resolved Hide resolved
@afischer afischer merged commit 154b5e3 into main Oct 28, 2021
@afischer afischer deleted the fix/image-modal-bugs branch October 28, 2021 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tall images cut off when expanded Modal expand icon placement incorrect for non full-width images
2 participants