codex/broker-dashboard-redesign #49
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "codex/broker-dashboard-redesign"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Introduce dashboardVisual.ts with moneyTone, formatDashboardCurrency, eventTypeTone, incomeTypeTone, and instrumentDisplay helpers used by the broker dashboard to match the HTML reference prototype. Extend dashboardIncome.ts: typeLabel now distinguishes DIV_EXT ('Дивиденд (внешний)'), and rows expose instrumentMain/instrumentSubtitle via instrumentDisplay while keeping instrument as a derived alias for existing callers. Add resetDashboardFilters factory in dashboardFilters.ts so Task 3 can wire the reset action without re-churning filter types.BrokerDashboardCard previously rendered <Heading level={3} size="section">, which produced an <h3> under the <h1> account name in BrokerAccountLayout, skipping the <h2> level. Use level={2} so the semantic HTML is a proper <h2> while keeping the compact "section" visual size. Also extract the byte-identical toolbar wrapper (grid + chips + date filter slot) shared by BrokerDashboardEventsCard and BrokerDashboardIncomeCard into BrokerDashboardTableToolbar to remove duplicated sx config.- Render RUB values via formatDashboardCurrency so RUB shows as ₽ instead of 'RUB', matching the hero, events and income cards. - Apply semantic color tones per spec §6: * Пополнения/Дивиденды/Купоны/Всего получено → positive when > 0, neutral when 0. * Выводы → prefix value with '−' and render with negative tone whenever the underlying amount is positive. * Нетто → sign-based tone. - Add data-testid and data-tone attributes on each analytics value so tests and downstream styling can address each metric. - Update the analytics mock in BrokerDashboard.test.tsx to cover positive, negative (net invested + withdrawals) and zero values, and add two new tests asserting ₽ rendering and the tone data attributes.