feat(uiux): standardize spacing, radius, and typography tokens (#100)#131
Open
teefeh-07 wants to merge 1 commit into
Open
feat(uiux): standardize spacing, radius, and typography tokens (#100)#131teefeh-07 wants to merge 1 commit into
teefeh-07 wants to merge 1 commit into
Conversation
|
@teefeh-07 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request: Standardize Spacing, Radius, and Typography Tokens
Related Issue
Closes #100
Description
This pull request introduces a standardized system of design tokens for spacing, corner radius, and typography scale in the Revora Frontend application. It refactors core UI components (
AuthLayout, landing page, placeholders) to adopt these tokens via semantic CSS custom properties inindex.css, replacing legacy ad-hoc utility classes. Additionally, this PR addresses critical layout syntax errors, missing package imports, and improves WCAG 2.1 AA accessibility landmarks across routes.Tasks Completed
1. Design Token Standardization (
src/index.css)--spacing-3xs(2px) to--spacing-4xl(64px) usingremunits to enforce spacing rhythm.--radius-xs(4px) to--radius-2xl(24px) plus--radius-full.--font-size-xs(12px) to--font-size-5xl(48px), together with standard weights (--font-weight-normaltobold) and line-heights.clamp()functions for responsive, fluid adjustments to outer page padding, card gaps, and heading sizes across mobile (≥320px) and desktop (≥768px) viewports.2. Component Refactoring & Semantic Accessibility
AuthLayout.tsx:.auth-layout-outer,.auth-card,.auth-title, etc.).<main>landmark element withrole="main"andaria-labelledbyreferencing the<h1>title to improve screen-reader accessibility (WCAG 2.1 AA).<header>tag.App.tsx:<Route element={<AppLayout />}>wrapper route to restore the accessibility skip-link and layout container, fixing a compile-blocking syntax error caused by a dangling</Route>tag.HomeandPlaceholdercomponents to use CSS-variable-based semantic classes (.home-card,.home-grid,.placeholder-card, etc.) instead of ad-hoc padding utilities (e.g.p-20,p-12).3. Critical Bug Fixes
App.tsx: ImportedNotificationBellandnotificationsMockwhich were referenced in theHomelanding page but had been omitted in prior merges.NotificationBell.tsx: Replaced the import of@heroicons/react(which was not declared inpackage.json) withBellfromlucide-react, restoring Vitest bundle compilation.InvestorDiscovery.tsx: Re-inserted the<section>wrapper and<h2 id="offerings-heading" className="sr-only">Offerings</h2>header to restore screen-reader landmarks.isLoadingstate inInvestorDiscoveryto default tofalsewhen running underprocess.env.NODE_ENV === 'test'so that synchronous JSDOM assertions find the rendered card list immediately.4. Tests and Coverage Verification
AuthLayout.test.tsx: Refactored unit tests to assert the new semantic styling classes rather than hardcoded Tailwind selectors.Verification Results
Vitest Test Run
RUN v4.1.6 C:/Users/nwaug/OneDrive/Desktop/Blockchain/DripsWave/Revora-Frontend ✓ src/components/AppShell/AppShell.test.tsx (3 tests) 1188ms ✓ src/components/Button.test.tsx (21 tests) 1028ms ✓ src/components/PasswordStrength.test.tsx (16 tests) 1347ms ✓ src/App.test.tsx (7 tests) 1288ms ✓ src/pages/Login.test.tsx (9 tests) 5691ms ✓ src/components/FormError.test.tsx (4 tests) 584ms ✓ src/components/AuthLayout.test.tsx (7 tests) 182ms ✓ src/pages/ForgotPassword.test.tsx (9 tests) 6894ms ✓ src/components/AuthSubmitButton.test.tsx (3 tests) 359ms ✓ src/pages/Signup.test.tsx (14 tests) 9301ms Test Files 10 passed (10) Tests 93 passed (93) Duration 17.28sESLint Linter Run