Fix/mos 0010#15
Merged
Merged
Conversation
- Add css.modules.localsConvention 'camelCase' to Vite config - Extract CSS custom properties (design system variables) to src/styles/variables.css - Extract global reset and base styles to src/styles/global.css - Update main.tsx to import new global style files - Remove App.css import from App.tsx (all content was dead code or extracted) - Delete Logo.css (never imported, dead CSS) No component CSS changed yet this commit only sets up the infrastructure. Build succeeds, all 90 tests pass.
Converted 6 components to CSS Modules: - Layout (header, nav, brand, actions) - LoadingSpinner (animation, circle, message) - ThemeToggle - ErrorBoundary (class component) - Toast (dynamic type via bracket notation) - PWAPrompt (install prompt, button variants) All imports changed to 'import styles from' pattern. BEM classes mapped to camelCase (e.g. header__container -> styles.headerContainer). Fixed orphaned CSS rule in LoadingSpinner. Build passes, all 90 tests pass.
Converted 5 form components to CSS Modules: - InvestmentBuilder (header, forms, actions, simulate button) - InvestmentForm (grid, fields, inputs, validation, remove) - AssetSelector (dropdown, search, filters, badges, options) - AssetTypeFilter (toggle buttons, active state) - SectorFilter (label, select dropdown) Updated getAssetTypeBadgeClass() helper to return scoped class names. Fixed orphaned CSS in LoadingSpinner (already committed). Build passes, all 90 tests pass.
Converted 5 components to CSS Modules:
- SimulationResults (metrics, holdings table, mobile summary, disclaimer)
- PortfolioChart (header, view toggle, tooltip, legend, watermark)
- PortfolioHeader (main, assets, duration)
- AllocationChart (donut SVG, legend items)
- TimeframeSelector (buttons, active state, hint)
Migrated test queries from querySelector('.bem-class') to
getByTestId() for CSS Module compatibility:
- Added data-testid='metrics-grid' to metrics section
- Added data-testid='holdings-table' to holdings table
- Updated 5 querySelector calls in SimulationResults.test.tsx
Fixed orphaned CSS rules in PortfolioHeader.module.css.
Build passes (no CSS warnings), all 90 tests pass.
Converted 4 page components to CSS Modules: - HomePage (hero, features grid, CTA section) - SimulatorPage (loading, error, debug states) - AboutPage (header, sections, tech grid, disclaimer) - NotFoundPage (404 code, message, link) Build passes, all 90 tests pass.
- Removed orphaned 'logo' className from Logo.tsx (no CSS backing) - Verified: 0 old-style CSS imports remain (only 2 global imports in main.tsx) - Verified: 20 CSS Module imports across all components/pages - Verified: 0 string className attributes in any TSX file - Verified: 0 querySelector calls in tests (all migrated to data-testid) - Build passes with no warnings, all 90 tests pass
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.
No description provided.