File tree Expand file tree Collapse file tree 3 files changed +23
-4
lines changed
dotcom-rendering/src/components Expand file tree Collapse file tree 3 files changed +23
-4
lines changed Original file line number Diff line number Diff line change @@ -604,7 +604,8 @@ export const Card = ({
604604 containerType === 'flexible/special' ||
605605 containerType === 'flexible/general' ;
606606
607- const isSmallCard = containerType === 'scrollable/small' ;
607+ const isSmallCard =
608+ containerType === 'scrollable/small' || isGallerySecondaryOnward ;
608609
609610 const hideTrailTextUntil = ( ) => {
610611 if ( isFlexibleContainer ) {
@@ -635,6 +636,13 @@ export const Card = ({
635636 * Order matters here as the logic is based on the card properties
636637 */
637638 const getGapSizes = ( ) : GapSizes => {
639+ if ( isGallerySecondaryOnward ) {
640+ return {
641+ row : 'medium' ,
642+ column : 'medium' ,
643+ } ;
644+ }
645+
638646 if ( isOnwardContent ) {
639647 return {
640648 row : 'none' ,
@@ -749,7 +757,12 @@ export const Card = ({
749757 onwardContent : boolean ,
750758 ) : 'large' | 'small' | undefined => {
751759 if ( mediaCard && betaContainer ) return 'large' ;
752- if ( mediaCard || onwardContent ) return 'small' ;
760+ if (
761+ ( mediaCard || onwardContent ) &&
762+ ! ( isGallerySecondaryOnward || isMoreGalleriesOnwardContent )
763+ ) {
764+ return 'small' ;
765+ }
753766 return undefined ;
754767 } ;
755768
@@ -1175,7 +1188,7 @@ export const Card = ({
11751188 padContent = { determinePadContent (
11761189 isMediaCardOrNewsletter ,
11771190 isBetaContainer ,
1178- isOnwardContent && ! isMoreGalleriesOnwardContent ,
1191+ isOnwardContent ,
11791192 ) }
11801193 >
11811194 { /* This div is needed to keep the headline and trail text justified at the start */ }
Original file line number Diff line number Diff line change 11import type { Meta , StoryObj } from '@storybook/react-webpack5' ;
22import { galleryOnwardsTrails } from '../../fixtures/manual/onwardsTrails' ;
3+ import { ArticleDesign , ArticleDisplay , Pillar } from '../lib/articleFormat' ;
34import { MoreGalleries as MoreGalleriesComponent } from './MoreGalleries' ;
45
56const meta = {
@@ -16,5 +17,10 @@ export const MoreGalleries = {
1617 discussionApiUrl : 'https://discussion.theguardian.com/discussion-api' ,
1718 guardianBaseUrl : 'https://www.theguardian.com' ,
1819 trails : galleryOnwardsTrails ,
20+ format : {
21+ design : ArticleDesign . Gallery ,
22+ display : ArticleDisplay . Standard ,
23+ theme : Pillar . Culture ,
24+ } ,
1925 } ,
2026} satisfies Story ;
Original file line number Diff line number Diff line change @@ -221,7 +221,7 @@ const getDefaultCardProps = (
221221 imageLoading : 'lazy' ,
222222 showAge : true ,
223223 aspectRatio : '5:4' ,
224- mediaSize : 'small' ,
224+ mediaSize : 'scrollable- small' ,
225225 mediaPositionOnDesktop : 'left' ,
226226 mediaPositionOnMobile : 'left' ,
227227 headlineSizes : {
You can’t perform that action at this time.
0 commit comments