Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(TMD-1221): Change height of Newsletter puff loading component #4004

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ export const InlineNewsletterPuff = ({

if (isLoading || !newsletter) {
return (
<InpContainer style={{ height: 257 }}>
<Placeholder />
<InpContainer id="INP CONTAINER InlineNewsletterPuff.tsx">
<Placeholder data-testid="PLACEHOLDER InlineNewsletterPuff.tsx" />
</InpContainer>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ exports[`<AutoNewsletterPuff> display function always renders 1`] = `
style="display: block;"
>
<div
class="sc-htpNat sc-ifAKCX kVAWuv"
style="height: 257px;"
class="sc-htpNat sc-ifAKCX fbplsh"
id="INP CONTAINER InlineNewsletterPuff.tsx"
>
<div
class="tc-view__TcView-nuazoi-0 fPjBcr"
Expand Down Expand Up @@ -45,8 +45,8 @@ exports[`<AutoNewsletterPuff> display function doesnt render without consent 1`]
style="display: none;"
>
<div
class="sc-htpNat sc-ifAKCX kVAWuv"
style="height: 257px;"
class="sc-htpNat sc-ifAKCX fbplsh"
id="INP CONTAINER InlineNewsletterPuff.tsx"
>
<div
class="tc-view__TcView-nuazoi-0 fPjBcr"
Expand Down Expand Up @@ -84,8 +84,8 @@ exports[`<AutoNewsletterPuff> using a display function [1, 3] count = 1 1`] = `
style="display: block;"
>
<div
class="sc-htpNat sc-ifAKCX kVAWuv"
style="height: 257px;"
class="sc-htpNat sc-ifAKCX fbplsh"
id="INP CONTAINER InlineNewsletterPuff.tsx"
>
<div
class="tc-view__TcView-nuazoi-0 fPjBcr"
Expand Down Expand Up @@ -123,8 +123,8 @@ exports[`<AutoNewsletterPuff> using a display function [1, 3] count = 2 1`] = `
style="display: none;"
>
<div
class="sc-htpNat sc-ifAKCX kVAWuv"
style="height: 257px;"
class="sc-htpNat sc-ifAKCX fbplsh"
id="INP CONTAINER InlineNewsletterPuff.tsx"
>
<div
class="tc-view__TcView-nuazoi-0 fPjBcr"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ exports[`Inline Newsletter Puff renders loading state state 1`] = `
<body>
<div>
<div
class="sc-htpNat sc-ifAKCX iWYiTB"
class="sc-htpNat sc-ifAKCX esKJGb"
id="INPCONTAINER Newsletter.tsx"
>
<div
class="sc-htpNat sc-dnqmqq duLROv"
Expand Down Expand Up @@ -54,8 +55,8 @@ exports[`Inline Newsletter Puff renders placeholder when loading 1`] = `
<body>
<div>
<div
class="sc-htpNat sc-ifAKCX kVAWuv"
style="height: 257px;"
class="sc-htpNat sc-ifAKCX fbplsh"
id="INP CONTAINER InlineNewsletterPuff.tsx"
>
<div
class="tc-view__TcView-nuazoi-0 fPjBcr"
Expand Down Expand Up @@ -92,7 +93,8 @@ exports[`Inline Newsletter Puff renders signup state 1`] = `
<body>
<div>
<div
class="sc-htpNat sc-ifAKCX iWYiTB"
class="sc-htpNat sc-ifAKCX esKJGb"
id="INPCONTAINER Newsletter.tsx"
>
<div
class="sc-htpNat sc-iwsKbI cuimXU"
Expand Down Expand Up @@ -136,7 +138,8 @@ exports[`Inline Newsletter Puff renders signup view when not already subscribed
<body>
<div>
<div
class="sc-htpNat sc-ifAKCX iWYiTB"
class="sc-htpNat sc-ifAKCX esKJGb"
id="INPCONTAINER Newsletter.tsx"
>
<div
class="sc-htpNat sc-iwsKbI cuimXU"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ export const Newsletter = ({
);
return (
<React.Fragment>
<InpContainer section={section}>
{loading && <LoadingOverlay />}
<InpContainer section={section} id="INPCONTAINER Newsletter.tsx">
{loading && (
<LoadingOverlay data-testid="LOADINGOVERLAY Newsletters.tsx" />
)}
{!error &&
justSubscribed && (
<InpSubscribedContainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const PreviewNewsletterPuff = ({
headline,
section
}: PreviewNewsletterPuffProps) => (
<InpContainer section={section}>
<InpContainer section={section} id="INPCONTAINER PreviewNewsletterPuff.tsx">
<InpSignupContainer>
<InpCopy>
<InpSignupHeadline>{headline} </InpSignupHeadline>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ exports[`Preview Newsletter Puff renders 1`] = `
<body>
<div>
<div
class="sc-bdVaJa sc-htpNat ljXtVU"
class="sc-bdVaJa sc-htpNat gCDBVF"
id="INPCONTAINER PreviewNewsletterPuff.tsx"
>
<div
class="sc-bdVaJa sc-EHOje hmOAGx"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,16 @@ export const InpContainer = styled(View)<{ section?: string }>`
margin-right: ${spacing(2)};
margin-bottom: ${spacing(4)};
margin-left: ${spacing(2)};
height: 181px;

@media (min-width: ${breakpoints.medium}px) {
margin: 0 auto ${spacing(4)};
width: 80.8%;
height: 155px;
}
@media (min-width: ${breakpoints.wide}px) {
width: 56.2%;
height: 142px;
}
`;

Expand Down