Skip to content

Commit 99e588a

Browse files
authored
Merge pull request #2370 from AdaptiveConsulting/tile
Restyle Tiles
2 parents cbe7c98 + 111ddf1 commit 99e588a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+845
-573
lines changed

packages/client/e2e/fx-spot-tile.spec.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ test.describe("Spot Tile", () => {
3535

3636
await tilePage.locator("[data-testid='Sell-EURUSD']").click()
3737

38+
// Wait for execution delay to end
39+
await expect(tilePage.locator("[data-testid='trade-id']")).toBeVisible()
40+
3841
const tradeId = await tilePage
3942
.locator("[data-testid='trade-id']")
4043
.innerText()
@@ -52,7 +55,7 @@ test.describe("Spot Tile", () => {
5255

5356
const greenConfirmation = tilePage
5457
.locator("div[role='dialog']")
55-
.getByText(/You bought/)
58+
.getByText(/You Bought/)
5659
await expect(greenConfirmation).toBeVisible()
5760
})
5861
})
@@ -165,7 +168,7 @@ test.describe("Spot Tile", () => {
165168
const tileState2 = await tilePage.evaluate(() =>
166169
window.localStorage.getItem("selectedView"),
167170
)
168-
expect(tileState2).toBe("Analytics")
171+
expect(tileState2).toBe("Chart")
169172
await expect(
170173
tilePage.locator("[data-testid='tile-graph']").nth(0),
171174
).toBeVisible()

packages/client/src/client/App/Credit/CreditRfqs/CreditRfqCards/styled.tsx

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,6 @@ export const QuotesContainer = styled.div`
6666
theme.color["Colors/Background/bg-primary"]};
6767
`
6868

69-
export const NoRfqsWrapper = styled.div`
70-
height: 100%;
71-
width: 100%;
72-
display: flex;
73-
justify-content: center;
74-
align-items: center;
75-
`
76-
77-
// Card Footer
78-
7969
export const CardFooterWrapper = styled(Stack)`
8070
background: ${({ theme }) =>
8171
theme.color["Colors/Background/bg-secondary_subtle"]};
@@ -86,16 +76,6 @@ export const CardFooterWrapper = styled(Stack)`
8676
}
8777
`
8878

89-
export const AcceptedCardState = styled.div`
90-
flex: 1;
91-
display: flex;
92-
align-items: center;
93-
94-
svg {
95-
margin-right: ${({ theme }) => theme.spacing.md};
96-
}
97-
`
98-
9979
export const FooterButton = styled.button`
10080
background-color: ${({ theme }) =>
10181
theme.color["Colors/Background/bg-tertiary"]};

packages/client/src/client/App/Footer/ContactUsButton/ContactUs.tsx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { PropsWithChildren } from "react"
33
import { Typography } from "@/client/components/Typography"
44
import { EMAIL, WEBSITE } from "@/client/constants"
55

6-
import { ContactUsContentResolver, Link } from "./styled"
6+
import { ContactUsContentResolver } from "./styled"
77

88
const Row = ({ children }: PropsWithChildren) => (
99
<>
@@ -23,28 +23,29 @@ export const ContactUs = () => (
2323
<Row>530 7th Avenue, New York</Row>
2424
<Row>+1 929 205 4900</Row>
2525

26-
<Link
26+
<Typography
27+
as="a"
28+
href={`mailto:${EMAIL}`}
2729
variant="Text sm/Regular underlined"
2830
color="Component colors/Utility/Blue dark/utility-blue-dark-500"
29-
onClick={() => {
30-
window.open(`mailto:${EMAIL}`)
31-
}}
3231
paddingBottom="xs"
3332
>
3433
{EMAIL}
35-
</Link>
34+
</Typography>
3635

37-
<Link
36+
<Typography
37+
as="a"
38+
href={WEBSITE}
39+
target="_blank"
3840
variant="Text sm/Regular underlined"
3941
color="Component colors/Utility/Blue dark/utility-blue-dark-500"
4042
onClick={() => {
4143
window.gtag("event", "outbound_click", {
4244
destination: WEBSITE,
4345
})
44-
window.open(WEBSITE)
4546
}}
4647
>
4748
www.weareadaptive.com
48-
</Link>
49+
</Typography>
4950
</ContactUsContentResolver>
5051
)

packages/client/src/client/App/Footer/ContactUsButton/FollowUs.tsx

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,47 +3,40 @@ import { PropsWithChildren } from "react"
33
import { Typography } from "@/client/components/Typography"
44
import { SOCIAL_ADDRESSES, SocialPlatform } from "@/client/constants"
55

6-
import { ContactUsContentResolver, Link } from "./styled"
6+
import { ContactUsContentResolver } from "./styled"
77

88
const Row = ({
99
children,
1010
label,
11-
onClick,
12-
}: PropsWithChildren<{ onClick: () => void; label: string }>) => (
11+
}: PropsWithChildren<{ label: SocialPlatform }>) => (
1312
<>
1413
<Typography variant="Text md/Regular">{label}</Typography>
15-
<Link
14+
<Typography
15+
as="a"
16+
href={SOCIAL_ADDRESSES[label]}
17+
target="_blank"
1618
variant="Text sm/Regular underlined"
1719
color="Component colors/Utility/Blue dark/utility-blue-dark-500"
18-
onClick={onClick}
1920
paddingBottom="md"
21+
onClick={() => {
22+
window.gtag("event", "outbound_click", {
23+
destination: SOCIAL_ADDRESSES[label],
24+
})
25+
}}
2026
>
2127
{children}
22-
</Link>
28+
</Typography>
2329
</>
2430
)
2531
export const FollowUs = () => {
26-
const onClick = (social: SocialPlatform) => () => {
27-
window.gtag("event", "outbound_click", {
28-
destination: SOCIAL_ADDRESSES[social],
29-
})
30-
window.open(SOCIAL_ADDRESSES[social])
31-
}
32-
3332
return (
3433
<ContactUsContentResolver>
35-
<Typography variant="Text lg/Regular" paddingBottom="sm">
36-
Follow us on
37-
</Typography>
38-
<Row label="LinkedIn" onClick={onClick("LinkedIn")}>
34+
<Typography variant="Text lg/Regular">Follow us on</Typography>
35+
<Row label="LinkedIn">
3936
linkedin.com/company/{<br />}adaptive-consulting-ltd/
4037
</Row>
41-
<Row label="Twitter" onClick={onClick("Twitter")}>
42-
@WeAreAdaptive
43-
</Row>
44-
<Row label="Github" onClick={onClick("Github")}>
45-
github.com/adaptiveConsulting
46-
</Row>
38+
<Row label="Twitter">@WeAreAdaptive</Row>
39+
<Row label="Github">github.com/adaptiveConsulting</Row>
4740
</ContactUsContentResolver>
4841
)
4942
}

packages/client/src/client/App/Footer/ContactUsButton/styled.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import styled from "styled-components"
22

33
import Popup from "@/client/components/Popup"
4-
import { Typography } from "@/client/components/Typography"
54

65
const buttonHeight = "2rem"
76

@@ -19,8 +18,4 @@ const ContactUsContent = styled.div`
1918
export const LogoWrapper = styled.div`
2019
padding: 1rem 0.5rem 0 0.5rem;
2120
`
22-
23-
export const Link = styled(Typography)`
24-
cursor: pointer;
25-
`
2621
export const ContactUsContentResolver = ContactUsContent

packages/client/src/client/App/LiveRates/LiveRatesHeader/LiveRatesHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export const LiveRatesHeader = () => {
4444
{
4545
name: "toggleTileView",
4646
inner: <ChartIcon />,
47-
active: tileView === TileView.Analytics,
47+
active: tileView === TileView.Chart,
4848
onClick: onToggleSelectedView,
4949
},
5050
]

packages/client/src/client/App/LiveRates/LiveRatesHeader/__tests__/MainHeader.test.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,23 +101,23 @@ describe("MainHeader", () => {
101101
await renderComponent()
102102

103103
expect(screen.getByTestId("tile-EURUSD").textContent).toBe(
104-
"IsAnalytics: true",
104+
"ShowingChart: true",
105105
)
106106

107107
act(() => {
108108
fireEvent.click(screen.getByTestId("action-toggleTileView"))
109109
})
110110

111111
expect(screen.getByTestId("tile-EURUSD").textContent).toBe(
112-
"IsAnalytics: false",
112+
"ShowingChart: false",
113113
)
114114

115115
act(() => {
116116
fireEvent.click(screen.getByTestId("action-toggleTileView"))
117117
})
118118

119119
expect(screen.getByTestId("tile-EURUSD").textContent).toBe(
120-
"IsAnalytics: true",
120+
"ShowingChart: true",
121121
)
122122
})
123123
})

packages/client/src/client/App/LiveRates/Tile/ExecutionResponse/Pending.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@ import { CenteringContainer } from "@/client/components/CenteringContainer"
55
import { OverlayDiv } from "@/client/components/OverlayDiv"
66
import { Typography } from "@/client/components/Typography"
77

8-
const PendingContainer = styled(OverlayDiv)`
9-
// Solution to stack flex child ontop of another, height is not respected in safari
10-
// margin-left: -100%;
11-
position: absolute;
12-
`
13-
148
const PendingPill = styled("div")`
159
display: flex;
1610
gap: ${({ theme }) => theme.spacing.sm};
@@ -22,7 +16,7 @@ const PendingPill = styled("div")`
2216

2317
export const Pending = () => {
2418
return (
25-
<PendingContainer>
19+
<OverlayDiv>
2620
<CenteringContainer>
2721
<PendingPill>
2822
<AdaptiveLoader
@@ -35,6 +29,6 @@ export const Pending = () => {
3529
<Typography variant="Text md/Bold">Executing</Typography>
3630
</PendingPill>
3731
</CenteringContainer>
38-
</PendingContainer>
32+
</OverlayDiv>
3933
)
4034
}

packages/client/src/client/App/LiveRates/Tile/ExecutionResponse/Response.styles.tsx

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)