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

Image width prop should be optional #467

Closed
1 task done
pjlee11 opened this issue Apr 24, 2019 · 0 comments · Fixed by #492
Closed
1 task done

Image width prop should be optional #467

pjlee11 opened this issue Apr 24, 2019 · 0 comments · Fixed by #492
Labels
ws-articles Tasks for the WS Articles Team ws-home Tasks for the WS Home Team

Comments

@pjlee11
Copy link
Contributor

pjlee11 commented Apr 24, 2019

Is your feature request related to a problem? Please describe.
In the psammead-image we currently have props for both height and width. However, height is an optional value due to this issue and width is required making them inconsistent. For context <amp-img> requires both height and width to be AMP valid. This means in some cases height and width are required and in other cases they aren't strictly required HTML attributes on the element.

Also we are aiming for our psammead components to be as re-usable as possible meaning we shouldn't enforce width/height being passed in to the component but instead enforce this in the container bespoke to our rendering scenario.

Describe the solution you'd like

  • Make width prop optional on the image component
  • Explain the benefits of passing width and height props in the psammead-image README.md

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Testing notes
[Tester to complete]

Dev insight: There should be no regression in the component. There should be stories and unit test for the optional behaviour of the width prop.

Additional context

@pjlee11 pjlee11 added Refinement Needed This is ready for refinement. It shouldn't be worked on until it has been refined by Dev & Test. ws-home Tasks for the WS Home Team ws-articles Tasks for the WS Articles Team labels Apr 24, 2019
@dr3 dr3 removed the Refinement Needed This is ready for refinement. It shouldn't be worked on until it has been refined by Dev & Test. label Apr 25, 2019
@ghost ghost self-assigned this May 2, 2019
@ghost ghost mentioned this issue May 2, 2019
3 tasks
@ghost ghost closed this as completed in #492 May 9, 2019
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ws-articles Tasks for the WS Articles Team ws-home Tasks for the WS Home Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants