Skip to content

Migrate from @policyengine/design-system to @policyengine/ui-kit#1026

Merged
MaxGhenis merged 5 commits into
mainfrom
bot/issue-1025
May 10, 2026
Merged

Migrate from @policyengine/design-system to @policyengine/ui-kit#1026
MaxGhenis merged 5 commits into
mainfrom
bot/issue-1025

Conversation

@policyengine
Copy link
Copy Markdown
Contributor

@policyengine policyengine Bot commented May 9, 2026

Closes #1025

Summary

This PR migrates policyengine-app-v2 from @policyengine/design-system to @policyengine/ui-kit, following the pattern established in PolicyEngine/policybench#16.

Changes

Package Management

  • Root package.json: Replaced @policyengine/design-system with @policyengine/ui-kit v0.4.0
  • Workspace packages: Updated app/, website/, and calculator-app/ package.json files
  • Build scripts: Removed design-system:build scripts that are no longer needed

CSS Imports

  • website/src/app/globals.css: Changed from @import "@policyengine/design-system/tokens.css" to @import "@policyengine/ui-kit/theme.css"
  • The ui-kit theme.css provides all the same CSS variables and Tailwind tokens

TypeScript Token Imports

  • app/src/designTokens/: Converted from re-exports to hardcoded token values
    • colors.ts: Now provides hardcoded color values matching ui-kit theme
    • spacing.ts: Provides essential spacing tokens
    • typography.ts: Provides font size tokens
  • website/src/: Updated 37+ files to import from local ../../../app/src/designTokens instead of @policyengine/design-system/tokens

Cleanup

  • Removed: packages/design-system/ directory entirely

Migration Strategy

Following the policybench pattern, this migration:

  1. Replaces the npm dependency
  2. Updates CSS imports to ui-kit's theme.css
  3. Migrates runtime TS imports to use local hardcoded values
  4. Removes the deprecated package

The local app/src/designTokens files now provide hardcoded values instead of re-exporting from the package, maintaining backward compatibility for components that use runtime token access while encouraging migration to CSS variables.

Testing

CI will verify:

  • All workspaces install correctly with ui-kit
  • TypeScript compilation succeeds
  • Linting passes
  • Builds complete successfully

Next Steps

This completes Block 3 (the host migration) from the issue. The design-system package can now be:

  1. Deprecated on npm with a migration notice
  2. Removed from publishing workflows

The remaining consumer repositories can be migrated separately following this same pattern.

🤖 Generated with Claude Code

…ports

- Replace @policyengine/design-system with @policyengine/ui-kit in all package.json files
- Update globals.css to import from @policyengine/ui-kit/theme.css
- Convert app/src/designTokens to use hardcoded values instead of re-exporting from design-system
- Remove design-system:build scripts from root package.json
- Update all website/ TypeScript imports to use local designTokens from app/
- Remove packages/design-system directory
- All imports now use @policyengine/ui-kit or local hardcoded tokens
@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
policyengine-app-v2 Ready Ready Preview, Comment May 10, 2026 0:39am
policyengine-calculator Ready Ready Preview, Comment May 10, 2026 0:39am
policyengine-calculator-next Ready Ready Preview, Comment May 10, 2026 0:39am
policyengine-website Ready Ready Preview, Comment May 10, 2026 0:39am

Request Review

@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

1 similar comment
@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

22 similar comments
@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

11 similar comments
@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

@policyengine
Copy link
Copy Markdown
Contributor Author

policyengine Bot commented May 9, 2026

Sorry @PolicyEngine[bot], only members of the PolicyEngine/core-developers team can invoke Claude Code.

Copy link
Copy Markdown
Contributor

@MaxGhenis MaxGhenis left a comment

Choose a reason for hiding this comment

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

Reviewed migration fixes and green CI.

@MaxGhenis MaxGhenis merged commit ebec1be into main May 10, 2026
14 checks passed
@MaxGhenis MaxGhenis deleted the bot/issue-1025 branch May 10, 2026 00:44
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.

Sunset @policyengine/design-system in favor of @policyengine/ui-kit

2 participants