argotorg / argotorg/solidity-website

Centralize table colors via theme tokens

Open
#203 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
30
Forks
29
Avg merge
8h 15m
Merged PRs (30d)
7

Description

Follow-up to #199 / PR for `fix/markdown-tables`.

The current markdown table styling in `src/styles/MDStyles.tsx` partly uses theme palette names (`purple.300`, `gray.50`) but still hardcodes the dark-mode purples `#3D35A0` and `#1a1560` because they are not in the palette. The same two hex values also appear duplicated across:

- `src/components/survey/SurveyDataTable.tsx`
- `src/components/survey/SurveyTableOfContents.tsx`
- `src/components/survey/SurveyChartWrapper.tsx`

### Proposed cleanup

1. Add the missing purples to the palette in `src/theme/index.ts` (e.g. `purple.700: '#3D35A0'`, `purple.800: '#1a1560'`, names TBD).
2. Define semantic tokens for table styling (e.g. `tableBorder`, `tableHeader`, `tableSurface`) so renderers can drop `useColorModeValue` and just reference a single token.
3. Migrate `MDStyles.tsx` and the three survey components to the new tokens.

### Constraint

Verify that the color codes used correspond to the codes defined in the Solidity style guide. Where the current values diverge from the canonical brand palette, prefer the style guide values and update both this fix and the survey components accordingly.

Contributor guide

No contributing guide indexed for this repository

Research direction

Read src/theme/index.ts and compare its palette with the Solidity style guide, then inspect src/styles/MDStyles.tsx and the three survey components for the duplicated values and current color-mode handling. Done means the canonical colors and semantic table tokens are defined once and all four renderers use them consistently; verify with the project's frontend checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
design, frontend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.