Skip to content

Impelment UISK Tokens into FX/Dark Mode#2333

Merged
SHolleworth merged 27 commits intoSU-15/UISKfrom
SU-29/FX
Jan 16, 2025
Merged

Impelment UISK Tokens into FX/Dark Mode#2333
SHolleworth merged 27 commits intoSU-15/UISKfrom
SU-29/FX

Conversation

@SHolleworth
Copy link
Copy Markdown
Contributor

No description provided.

@SHolleworth SHolleworth changed the title Impelment UISK Token into FX Impelment UISK Tokens into FX Nov 28, 2024
@SHolleworth SHolleworth changed the base branch from master to SU-15/UISK November 28, 2024 13:34
@SHolleworth SHolleworth changed the title Impelment UISK Tokens into FX Impelment UISK Tokens into FX/Dark Mode Nov 28, 2024
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 3, 2024

(auto-deploy) A deployment has been created for this Pull Request

Preview links

As part of the code review process, please ensure that you test against the following

Version URL
Web https://web.env.reactivetrader.com/pull/2333
OpenFin - FX fins://openfin.env.reactivetrader.com/pull/2333/config/rt-fx.json
OpenFin - Credit fins://openfin.env.reactivetrader.com/pull/2333/config/rt-credit.json
OpenFin - Launcher fins://openfin.env.reactivetrader.com/pull/2333/config/launcher.json
OpenFin - Workspace fins://openfin.env.reactivetrader.com/pull/2333/workspace/config/workspace.json
Finsemble https://finsemble.env.reactivetrader.com/pull/2333

Performance

Please ensure that this PR does not degrade the performance of the UI. We should maintain a performance score of 95+.

https://developers.google.com/speed/pagespeed/insights/?url=https://web.env.reactivetrader.com/pull/2333

Copy link
Copy Markdown
Contributor

@algreasley algreasley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quick pass .. more later

Comment thread packages/client/package.json Outdated
}: PNLBarProps) => {
const [hovering, setHovering] = useState(false)
const color = basePnl >= 0 ? "positive" : "negative"
const color = profitOrLossValue >= 0 ? "positive" : "negative"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we map colors in the theme, so we reference the pos/neg colors by name - I am doing this in RTEq MUI theme, as we did in UISK v1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will clear your E2E failure too

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed in the tweaks pr, the pnl bars dont change colour anymore

basePnl: -849.4217864553628,
maxVal: 1785.9428620191757,
profitOrLossValue: -849.4217864553628,
largetProfitOrLossValue: 1785.9428620191757,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo - restore the type info, perhaps - it needs to be corrected there, too

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in the tweaks pr

const AnalyticsRegion = styled(Region)`
width: 320px;
background-color: ${({ theme }) =>
theme.newTheme.color["Colors/Background/bg-primary"]};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thinking about this .. looks awkward .. no immediate actions, but I'd like to do better around color refs .. in RTEq I am doing all the fiddly mapping in theme.ts

return (
<AnalyticsWrapper ref={ref} hideIfMatches={hideIfMatches}>
<Suspense fallback={loader}>
<RegionWrapper fallback={loader}>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've refactored all the major lazy load wrappers (live rates, rfqs, etc) to use this RegionWrapper, as they were all doing basically the same thing.

{supportsTearOut && <TearOutComponent section="analytics" />}
</RightNav>
</AnalyticsHeader>
<AnalyticsRegion
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've refactored all the sections of the app to use this Region component, since their layouts and stuctures all share a lot of commanalities.

source$={analytics$}
fallback={children}
Header={
<TabBar
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The headers for all the regions are now using the tabbar component, which also renders all the icon buttons (tear out, tile chart view, etc) called actions here

Comment thread packages/client/src/client/App/Analytics/PnL/PnL.tsx
@@ -326,6 +326,10 @@ const fontFacePreload = Unfonts({
styles:
"ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900",
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not essential, but should we back off preloading these other fonts

dataObj.baseTradedAmount > 0
? colors.accents.positive.base
: colors.accents.negative.base
? theme.newTheme.color["Colors/Border/border-buy"]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

odd that we are choosing the color in the stream ... not now, but I would consider refactoring this if we can

<stop
offset={offset}
stopColor="#28c988"
stopColor={theme.newTheme.color["Colors/Border/border-buy"]}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@@ -6,22 +6,23 @@ interface Props {

export const ChartIcon = ({
fill = "#7E8188",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: theme color?

animation: ${backgroundEffectKeyframes(props)} 5s;
`

const getDirectionColor = (theme: DefaultTheme, direction: Direction) =>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice - probably wants to live in theme area, along with a number of other "getters"

color: ${({ theme }) => theme.white};
&:disabled {
background-color: ${({ theme }) => theme.accents.primary.darker};
opacity: 0.8;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

beware, opacity now frowned upon (by Ed at least 🙂)

background-color: ${({ theme }) => theme.accents.primary.base};
background-color: ${({ theme }) =>
theme.newTheme.color["Colors/Text/text-brand-primary (900)"]};
border-radius: 3px;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

later .. tokens for this

}
`
: ""}
align-items: flex-start;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oof 😓

)
return accents.positive.base
return theme.newTheme.color[
"Component colors/Utility/Success/utility-success-700"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

later .. I think these are the wrong tokens (semantically) .. to discuss, I have gone off-design for RTEq, for instance, will need syncing up with UX after

@SHolleworth SHolleworth merged commit 0f1d8c8 into SU-15/UISK Jan 16, 2025
@SHolleworth SHolleworth deleted the SU-29/FX branch January 16, 2025 16:06
SHolleworth added a commit that referenced this pull request Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants