Skip to content

Conversation

@MaxGhenis
Copy link
Contributor

Summary

  • Enhanced main results display with prominent key metrics banner and color-coded stats
  • Created data infrastructure for ONS business statistics with synthetic firm generation plan
  • Added automated CI/CD workflow for GitHub Pages deployment

Changes

Dashboard Improvements

  • Clearer Results Display: Added prominent blue banner showing key policy impacts (revenue, firms affected, etc.)
  • Enhanced Stats Cards: Color-coded winners (green), losers (red), and impacts with larger, clearer typography
  • Improved User Guidance: Added comprehensive quick start guide with numbered steps for first-time users
  • Better Data Visualization: Fixed bar charts to start from 0 for accurate representation

Data Infrastructure

  • Created data/ folder structure for ONS business statistics
  • Added comprehensive documentation for data sources and licensing
  • Developed synthetic firm generation plan using gradient descent to match ONS marginal distributions
  • Included Python implementation outline for generating representative microdata

Technical Improvements

  • Removed VAT pass-through functionality as requested
  • Set up GitHub Actions workflow for automated testing and deployment
  • Configured Next.js for static export with GitHub Pages support
  • Renamed vat-dashboard folder to vatlab for consistency
  • Added project-level README with installation and usage instructions
  • Added proper .gitignore for version control

Test Plan

  • Run npm install and npm run dev to test local development
  • Verify all charts display correctly and start from 0
  • Check that removed pass-through rate no longer appears in UI
  • Test GitHub Actions workflow on merge
  • Confirm static export works with npm run build && npm run export

This PR significantly improves the user experience and sets up the foundation for data-driven VAT policy analysis.

MaxGhenis and others added 11 commits July 31, 2025 17:35
…CI/CD

- Enhanced main results display with prominent key metrics banner
- Improved stats cards with color-coded categories (winners/losers)
- Added comprehensive quick start guide for first-time users
- Removed VAT pass-through functionality as requested
- Fixed bar charts to start from 0 for better data representation
- Created data folder structure with ONS business statistics documentation
- Added synthetic firm generator plan using gradient descent optimization
- Set up GitHub Actions workflow for automated testing and deployment
- Renamed vat-dashboard folder to vatlab for consistency
- Added project README with usage instructions and overview
- Configured Next.js for static export and GitHub Pages deployment
- Added .gitignore for proper version control
- Simplified sidebar to always compare reforms against UK baseline
- Removed baseline/reform tabs - now just shows reform configuration
- Updated policy comparison display to show baseline vs reform side-by-side
- Changed font from Roboto Serif to Roboto for cleaner, modern look
- Fixed conditional rendering structure in vat-analysis.js
- Added comprehensive Jest test suite for VAT analysis page
- Tests check for valid JSX structure, rendering, and component integration
- Updated package.json with testing dependencies
- Added Jest configuration for Next.js
- Updated CI workflow to run tests with coverage
- Moved Policy Comparison section outside of the initial conditional block
- Fixed improper nesting of JSX elements that was causing syntax errors
- Ensured proper placement of conditional rendering for analysisResults
- Removed the entire labor-intensive industries selection UI from sidebar
- Removed laborIntensiveIndustries from state in both components
- Removed handleIndustryToggle function as it's no longer needed
- Simplified the form to focus on threshold and rate parameters
- Remove top blue navigation bar
- Remove secondary tabs (Calibration, Simulation Guide, etc.)
- Remove Quick Start Guide
- Show conditional content based on parameter changes
- Move parameter display to sidebar with inline text boxes
- Add PolicyEngine color scheme throughout
- Visually separate elasticity as model parameter
- Improve sidebar layout to avoid scrolling
- Update tests to match new interface

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove analyze button - updates are now instant
- Change winner/loser definition to any revenue change (no 5% threshold)
- Simplify top banner to show only revenue change % and winner/loser %
- Add breakdown selector defaulting to sector view
- Show fake data watermark only when displaying results
- Update tests to match new behavior

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove useEffect from VATAnalysisSidebar mock that was causing infinite loop
- Add test timeout and force exit options
- Add 5 minute timeout to GitHub Actions test step
- Tests now pass in under 1 second locally
- Replace revenue change labels with tax change terminology
- Add consistent left/right positioning (paying more on left, less on right)
- Include light gray center section for unaffected businesses
- Add weighting options (firms, revenue, employees) selector
- Add Hair & Beauty sector to the breakdown
- Implement tax change view showing percentage and amount changes
- Add year selector (2024-2030) to results page
- Modernize UI with controls in upper right corner
- Center title with absolute positioned controls

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
@MaxGhenis MaxGhenis merged commit 813c166 into main Jul 31, 2025
2 checks passed
daphnehanse11 pushed a commit to daphnehanse11/uk-vatlab that referenced this pull request Aug 21, 2025
PolicyEngine#1)

