Skip to content

Commit c9440a8

Browse files
authored
Merge branch 'main' into ih/hosted-article-layout
2 parents 507d439 + 2bf21d0 commit c9440a8

File tree

6 files changed

+42
-22
lines changed

6 files changed

+42
-22
lines changed

ab-testing/frontend/src/lib/components/TestVariants.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<li>
2121
<a
2222
href={`https://www.theguardian.com/ab-tests/opt/in/${testName}:${group}`}
23+
target="_blank"
2324
>
2425
{group} ({formatter.format(
2526
((1 / testGroups.length) * size) / 100,

dotcom-rendering/src/components/SelfHostedVideo.stories.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ const meta = {
2020
export default meta;
2121
type Story = StoryObj<typeof SelfHostedVideo>;
2222

23-
export const Loop4to5: Story = {
24-
name: 'Looping video in 4:5 aspect ratio',
23+
export const Loop5to4: Story = {
24+
name: 'Looping video in 5:4 aspect ratio',
2525
args: {
2626
sources: [
2727
{
@@ -31,6 +31,7 @@ export const Loop4to5: Story = {
3131
],
3232
uniqueId: 'test-video-1',
3333
atomId: 'test-atom-1',
34+
videoStyle: 'Loop',
3435
height: 720,
3536
width: 900,
3637
posterImage:
@@ -59,7 +60,7 @@ export const Loop4to5: Story = {
5960
export const Loop16to9: Story = {
6061
name: 'Looping video in 16:9 aspect ratio',
6162
args: {
62-
...Loop4to5.args,
63+
...Loop5to4.args,
6364
sources: [
6465
{
6566
src: 'https://uploads.guim.co.uk/2024/10/01/241001HeleneLoop_2.mp4',
@@ -73,13 +74,13 @@ export const Loop16to9: Story = {
7374

7475
export const WithCinemagraph: Story = {
7576
args: {
76-
...Loop4to5.args,
77+
...Loop5to4.args,
7778
videoStyle: 'Cinemagraph',
7879
},
7980
};
8081

8182
export const PausePlay: Story = {
82-
...Loop4to5,
83+
...Loop5to4,
8384
name: 'Pause and play interaction',
8485
play: async ({ canvasElement }) => {
8586
const canvas = within(canvasElement);
@@ -100,7 +101,7 @@ export const PausePlay: Story = {
100101
};
101102

102103
export const UnmuteMute: Story = {
103-
...Loop4to5,
104+
...Loop5to4,
104105
name: 'Unmute and mute interaction',
105106
parameters: {
106107
test: {
@@ -127,7 +128,7 @@ function sleep(ms: number) {
127128
}
128129

129130
export const InteractionObserver: Story = {
130-
...Loop4to5,
131+
...Loop5to4,
131132
name: 'Interaction observer',
132133
render: (args) => (
133134
<div data-testid="test-container">

dotcom-rendering/src/components/SelfHostedVideoPlayer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ type Props = {
101101
sources: Source[];
102102
atomId: string;
103103
uniqueId: string;
104-
width: number;
105104
height: number;
105+
width: number;
106106
videoStyle: VideoPlayerFormat;
107107
FallbackImageComponent: ReactElement;
108108
isPlayable: boolean;
@@ -143,8 +143,8 @@ export const SelfHostedVideoPlayer = forwardRef(
143143
sources,
144144
atomId,
145145
uniqueId,
146-
width,
147146
height,
147+
width,
148148
videoStyle,
149149
FallbackImageComponent,
150150
posterImage,

dotcom-rendering/src/components/marketing/banners/designableBanner/DesignableBanner.tsx

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,10 @@ const DesignableBanner: ReactComponent<BannerRenderProps> = ({
424424
<div
425425
css={
426426
isCollapsableBanner
427-
? styles.closeAndCollapseButtonContainer
427+
? styles.closeAndCollapseButtonContainer(
428+
isCollapsed,
429+
isMaybeLaterVariant,
430+
)
428431
: styles.closeButtonContainer
429432
}
430433
>
@@ -437,9 +440,11 @@ const DesignableBanner: ReactComponent<BannerRenderProps> = ({
437440
onClick={() =>
438441
handleSetIsCollapsed(!isCollapsed)
439442
}
440-
cssOverrides={styles.iconOverrides(
441-
templateSettings.closeButtonSettings,
442-
)}
443+
cssOverrides={[
444+
styles.iconOverrides(
445+
templateSettings.closeButtonSettings,
446+
),
447+
]}
443448
priority="secondary"
444449
icon={
445450
isCollapsed ? (
@@ -679,7 +684,7 @@ const styles = {
679684
${from.desktop} {
680685
max-width: 980px;
681686
padding: ${space[1]}px ${space[1]}px 0 ${space[3]}px;
682-
grid-template-columns: auto 380px auto;
687+
grid-template-columns: auto 380px minmax(100px, auto);
683688
grid-template-rows: auto auto;
684689
685690
grid-template-areas:
@@ -743,7 +748,10 @@ const styles = {
743748
padding-left: ${space[8]}px;
744749
}
745750
`,
746-
closeAndCollapseButtonContainer: css`
751+
closeAndCollapseButtonContainer: (
752+
isCollapsed: boolean,
753+
isMaybeLaterVariant: boolean,
754+
) => css`
747755
/* Layout changes only here */
748756
grid-area: close-button;
749757
display: flex;
@@ -761,7 +769,10 @@ const styles = {
761769
margin-top: ${space[2]}px;
762770
}
763771
${from.desktop} {
764-
margin-top: ${space[5]}px;
772+
flex-direction: ${isCollapsed ? 'row' : 'row-reverse'};
773+
margin-top: ${isCollapsed && isMaybeLaterVariant
774+
? space[9]
775+
: space[6]}px;
765776
}
766777
767778
.maybe-later & {
@@ -940,6 +951,7 @@ const styles = {
940951
}
941952
${from.desktop} {
942953
justify-self: end;
954+
padding-right: ${space[8]}px;
943955
width: 299px;
944956
}
945957
${between.desktop.and.wide} {
@@ -976,7 +988,7 @@ const styles = {
976988
.maybe-later & {
977989
flex-direction: row;
978990
flex-wrap: wrap;
979-
padding: ${space[3]}px;
991+
padding: ${space[3]}px 0;
980992
}
981993
982994
${until.phablet} {
@@ -1052,7 +1064,7 @@ const styles = {
10521064
collapsableButtonContainer: css`
10531065
margin-left: ${space[2]}px;
10541066
${from.desktop} {
1055-
margin-top: ${space[1]}px;
1067+
margin: 0;
10561068
}
10571069
`,
10581070
iconOverrides: (ctaSettings?: CtaSettings) => css`
@@ -1063,6 +1075,10 @@ const styles = {
10631075
}
10641076
margin-top: ${space[1]}px;
10651077
margin-right: ${space[1]}px;
1078+
1079+
${from.desktop} {
1080+
margin: 0;
1081+
}
10661082
`,
10671083
};
10681084

dotcom-rendering/src/components/marketing/gutters/GutterAsk.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ const textBlock = css`
3636
align-items: flex-start;
3737
padding: ${space[2]}px;
3838
gap: ${space[1]}px;
39+
max-width: 100%;
3940
`;
4041
const bodySection = css`
4142
color: ${palette.neutral[0]};
@@ -46,6 +47,7 @@ const ctaSection = css`
4647
color: ${palette.neutral[0]};
4748
margin-top: ${space[3]}px;
4849
margin-bottom: ${space[4]}px;
50+
max-width: 100%;
4951
`;
5052
const cta = css`
5153
left: ${space[2]}px;

pnpm-lock.yaml

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)