refactor(sf-19): BestLayouts inline hex → Tailwind tokens #296
No reviewers
Labels
No labels
admin
analytics
auth
automation
bug
business
chore
ci
compliance
data
data-moat
docs
duplicate
dx
enhancement
Fable 5 ревью
feedback/max
generative
GG-форсайт
needs-discussion
needs-human
observability
pause-bots
performance
priority/p0
priority/p1
priority/p2
priority/p3
scope/backend
scope/db
scope/devops
scope/frontend
scope/qa
scrapers
security
site-finder
stage/1
stage/2
status/blocked
status/done
status/needs-analysis
status/needs-fix
status/qa
status/ready
status/review
status/wip
tech-debt
tradein
ux
week ревью 1
wontfix
вторичка
ИРД
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#296
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/sf-19-best-layouts-hex-tokens"
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?
Summary
SF FixList #19 (Wave 3) —
BestLayoutsBlock.tsxиспользовал inline hex (CONFIDENCE_STYLESс#dcfce7,#fef3c7,#fee2e2etc) — нарушение.claude/rules/ui-ux.md. Полный refactor на Tailwind utilities + CSS tokens.Changes
frontend/src/components/site-finder/BestLayoutsBlock.tsx:CONFIDENCE_STYLES— refactored с{bg, fg, label}(inline style) на{cls, label}(Tailwind classNames):bg-emerald-100 text-emerald-800bg-amber-100 text-amber-800bg-rose-100 text-rose-800Все остальные hex → CSS tokens:
var(--fg-primary),var(--fg-secondary),var(--fg-tertiary)var(--accent),var(--accent-soft)var(--bg-card),var(--bg-card-alt),var(--bg-app)var(--border-card),var(--border-soft),var(--border-strong)var(--danger-soft),var(--danger)var(--viz-1..5)дляUnitMixBar COLORSvar(--fg-tertiary)вместо#9ca3afПолная mapping table в vault
fixes/Fix_SF_BestLayouts_HexTokens_May17.md.Test plan
Related: epic #271 item #19 · Wave 3 (P2) · cleanup
Merged via deep-code-reviewer — verdict APPROVE.
Verified:
BestLayoutsBlock.tsx(grep#[0-9a-fA-F]{3,8}→ empty)var(--*)tokens exist в design system (.claude/rules/ui-ux.mdtoken list):--fg-primary/secondary/tertiary/on-dark,--accent/accent-soft,--bg-card/card-alt/app,--border-card/soft/strong,--danger/danger-soft,--viz-1..5bg-emerald-100/text-emerald-800,bg-amber-100,bg-rose-100,bg-gray-50,bg-blue-50,text-gray-400) — все из default Tailwind 4 palette{ bg, fg, label }→{ cls, label }корректноBestLayoutsBlock({ cadNum, selectedCompetitorObjIds })без изменений#9ca3af→var(--fg-tertiary)(#73767E) — slight darkening but per design systemSuccessRecommendationBlock.tsxуже использует те же tokens (precedent)Minor notes (не блокирующие):
bg-blue-50(#eff6ff) для CompetitorDrillIn row — было#f0f4ff. Идеально было быvar(--accent-soft)(#DBEAFE) для полного alignment, но Tailwind utility приемлемUnitMixBar6-я позиция COLORS повторяетviz-3(предел data-viz палитры в 5 цветов) — ожидаемоborder: "1px solid var(--danger-soft)"для error banner — soft tone vs prev#fca5a5. Acceptable per token system.Closes SF FixList #19. Wave 3 cleanup продвигается.