* Improve VAT dashboard with clearer results, data infrastructure, and CI/CD

- Enhanced main results display with prominent key metrics banner
- Improved stats cards with color-coded categories (winners/losers)
- Added comprehensive quick start guide for first-time users
- Removed VAT pass-through functionality as requested
- Fixed bar charts to start from 0 for better data representation
- Created data folder structure with ONS business statistics documentation
- Added synthetic firm generator plan using gradient descent optimization
- Set up GitHub Actions workflow for automated testing and deployment
- Renamed vat-dashboard folder to vatlab for consistency
- Added project README with usage instructions and overview
- Configured Next.js for static export and GitHub Pages deployment
- Added .gitignore for proper version control

* Remove baseline tab and switch to Roboto font

- Simplified sidebar to always compare reforms against UK baseline
- Removed baseline/reform tabs - now just shows reform configuration
- Updated policy comparison display to show baseline vs reform side-by-side
- Changed font from Roboto Serif to Roboto for cleaner, modern look

* Fix JSX syntax error and add tests to prevent future issues

- Fixed conditional rendering structure in vat-analysis.js
- Added comprehensive Jest test suite for VAT analysis page
- Tests check for valid JSX structure, rendering, and component integration
- Updated package.json with testing dependencies
- Added Jest configuration for Next.js
- Updated CI workflow to run tests with coverage

* Fix JSX structure error in vat-analysis.js

- Moved Policy Comparison section outside of the initial conditional block
- Fixed improper nesting of JSX elements that was causing syntax errors
- Ensured proper placement of conditional rendering for analysisResults

* Remove labor-intensive industries checkboxes

- Removed the entire labor-intensive industries selection UI from sidebar
- Removed laborIntensiveIndustries from state in both components
- Removed handleIndustryToggle function as it's no longer needed
- Simplified the form to focus on threshold and rate parameters

* Reimagine VAT dashboard interface with cleaner design

- Remove top blue navigation bar
- Remove secondary tabs (Calibration, Simulation Guide, etc.)
- Remove Quick Start Guide
- Show conditional content based on parameter changes
- Move parameter display to sidebar with inline text boxes
- Add PolicyEngine color scheme throughout
- Visually separate elasticity as model parameter
- Improve sidebar layout to avoid scrolling
- Update tests to match new interface

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Clean up sidebar header duplication and remove graduated threshold bullet

* Update business impact distribution colors - losers gray, minimal fog gray, winners teal

* Make VAT dashboard instant and improve UX

- Remove analyze button - updates are now instant
- Change winner/loser definition to any revenue change (no 5% threshold)
- Simplify top banner to show only revenue change % and winner/loser %
- Add breakdown selector defaulting to sector view
- Show fake data watermark only when displaying results
- Update tests to match new behavior

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix CI/CD test hanging issue

- Remove useEffect from VATAnalysisSidebar mock that was causing infinite loop
- Add test timeout and force exit options
- Add 5 minute timeout to GitHub Actions test step
- Tests now pass in under 1 second locally

* Update VAT dashboard business impact visualization

- Replace revenue change labels with tax change terminology
- Add consistent left/right positioning (paying more on left, less on right)
- Include light gray center section for unaffected businesses
- Add weighting options (firms, revenue, employees) selector
- Add Hair & Beauty sector to the breakdown
- Implement tax change view showing percentage and amount changes
- Add year selector (2024-2030) to results page
- Modernize UI with controls in upper right corner
- Center title with absolute positioned controls

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
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