Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Code Review — Hl react optimisation v2OverviewThis PR delivers a focused UI polish pass across the trading interface:
Positive observations
Issues1. Border opacity regression (packages/ui/src/modal.tsx) All call sites previously used Recommendation: Confirm 2. Modal padding reduction changes public API (packages/ui/src/modal.tsx)
This also affects 3. Order type label lost its container (apps/terminal/src/components/trade/positions/orders-tab.tsx) The 4. PositionTpSlModal — asset identity lost from header The old header showed the coin logo + name via Suggestion: Consider keeping at minimum the Minor notes
|
Code ReviewOverviewThis PR refactors UI styling across order/position panels and modals. Main changes:
Issues1. Border opacity regression in All call sites previously used // old at call sites
<ModalHeader className="border-b border-stroke-weak/40">
// new in component (full opacity)
divider && "border-b border-stroke-weak"If the intent is a consistent stronger border, that's fine — but it should be explicit rather than accidental. 2. Accessibility regression in
// before — title included the coin
<ModalTitle className="flex items-center gap-1">
<AssetDisplay coin={position.coin} />
<Badge ...>{position.isLong ? "Long" : "Short"}</Badge>
</ModalTitle>
// after — coin is outside the title
<ModalTitle>{t`Manage TP/SL`}</ModalTitle>
<div className="flex items-center gap-1.5">
<span ... />
<AssetDisplay coin={position.coin} />
...
</div>Consider moving 3. The prop is added with a default of 4. Order type label loses visual container In // before — pill with bg tint
<span className={cn("text-2xs px-1.5 py-0.5 rounded-8 uppercase whitespace-nowrap", typeConfig.class)}>
// after — plain colored text
<span className={cn("text-2xs uppercase whitespace-nowrap", typeConfig.class)}>And Positives
SummaryThe refactor is directionally good — consistent spacing, simpler side indicators, and a cleaner |
- Restore border-stroke-weak/40 alpha on ModalHeader divider - Add aria-label with coin/side context to TP/SL modal popup - Restore pill background on order type labels (TP/Stop chips) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Code Review: hl-react optimisation v2OverviewThis PR makes three main changes:
Issues🔴 Design token violation in // packages/ui/src/modal.tsx
divider && "border-b border-stroke-weak/40"The style guide explicitly states: "Avoid opacity modifiers on 🔴 - default: { class: "bg-surface/50" },
+ default: { class: "text-fg-muted" },The 🟡 Global padding reduction is a silent breaking change
🟡 Desktop orders views lose text side labels The pill showing "long" / "short" / "buy" / "sell" is removed from 🟡 <ModalPopup aria-label={t`Manage TP/SL for ${position.coin}...`}>
Positive Changes
Minor Notes
|
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Code ReviewOverviewLarge structural refactor with 8,722 additions / 6,989 deletions across ~100 files. The core themes are:
The direction is clearly right — this is a meaningful improvement to maintainability. Bugs
// kline-chart.tsx
interface Props {
symbol?: string; // optional
...
}
// use-kline-order-overlays.ts
interface Params {
symbol: string; // required
}When
{tokens.map((token) => (
<TokenRow key={...} token={token} isSelected={false} onSelect={onSelect} />
))}
Code Style
const TokenSelectorRow = memo(function TokenSelectorRow(...) { ... }, rowPropsEqual);Project guidelines: "React 19 Compiler: Don't add manual
Both overlay hooks include // Both hooks
}, [openOrdersEvent, symbol, chartRef]); // chartRef is never a new object
This renders a non-trivial JSX subtree (3 branches). Per project rules, single-helper functions are fine, but this is complex enough that it reads like a missing sub-component. Not a blocker, but worth noting. Architectural ObservationsShared Shared
Positives
SummaryThe refactor is solid. Two real issues to address before merging:
The |
Code Review — Hl React Optimisation v2This is a substantial refactor (~8.7k additions / ~7k deletions) focused on component decomposition, code organisation, and reducing render surface. Here's a breakdown by area. OverviewThe PR does three main things:
Positives
Issues & Suggestions
|
No description provided.