Skip to content
This repository has been archived by the owner on Aug 13, 2023. It is now read-only.

Image stretching fix #234

Merged
merged 6 commits into from
Dec 20, 2018
Merged

Image stretching fix #234

merged 6 commits into from
Dec 20, 2018

Conversation

sareh
Copy link
Contributor

@sareh sareh commented Dec 19, 2018

Resolves #232

Fixes the stretching issue by making the height prop optional.

Screenshot of the image scaling correctly with smaller breakpoints:
http://localhost:8080?selectedKind=Image
screen shot storybook image

  • I have assigned myself to this PR and the corresponding issues
  • Tests added for new features
  • Test engineer approval

@sareh sareh self-assigned this Dec 19, 2018
sareh and others added 2 commits December 19, 2018 13:05
Co-Authored-By: sareh <sareh.heidari@gmail.com>
Copy link
Contributor

@ChrisBAshton ChrisBAshton left a comment

Choose a reason for hiding this comment

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

Can we update the README and make it clear the height is optional (and the implications for specifying it)? https://github.com/BBC-News/psammead/tree/latest/packages/components/psammead-image#usage

@@ -2,4 +2,5 @@

| Version | Description |
|---------|-------------|
| 0.2.0 | [PR#234](https://github.com/BBC-News/psammead/pull/234) Change height prop to be optional. Update the storybook example. |

This comment was marked as resolved.

ChrisBAshton
ChrisBAshton previously approved these changes Dec 19, 2018
| `src` | string | Yes |
| `width` | number/string | Yes |

The `height` prop is optional, since in some cases to preserve the image ratio we only want to specify the width and let the browser scale the image accordingly. However, in other cases the height might need to be specified.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice 👏

@sareh sareh dismissed stale reviews from radiocontrolled and ChrisBAshton via 2c3db49 December 19, 2018 16:33
Copy link
Contributor

@radiocontrolled radiocontrolled left a comment

Choose a reason for hiding this comment

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

🐻

@sareh sareh merged commit d0f17fc into latest Dec 20, 2018
@sareh sareh deleted the image-stretching-fix branch December 20, 2018 11:16
@pjlee11 pjlee11 mentioned this pull request Apr 24, 2019
1 task
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants