Skip to content

Commit 6b18839

Browse files
MohsinHashmi-DataInnDeveloperclaudemohsin-wiser
authored
fix(ui): standardize sidebar menu styling with global CSS classes (#471)
* feat(ui): complete migration from neumorphic to corporate theme ## Summary - Migrate entire frontend from neumorphic (soft UI) to minimal corporate theme - Update SCSS variables, mixins, and component styles - Update Tailwind CSS custom properties - Clean up unused migration wrapper components ## Changes ### Core Style Files - `_variables.scss`: Complete rewrite with corporate colors (#ffffff, #f8f9fa), borders (#e5e7eb), and subtle shadows - `_mixins.scss`: Update mixins to corporate styling with legacy aliases - `_neumorphic-components.scss`: Update component classes (dual naming for compatibility) - `style.scss`: Update all Bootstrap overrides (cards, buttons, forms, tables, modals) - `tailwind.css`: Update CSS custom properties with corporate values ### Component Updates - `dropdown-menu.jsx`: Remove inline neumorphic styles - `neumorphic-pagination.jsx`: Update to corporate theme - `social-login-buttons.jsx`: Replace shadow classes with borders - `step-wizard.jsx`: Update step circles and connectors ### Screen Updates - Chart of accounts, contacts, employees, products, currency screens - Dashboard sections (bank_account, cash_flow) - Theme reference page with updated examples ### Cleanup - Remove unused Neu* wrapper components (NeuButton, NeuCard, etc.) - Simplify migration/index.js to re-export reactstrap components ## Theme Changes | Element | Old | New | |---------|-----|-----| | Background | #e8eef5 | #ffffff / #f8f9fa | | Borders | None (shadows) | 1px solid #e5e7eb | | Shadows | Multi-directional | Subtle bottom shadows | | Text Primary | #1e3a5f | #111827 | 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: restore migration neu components The migration folder contains custom shadcn/ui-based components that provide reactstrap-compatible APIs. These were incorrectly removed - reactstrap is not installed in this project. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(ui): add dual theme support (light/dark mode) - Add comprehensive dark mode CSS variables to tailwind.css - Add dark mode SCSS variables to _variables.scss - Add dark mode component overrides to global.scss and _neumorphic-components.scss - Update react-select styles to use CSS variables for theme switching - Fix Company/Business Type dropdown visibility in dark mode - Update selectStyles in utils/index.js, register, profile, and currency screens - Enhance theme-toggle component with next-themes integration - Enable system theme detection in ThemeProvider - Add THEME-GUIDELINES.md with comprehensive dark mode documentation - Add screenshot test for register page in light/dark modes - Update dashboard bank_account with Tailwind dark mode classes Dark mode color palette: - Backgrounds: Slate family (#0f172a, #1e293b, #334155) - Text: Light colors (#f8fafc, #e2e8f0, #cbd5e1) - Primary: Blue 500 (#3b82f6) for better contrast - Semantic colors adjusted for dark backgrounds 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(ui): unify sidebar menu styling with global css classes - Add global CSS classes for consistent menu styling (.corp-menu-item, .corp-submenu-item) - Standardize border-radius to rounded-md (0.375rem) across all menu items - Remove inline styles and use CSS variables for colors - Add text-decoration: none to prevent underlines on all menu states - Ensure consistent highlight colors and hover states - Move theme-level styling to index.css for better maintainability All menu items now follow corporate design system with uniform appearance. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * test(ui): update sidebar test to match new css class structure * chore: add visual regression snapshots and update package-lock - Add baseline snapshots for visual regression tests (e2e) - Update package-lock.json (remove typescript peer dependency) - Snapshots cover dashboard, invoices, reports, and login screens - Includes light/dark mode and responsive variants * fix(ui): remove unused variables from theme toggle components --------- Co-authored-by: Developer <developer@simpleaccounts.io> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Mohsin Hashmi <mhashmi@wiser.com>
1 parent 9195401 commit 6b18839

34 files changed

Lines changed: 1771 additions & 149 deletions

CLAUDE.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,19 @@ This project uses a **Minimal Corporate Design System** inspired by modern SaaS
1717

1818
### Design Documentation
1919

20-
**📖 See [DESIGN-GUIDE.md](./DESIGN-GUIDE.md) for complete design system documentation**, including:
20+
**📖 See the following guides for complete design system documentation:**
21+
22+
- **[docs/THEME-GUIDELINES.md](./docs/THEME-GUIDELINES.md)** - Comprehensive theme reference (START HERE)
23+
- **[DESIGN-GUIDE.md](./DESIGN-GUIDE.md)** - Design system overview with examples
24+
- **[MIGRATION-TO-CORPORATE.md](./MIGRATION-TO-CORPORATE.md)** - Migration guide from legacy styles
25+
26+
These guides include:
2127

2228
- Color palette and usage guidelines
2329
- Typography and spacing rules
2430
- Component examples and code snippets
25-
- Migration guide from neumorphic to corporate theme
31+
- CSS variables and Tailwind classes reference
32+
- Do's and Don'ts
2633

2734
### Design Principles
2835

apps/frontend/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# SimpleAccounts Frontend Admin Website
22

3+
## Design System
4+
5+
This project uses a **Corporate Design System**. All UI development must follow the theme guidelines.
6+
7+
**📖 Documentation:**
8+
9+
- [Theme Guidelines](../../docs/THEME-GUIDELINES.md) - Comprehensive theme reference
10+
- [Design Guide](../../DESIGN-GUIDE.md) - Design system overview
11+
- [Migration Guide](../../MIGRATION-TO-CORPORATE.md) - Legacy style migration
12+
13+
**Quick Reference:**
14+
15+
- Primary color: `#2064d8`
16+
- Background: `#ffffff` (content), `#f8f9fa` (page)
17+
- Text: `#111827` (primary), `#4b5563` (secondary)
18+
- Borders: `#e5e7eb`
19+
320
## Project Folder Structure
421

522
### assets
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
import { test, expect } from '@playwright/test';
2+
3+
test('screenshot register page light mode', async ({ page }) => {
4+
// Go to register page
5+
await page.goto('http://localhost:3000/register');
6+
7+
// Wait for page to load
8+
await page.waitForTimeout(2000);
9+
10+
// Take screenshot of register page
11+
await page.screenshot({
12+
path: 'test-results/register-page.png',
13+
fullPage: true,
14+
});
15+
16+
// Check if Company Type select exists
17+
const companyTypeSelect = page.locator('#companyTypeCode');
18+
const isVisible = await companyTypeSelect.isVisible({ timeout: 5000 }).catch(() => false);
19+
console.log(`Company Type select visible: ${isVisible}`);
20+
21+
// Click on the select to open dropdown
22+
if (isVisible) {
23+
await companyTypeSelect.click();
24+
await page.waitForTimeout(500);
25+
26+
// Take screenshot with dropdown open
27+
await page.screenshot({
28+
path: 'test-results/register-dropdown-open.png',
29+
fullPage: true,
30+
});
31+
32+
// Press escape to close
33+
await page.keyboard.press('Escape');
34+
}
35+
36+
// Verify page loaded correctly
37+
await expect(page.locator('body')).toBeVisible();
38+
console.log('Register page loaded successfully');
39+
});
40+
41+
test('screenshot register page dark mode', async ({ page }) => {
42+
// Go to register page
43+
await page.goto('http://localhost:3000/register');
44+
45+
// Wait for page to load
46+
await page.waitForTimeout(2000);
47+
48+
// Click theme toggle button (moon/sun icon in top right)
49+
const themeToggle = page
50+
.locator('button[aria-label*="theme"], button[aria-label*="mode"]')
51+
.first();
52+
const toggleVisible = await themeToggle.isVisible({ timeout: 3000 }).catch(() => false);
53+
54+
if (toggleVisible) {
55+
await themeToggle.click();
56+
await page.waitForTimeout(1000);
57+
console.log('Switched to dark mode');
58+
} else {
59+
console.log('Theme toggle not found, trying alternative selector');
60+
// Try clicking by position (top right area)
61+
const altToggle = page.locator('header button').last();
62+
if (await altToggle.isVisible({ timeout: 2000 }).catch(() => false)) {
63+
await altToggle.click();
64+
await page.waitForTimeout(1000);
65+
}
66+
}
67+
68+
// Take screenshot of dark mode
69+
await page.screenshot({
70+
path: 'test-results/register-dark-mode.png',
71+
fullPage: true,
72+
});
73+
74+
// Check if Company Type select exists in dark mode
75+
const companyTypeSelect = page.locator('#companyTypeCode');
76+
const isVisible = await companyTypeSelect.isVisible({ timeout: 5000 }).catch(() => false);
77+
console.log(`Company Type select visible in dark mode: ${isVisible}`);
78+
79+
// Click on the select to open dropdown
80+
if (isVisible) {
81+
await companyTypeSelect.click();
82+
await page.waitForTimeout(500);
83+
84+
// Take screenshot with dropdown open in dark mode
85+
await page.screenshot({
86+
path: 'test-results/register-dark-dropdown-open.png',
87+
fullPage: true,
88+
});
89+
90+
// Press escape to close
91+
await page.keyboard.press('Escape');
92+
}
93+
94+
console.log('Dark mode test completed');
95+
});
12.4 KB
Loading
12 KB
Loading
12 KB
Loading
12 KB
Loading
10.5 KB
Loading
12.2 KB
Loading
12.2 KB
Loading

0 commit comments

Comments
 (0)