bbc / simorgh

The BBC's Open Source Web Application. Contributions welcome! Used on some of our biggest websites, e.g.
https://www.bbc.com/thai
Other
1.39k stars 219 forks source link

WSTEAMA-1261-width parameter appearing in Billboard URL's means image being rendered is the fallback #11761

Closed Nabeel1276 closed 1 month ago

Nabeel1276 commented 2 months ago

Resolves (https://jira.dev.bbc.co.uk/browse/WSTEAMA-1261)

Overall changes

Hard coded 240 as the value for the image width and updated fixtures to ensure tests pass

Code changes

Used replace function to replace the width with a hard coded string of 240

Testing

Ensure when inspecting a page with a Billboard or messageBanner (i.e Hindi), the width value on the image url is 240 (px) Open up the Developer Tools in your browser, then using the web developer extension disable all CSS styles and check the size of the Billboard image. It should no longer be huge.

Helpful Links

Add Links to useful resources related to this PR if applicable.

Coding Standards

Repository use guidelines

Nabeel1276 commented 2 months ago

This bug is also present in the MessageBanner component, so it worth changing that too? (given what I have done is correct)

P.S. This has been done!