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

Cherry-pick: feat: Add animation on the Smart Transaction status page (#24389) into v11.15.3 #24397

Merged
merged 1 commit into from
May 7, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ exports[`SmartTransactionStatusPage renders the "Sorry for the wait" pending sta
style="flex-grow: 1;"
>
<div
class="mm-box mm-box--padding-right-6 mm-box--padding-left-6 mm-box--display-flex mm-box--flex-direction-column mm-box--align-items-center"
class="mm-box mm-box--padding-right-6 mm-box--padding-left-6 mm-box--display-flex mm-box--flex-direction-column mm-box--align-items-center mm-box--width-full"
>
<div
class="mm-box smart-transaction-status-page__background-animation smart-transaction-status-page__background-animation--top mm-box--margin-top-3"
/>
<div
class="mm-box mm-box--display-flex"
style="font-size: 48px;"
Expand Down Expand Up @@ -58,6 +61,9 @@ exports[`SmartTransactionStatusPage renders the "Sorry for the wait" pending sta
</p>
</div>
</div>
<div
class="mm-box smart-transaction-status-page__background-animation smart-transaction-status-page__background-animation--bottom mm-box--margin-top-3"
/>
</div>
<div
class="mm-box smart-transaction-status-page__footer mm-box--padding-4 mm-box--padding-bottom-0 mm-box--display-flex mm-box--flex-direction-column mm-box--width-full"
Expand All @@ -83,8 +89,11 @@ exports[`SmartTransactionStatusPage renders the "cancelled" STX status 1`] = `
style="flex-grow: 1;"
>
<div
class="mm-box mm-box--padding-right-6 mm-box--padding-left-6 mm-box--display-flex mm-box--flex-direction-column mm-box--align-items-center"
class="mm-box mm-box--padding-right-6 mm-box--padding-left-6 mm-box--display-flex mm-box--flex-direction-column mm-box--align-items-center mm-box--width-full"
>
<div
class="mm-box smart-transaction-status-page__background-animation smart-transaction-status-page__background-animation--top mm-box--margin-top-3"
/>
<div
class="mm-box mm-box--display-flex"
style="font-size: 48px;"
Expand Down Expand Up @@ -119,6 +128,9 @@ exports[`SmartTransactionStatusPage renders the "cancelled" STX status 1`] = `
</button>
</div>
</div>
<div
class="mm-box smart-transaction-status-page__background-animation smart-transaction-status-page__background-animation--bottom mm-box--margin-top-3"
/>
</div>
<div
class="mm-box smart-transaction-status-page__footer mm-box--padding-4 mm-box--padding-bottom-0 mm-box--display-flex mm-box--flex-direction-column mm-box--width-full"
Expand All @@ -144,8 +156,11 @@ exports[`SmartTransactionStatusPage renders the "deadline_missed" STX status 1`]
style="flex-grow: 1;"
>
<div
class="mm-box mm-box--padding-right-6 mm-box--padding-left-6 mm-box--display-flex mm-box--flex-direction-column mm-box--align-items-center"
class="mm-box mm-box--padding-right-6 mm-box--padding-left-6 mm-box--display-flex mm-box--flex-direction-column mm-box--align-items-center mm-box--width-full"
>
<div
class="mm-box smart-transaction-status-page__background-animation smart-transaction-status-page__background-animation--top mm-box--margin-top-3"
/>
<div
class="mm-box mm-box--display-flex"
style="font-size: 48px;"
Expand Down Expand Up @@ -180,6 +195,9 @@ exports[`SmartTransactionStatusPage renders the "deadline_missed" STX status 1`]
</button>
</div>
</div>
<div
class="mm-box smart-transaction-status-page__background-animation smart-transaction-status-page__background-animation--bottom mm-box--margin-top-3"
/>
</div>
<div
class="mm-box smart-transaction-status-page__footer mm-box--padding-4 mm-box--padding-bottom-0 mm-box--display-flex mm-box--flex-direction-column mm-box--width-full"
Expand All @@ -205,8 +223,11 @@ exports[`SmartTransactionStatusPage renders the "reverted" STX status 1`] = `
style="flex-grow: 1;"
>
<div
class="mm-box mm-box--padding-right-6 mm-box--padding-left-6 mm-box--display-flex mm-box--flex-direction-column mm-box--align-items-center"
class="mm-box mm-box--padding-right-6 mm-box--padding-left-6 mm-box--display-flex mm-box--flex-direction-column mm-box--align-items-center mm-box--width-full"
>
<div
class="mm-box smart-transaction-status-page__background-animation smart-transaction-status-page__background-animation--top mm-box--margin-top-3"
/>
<div
class="mm-box mm-box--display-flex"
style="font-size: 48px;"
Expand Down Expand Up @@ -241,6 +262,9 @@ exports[`SmartTransactionStatusPage renders the "reverted" STX status 1`] = `
</button>
</div>
</div>
<div
class="mm-box smart-transaction-status-page__background-animation smart-transaction-status-page__background-animation--bottom mm-box--margin-top-3"
/>
</div>
<div
class="mm-box smart-transaction-status-page__footer mm-box--padding-4 mm-box--padding-bottom-0 mm-box--display-flex mm-box--flex-direction-column mm-box--width-full"
Expand All @@ -266,8 +290,11 @@ exports[`SmartTransactionStatusPage renders the "success" STX status 1`] = `
style="flex-grow: 1;"
>
<div
class="mm-box mm-box--padding-right-6 mm-box--padding-left-6 mm-box--display-flex mm-box--flex-direction-column mm-box--align-items-center"
class="mm-box mm-box--padding-right-6 mm-box--padding-left-6 mm-box--display-flex mm-box--flex-direction-column mm-box--align-items-center mm-box--width-full"
>
<div
class="mm-box smart-transaction-status-page__background-animation smart-transaction-status-page__background-animation--top mm-box--margin-top-3"
/>
<div
class="mm-box mm-box--display-flex"
style="font-size: 48px;"
Expand All @@ -293,6 +320,9 @@ exports[`SmartTransactionStatusPage renders the "success" STX status 1`] = `
</button>
</div>
</div>
<div
class="mm-box smart-transaction-status-page__background-animation smart-transaction-status-page__background-animation--bottom mm-box--margin-top-3"
/>
</div>
<div
class="mm-box smart-transaction-status-page__footer mm-box--padding-4 mm-box--padding-bottom-0 mm-box--display-flex mm-box--flex-direction-column mm-box--width-full"
Expand All @@ -318,8 +348,11 @@ exports[`SmartTransactionStatusPage renders the "unknown" STX status 1`] = `
style="flex-grow: 1;"
>
<div
class="mm-box mm-box--padding-right-6 mm-box--padding-left-6 mm-box--display-flex mm-box--flex-direction-column mm-box--align-items-center"
class="mm-box mm-box--padding-right-6 mm-box--padding-left-6 mm-box--display-flex mm-box--flex-direction-column mm-box--align-items-center mm-box--width-full"
>
<div
class="mm-box smart-transaction-status-page__background-animation smart-transaction-status-page__background-animation--top mm-box--margin-top-3"
/>
<div
class="mm-box mm-box--display-flex"
style="font-size: 48px;"
Expand Down Expand Up @@ -354,6 +387,9 @@ exports[`SmartTransactionStatusPage renders the "unknown" STX status 1`] = `
</button>
</div>
</div>
<div
class="mm-box smart-transaction-status-page__background-animation smart-transaction-status-page__background-animation--bottom mm-box--margin-top-3"
/>
</div>
<div
class="mm-box smart-transaction-status-page__footer mm-box--padding-4 mm-box--padding-bottom-0 mm-box--display-flex mm-box--flex-direction-column mm-box--width-full"
Expand All @@ -379,8 +415,11 @@ exports[`SmartTransactionStatusPage renders the component with initial props 1`]
style="flex-grow: 1;"
>
<div
class="mm-box mm-box--padding-right-6 mm-box--padding-left-6 mm-box--display-flex mm-box--flex-direction-column mm-box--align-items-center"
class="mm-box mm-box--padding-right-6 mm-box--padding-left-6 mm-box--display-flex mm-box--flex-direction-column mm-box--align-items-center mm-box--width-full"
>
<div
class="mm-box smart-transaction-status-page__background-animation smart-transaction-status-page__background-animation--top mm-box--margin-top-3"
/>
<div
class="mm-box mm-box--display-flex"
style="font-size: 48px;"
Expand Down Expand Up @@ -427,6 +466,9 @@ exports[`SmartTransactionStatusPage renders the component with initial props 1`]
</p>
</div>
</div>
<div
class="mm-box smart-transaction-status-page__background-animation smart-transaction-status-page__background-animation--bottom mm-box--margin-top-3"
/>
</div>
<div
class="mm-box smart-transaction-status-page__footer mm-box--padding-4 mm-box--padding-bottom-0 mm-box--display-flex mm-box--flex-direction-column mm-box--width-full"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@

@keyframes shift {
to {
background-position: 100% 0;
}
}

.smart-transaction-status-page {
text-align: center;

Expand Down Expand Up @@ -31,4 +37,27 @@
width: 100%;
text-align: left;
}

&__background-animation {
position: relative;
left: -88px;
background-repeat: repeat;
background-position: 0 0;

&--top {
width: 1634px;
height: 54px;
background-size: 817px 54px;
background-image: url('/images/transaction-background-top.svg');
animation: shift 19s linear infinite;
}

&--bottom {
width: 1600px;
height: 62px;
background-size: 800px 62px;
background-image: url('/images/transaction-background-bottom.svg');
animation: shift 22s linear infinite;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,12 @@ export const SmartTransactionStatusPage = ({
alignItems={AlignItems.center}
paddingLeft={6}
paddingRight={6}
width={BlockSize.Full}
>
<Box
marginTop={3}
className="smart-transaction-status-page__background-animation smart-transaction-status-page__background-animation--top"
/>
<SmartTransactionsStatusIcon
iconName={iconName}
iconColor={iconColor}
Expand All @@ -517,6 +522,10 @@ export const SmartTransactionStatusPage = ({
transactionId={fullTxData.id}
/>
)}
<Box
marginTop={3}
className="smart-transaction-status-page__background-animation smart-transaction-status-page__background-animation--bottom"
/>
</Box>
<SmartTransactionsStatusPageFooter
isDapp={isDapp}
Expand Down
Loading