Skip to content

Refactor UI - #86

Merged
AugustoL merged 17 commits into
openscan-explorer:devfrom
AugustoL:refactor-ui
Dec 10, 2025
Merged

AugustoL merged 17 commits into
openscan-explorer:devfrom
AugustoL:refactor-ui

Conversation

@AugustoL

@AugustoL AugustoL commented Dec 9, 2025 •

Copy link
Copy Markdown
Collaborator

Theme System Refactoring

  • Refactor CSS to use theme variables (var(--color-*)) with data-theme attribute instead of .light-theme class selectors
  • Add centralized theme.tsx with CSS custom properties for dark/light themes
  • Add theme toggle button (sun/moon icon) to navbar for direct light/dark switching
  • Add alpha variants for primary, error, warning, info, and accent colors
  • Replace ~90+ hardcoded color values with theme variables across all CSS files

CSS Consolidation & Base Utilities

  • Create base.css with unified utility classes:
    • Cards: Consolidated page-card, block-display-card, devtools-card, dev-section-container
    • Info boxes: Merged default, vertical, arbitrum, and optimism variants with shared base
    • Forms: Unified form-input and form-select with shared styling
    • Buttons: Consolidated button-primary, collapsible-button, inline variants
    • Badges: Unified status badge system with color variants
    • Titles: Created section title hierarchy for tx, abi, profile, functions titles
    • Spacing: Added comprehensive utilities (mt-*, mb-*, ml-*, mr-*, gap-*)
    • Flex: Added utility classes (flex-column, flex-row, items-center, justify-between, etc.)
  • Condense devtools flex/gap utilities into single-line definitions
  • Document relationships between CSS files for maintainability

UI Improvements

  • Add page titles to DevTools and Settings pages
  • Wrap Settings and DevTools pages in page-card container
  • Reorganize footer layout and move About link positioning
  • Show decoded extra data on block details when hex data contains readable UTF-8 text
  • Always display contract bytecode for contracts, even when not verified on Sourcify

Cleanup

  • Use RainbowKit styles directly from package instead of local copy
  • Remove duplicate class definitions across CSS files
  • Remove .light-theme overrides (replaced by theme variables)
  • Update default dev server port to 3030

Update webpack devServer port and documentation references.
- Replace subscription button with sun/moon theme toggle in navbar
- Move About link to footer left side with separators
- Update footer styling and class names
Import CSS directly from @rainbow-me/rainbowkit/styles.css and remove
the duplicated local rainbowkit.css file.
…rides

- Add centralized theme.tsx with CSS custom properties for dark/light themes
- Remove all .light-theme class selectors from CSS files (22 total)
- Convert hardcoded colors to theme variables across all CSS files
- Add alpha variants for primary color (alpha-2 through alpha-50)
- Add semantic alpha variants for error, warning, and info colors
- Add overlay utility variables that swap between themes
- Theme now uses data-theme attribute exclusively for switching
@github-actions

github-actions Bot commented Dec 9, 2025 •

Copy link
Copy Markdown

🚀 Preview: https://pr-86--openscan.netlify.app
📝 Commit: 25170b066149dbf3cbccb2a025a4bdf826f918e9

@AugustoL
AugustoL marked this pull request as ready for review December 9, 2025 15:33
@AugustoL
AugustoL requested a review from MatiasOS December 9, 2025 15:35
@AugustoL AugustoL self-assigned this Dec 9, 2025
- Add --color-accent (purple #8b5cf6) with hover, muted, and alpha variants
- Replace ~90 hardcoded #10b981 with var(--color-primary)
- Replace #059669, #34d399, #3b82f6, #ef4444, #f59e0b, #8b5cf6 with theme vars
- Convert all rgba() color values to corresponding alpha variables
- Remove 15 duplicate class definitions in devtools.css
- Fix light theme overrides in devtools.css to use theme variables
- Add missing alpha variants: info-25/40/50, warning-25/40, error-30/40
Previously the toggle cycled through auto -> light -> dark -> auto,
requiring two clicks to switch from dark to light mode. Now it simply
toggles between light and dark based on the current visual state.
- Replace #6b7280 with var(--text-secondary)
- Replace #9ca3af with var(--text-tertiary)
- Replace #1f2937/#111827/#374151 with var(--text-primary)
- Replace #e5e7eb borders with var(--border-primary)
- Replace #f3f4f6 backgrounds with var(--bg-tertiary)
- Replace #60a5fa with var(--color-info-hover)
- Replace #7c3aed with var(--color-accent-muted)
- Replace #000 button text with var(--text-inverse)
- Replace rgba(255,255,255,*) overlays with var(--overlay-light-*)
- Wrap Settings page content in container-wide + page-card
- Wrap DevTools page content in container-wide + page-card
- Remove redundant max-width from devtools-content-wrapper
- Add box-shadow to match page-card styling
- Remove redundant max-width, margin, and transition properties
- Add comment noting relationship to page-card
- Create base.css with unified card, info-box, form, button, badge, and title classes
- Consolidate page-card and block-display-card to share base styles
- Merge info-box variants (default, vertical, arbitrum, optimism) with shared base
- Unify form-input and form-select with shared styling
- Consolidate button classes (button-primary, collapsible-button, inline variants)
- Create section title hierarchy for tx, abi, profile, functions titles
- Add comprehensive spacing utilities (mt, mb, ml, mr, gap)
- Add flex utility classes (flex-column, flex-row, items-center, etc.)
- Consolidate devtools-card and dev-section-container
- Condense devtools flex/gap utilities into single-line definitions
- Document relationships between CSS files for maintainability

@MatiasOS MatiasOS left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@AugustoL
AugustoL merged commit a3ffdf1 into openscan-explorer:dev Dec 10, 2025
2 checks passed
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