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

Feature/image size #190

Merged
merged 15 commits into from Oct 11, 2019
Merged

Feature/image size #190

merged 15 commits into from Oct 11, 2019

Conversation

lbebber
Copy link
Contributor

@lbebber lbebber commented Oct 7, 2019

What is the purpose of this pull request?

Adds width and height props to ProductImage.

Also adds css handles (to ProductImage).

What problem is this solving?

How should this be manually tested?

https://lbebber--storecomponents.myvtex.com/
Look at the first shelf, and confirm that the size is set as follows:

  "product-summary-image": {
    "props": {
      "width": {
        "desktop": "200",
        "mobile": "100"
      },
      "height": {
        "desktop": "500",
        "mobile": "100"
      }
    }
  },

(it takes into consideration the device's pixel density, so the image size might be twice or more depending on your screen, but the element itself should conform to these dimensions)

Screenshots or example usage

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Requires change to documentation, which has been updated accordingly.

@vtex-io-ci-cd
Copy link
Contributor

vtex-io-ci-cd bot commented Oct 7, 2019

Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖

Please select which version do you want to release:

  • Patch

  • Minor

  • Major

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

  • No thanks, I would rather do it manually 😞

@vtex-io-docs-bot
Copy link

Beep boop 🤖

Thank you so much for keeping our documentation up-to-date ❤️

@lbebber lbebber requested a review from a team October 7, 2019 19:06
Copy link
Contributor

@klzns klzns left a comment

Choose a reason for hiding this comment

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

Fix unit tests

@@ -193,6 +232,8 @@ ProductImage.propTypes = {
/** Display mode of the summary */
displayMode: PropTypes.oneOf(['normal', 'inline']),
hoverImageLabel: PropTypes.string,
width: PropTypes.number,
Copy link
Contributor

Choose a reason for hiding this comment

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

Add object type as well

@lbebber lbebber requested a review from klzns October 7, 2019 22:48
@lbebber lbebber merged commit 8d56550 into master Oct 11, 2019
@lbebber lbebber deleted the feature/image-size branch October 11, 2019 14:22
@vtex-io-ci-cd
Copy link
Contributor

vtex-io-ci-cd bot commented Oct 11, 2019

Your PR has been merged! App is being published. 🚀
Version 2.36.0 → 2.37.0

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.

None yet

2 participants