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

[Explorer] Adds Sender / Recipients / Amount data to Pay transaction type #5570

Merged
merged 33 commits into from
Nov 2, 2022
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
01a88f8
creates amount field
apburnie Oct 20, 2022
c636f46
handles multiple recipients
apburnie Oct 25, 2022
54e6b5f
timestamp at the top
apburnie Oct 25, 2022
f71bb09
fix data presentation
apburnie Oct 25, 2022
da274ae
CSS changes
apburnie Oct 25, 2022
d2b75ae
sets up display when multiple recipients
apburnie Oct 25, 2022
dd8d580
adds LShape SVG and splits out logic
apburnie Oct 26, 2022
55e4116
creates basic one Sender/Receiver
apburnie Oct 26, 2022
840d6b8
replace done icon
apburnie Oct 26, 2022
6baf141
extends green to multiple recipients
apburnie Oct 26, 2022
2b0bfdb
fixes text alignment issues
apburnie Oct 26, 2022
31b11fe
i before e except after c
apburnie Oct 26, 2022
766c2ce
adds amounts
apburnie Oct 26, 2022
7d91e13
improve recipients gap
apburnie Oct 26, 2022
c7978be
typecheck improvements
apburnie Oct 26, 2022
2369628
updates tests
apburnie Oct 26, 2022
c8178c2
fixes dashed line display across a variety of devices
apburnie Oct 27, 2022
497f7e1
Coin label is extracted
apburnie Oct 28, 2022
8b4e944
creates Amount component
apburnie Oct 31, 2022
1773bdb
uses useFormat
apburnie Oct 31, 2022
860e092
updates amount when one recipient
apburnie Oct 31, 2022
ef0c8c7
display info extracted correctly
apburnie Oct 31, 2022
742cd04
use media query for line length
apburnie Oct 31, 2022
857f843
balances out the padding
apburnie Oct 31, 2022
60db7bf
fixes typecheck errors
apburnie Oct 31, 2022
1596c67
switches useEffect to useQuery
apburnie Nov 1, 2022
4981483
uses new Heading components
apburnie Nov 1, 2022
c5e2a9b
uses enabled flag in useQuery
apburnie Nov 1, 2022
8e08712
removes network dependency
apburnie Nov 2, 2022
9d19644
further refactoring
apburnie Nov 2, 2022
c1ce5f9
uses regex in sdk
apburnie Nov 2, 2022
fdb2aa1
further refactoring
apburnie Nov 2, 2022
0735a13
further refactoring
apburnie Nov 2, 2022
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
4 changes: 2 additions & 2 deletions apps/explorer/cypress/e2e/static/e2e.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ describe('End-to-end Tests', () => {

it('includes the sender time information', () => {
cy.visit(`/transactions/${successID}`);
cy.get('[data-testid=transaction-sender]').contains(
'Sun, 15 Dec 2024 00:00:00 GMT'
cy.get('[data-testid=transaction-timestamp]').contains(
'Dec 15, 2024, 00:00:00 UTC'
);
});
});
Expand Down
3 changes: 3 additions & 0 deletions apps/explorer/src/assets/SVGIcons/16px/CheckFill.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions apps/explorer/src/assets/SVGIcons/Done.svg

This file was deleted.

149 changes: 66 additions & 83 deletions apps/explorer/src/pages/transaction-result/SendReceiveView.module.css
Original file line number Diff line number Diff line change
@@ -1,121 +1,104 @@
.txaddress ul {
@apply list-none p-0;
}

.txaddresssender a,
.txaddresssender,
.txaddress ul li a {
.txaddress a {
@apply break-all font-mono text-sm text-sui-dark;
}

.label span {
@apply block sm:inline text-sui-grey-80 font-[500] text-[13px] mb-2;
.txaddress h4 {
@apply m-0 font-semibold text-heading4;
}

.recipient.txaddresssender a,
.recipient.txaddresssender span {
@apply pl-0 pr-0 mx-0;
.label {
border-bottom: 1px solid #f0f1f2;
@apply text-sui-grey-100 font-[500] text-lg mt-0 mb-2 border-b-[1px] border-[#f0f1f2] md:border-0;
}

.txaddress ul li div {
@apply ml-2;
.oneaddress {
@apply flex gap-[8px] items-center text-[14px] leading-[90%] w-[99%];
}

.recipient.txaddresssender > div {
@apply ml-2;
.oneaddress a {
@apply pr-[8px];
}

.txaddress ul li {
@apply p-1.5 pl-5 md:pl-4 pr-0 ml-2;

display: flex;
align-items: center;
.recipientbox {
@apply flex flex-col items-start gap-[20px];
}

.txaddresssender {
@apply relative mt-1;
.senderbox {
@apply flex flex-col gap-[10px];
}

.recipient.txaddresssender {
@apply pl-1.5;
.recipientbox h4 {
@apply mt-[30px];
}

.recipient.txaddresssender::before {
content: '';
background-image: url('../../assets/SVGIcons/Start.svg');
background-size: 16px 16px;
height: 16px;
width: 16px;
position: absolute;
margin-left: -13px;
z-index: 2;
display: flex;
align-items: center;
h4.oneheading {
@apply mb-[25px];
}

.recipient.txaddresssender::after {
@apply ml-[-0.5rem];

top: 10px;
content: '';
position: absolute;
margin-left: -5px;
height: 15%;

/* Sui Steel Blue */
.doneicon svg {
@apply fill-success;
}

border: 1px dashed #a0b6c3;
border-right: none;
border-bottom: none;
.sui {
@apply mt-[9.5px] flex flex-row items-start gap-[4px];
}

.label {
border-bottom: 1px solid #f0f1f2;
@apply text-sui-grey-100 font-[500] text-lg mt-0 mb-2 border-b-[1px] border-[#f0f1f2] md:border-0;
.suiamount {
@apply text-heading6 font-semibold ml-[24px] text-sui-grey-100;
}

.txaddressheader {
display: inline-block;
.suilabel {
@apply text-bodySmall pt-[2px] text-sui-grey-80;
}

.txrecipents {
@apply break-all relative mt-0 !important;
.doneiconwline {
@apply relative ml-[10px];
}

.txrecipents li::before {
.doneiconwline::before {
content: '';
@apply text-white;

background-image: url('../../assets/SVGIcons/Done.svg');
background-size: 16px 16px;
height: 16px;
width: 16px;
display: block;
position: absolute;
left: 8px;
z-index: 2;
display: flex;
align-items: center;
bottom: 50%;
right: 16px;
width: 12px;
height: 200%;
border: 1px dashed #a0b6c3;
border-bottom-left-radius: 4px;
border-right: none;
border-top: none;
overflow: hidden;
}

.txrecipents li::after {
@apply ml-[-0.5rem];
@media only screen and (max-width: 439px) {
.doneiconwline::before {
content: '';
display: block;
position: absolute;
bottom: 50%;
right: 16px;
width: 12px;
height: 300%;
border: 1px dashed #a0b6c3;
border-bottom-left-radius: 4px;
border-right: none;
border-top: none;
overflow: hidden;
}
}

content: '';
position: absolute;
width: 40px;
height: 20px;
left: -7px;
margin-top: -40px;
.amountbox {
@apply mt-[10px];
}

/* Sui Steel Blue */
.amountbox > :first-child {
@apply font-semibold text-sui-grey-100 text-heading4 mb-[10px];
}

border: 1px dashed #a0b6c3;
border-right: none;
border-bottom: none;
border-radius: 4px;
transform: rotate(270deg);
.amountbox > :nth-child(2) {
@apply font-bold text-sui-grey-90 text-[24px] h-[19px] leading-[80%] mt-0 mb-[40px];
}

.txrecipents li :first-child::after {
height: 20px;
.amountbox > :nth-child(2) sup {
@apply font-medium text-sui-grey-80 text-[13px] h-[13px] leading-[100%] ml-[4px];
}
Loading