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

Story Promo - Fallback spacing for Leading promo #3150

Merged
merged 17 commits into from
Feb 20, 2020
Merged

Conversation

sareh
Copy link
Contributor

@sareh sareh commented Feb 17, 2020

Resolves #3149

Overall change: Leading story promo - ensures there's spacing between image and text blocks when viewing in browsers that don't support CSS Grid (screenshots below are in IE11)

Before Link to live storybook example with Persian text
Screenshot 2020-02-17 at 12 54 27

After Link to local storybook example with Persian text

Screenshot 2020-02-19 at 16 33 30

Code changes:

  • Add padding onto Text and Image blocks on the appropriate side to create a 'gutter' between the text and the image. e.g. on a RTL service like persian above, the Text block has a padding-left: 0.5rem; and the Image block has a padding-right: 0.5rem;

  • Ensure dir prop is being passed to Image and Text blocks, so the correct padding can be added.

  • Remove position: relative from top-level StoryPromoWrapper - this allows the Image and Text blocks to remain within block flow and therefore respect width & padding

Following this change, I checked all three promo types - Top Regular and Leading, with a media video variant, to ensure layout is as expected for each of them. All appear as expected.
Screenshot 2020-02-20 at 11 17 03


  • I have assigned myself to this PR and the corresponding issues
  • Automated jest tests added (for new features) or updated (for existing features)
  • This PR requires manual testing

@sareh sareh added ws-home Tasks for the WS Home Team ws-front-page-layout labels Feb 17, 2020
@sareh sareh self-assigned this Feb 17, 2020
@sareh sareh marked this pull request as ready for review February 19, 2020 16:54
Copy link
Contributor

@DenisHdz DenisHdz left a comment

Choose a reason for hiding this comment

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

Checked with Browserstack and the new fallback values are applied correctly 👍

leading-story-fallback

Copy link
Contributor

@AlistairGempf AlistairGempf left a comment

Choose a reason for hiding this comment

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

Looks good, based on the Chromatic snapshots and the code.

@PriyaKR PriyaKR self-assigned this Feb 20, 2020
@PriyaKR
Copy link
Contributor

PriyaKR commented Feb 20, 2020

@sareh i am seeing the text above the image on IE11 across all viewports verifies on browserstack.
Screen Shot 2020-02-20 at 11 43 45

@PriyaKR
Copy link
Contributor

PriyaKR commented Feb 20, 2020

LGTM.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ws-front-page-layout ws-home Tasks for the WS Home Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Story Promo - Leading variant needs fallback gutter
4 participants