Skip to content

Conversation

@Bahati308
Copy link
Contributor

@Bahati308 Bahati308 commented Dec 11, 2025

closes #9

- Implement Material Design 3 theme with ODE token integration
- Modernize buttons: pill-shaped, proper elevation, 48dp touch targets
- Update inputs: 4px radius, improved focus states, 56dp min height
- Apply ODE brand colors (green primary, gold secondary)
- Centralize styling in theme for consistent application
- Ensure accessibility: WCAG contrast, proper focus, touch targets.
@Bahati308 Bahati308 marked this pull request as draft December 11, 2025 15:08
Copy link
Contributor

@IamLRBA IamLRBA left a comment

Choose a reason for hiding this comment

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

Nice going @Bahati308, this is actually one of the deliverables of the unified design sytem for ODE and comes at a perfect time. The theme integration, accessibility improvements (48dp touch targets), and component updates all look good.

Just One Issue: I think the local tokens.ts file you created duplicates token values. If @ode/tokens is already in package.json of `formulus-formplayer, we should import directly from the original tokens package instead.

Suggested fix:
Maybe we can replace the local tokens.ts file with direct imports from the package:

In theme.ts, change from:
import { tokens } from './tokens';
To:
import tokens from '@ode/tokens/dist/js/tokens';

This keeps tokens in sync automatically from the original source and avoids duplication. Create React App should handle imports from node_modules after npm install.

Lastly, we might also consider adding the CSS import to index.css for CSS variable support:
@import '@ode/tokens/dist/css/tokens.css';

Thanks again for the improvements mate!

@IamLRBA
Copy link
Contributor

IamLRBA commented Dec 12, 2025

I really love this initiative you have put in this!

@Bahati308
Copy link
Contributor Author

Nice going @Bahati308, this is actually one of the deliverables of the unified design sytem for ODE and comes at a perfect time. The theme integration, accessibility improvements (48dp touch targets), and component updates all look good.

Just One Issue: I think the local tokens.ts file you created duplicates token values. If @ode/tokens is already in package.json of `formulus-formplayer, we should import directly from the original tokens package instead.

Suggested fix: Maybe we can replace the local tokens.ts file with direct imports from the package:

In theme.ts, change from: import { tokens } from './tokens'; To: import tokens from '@ode/tokens/dist/js/tokens';

This keeps tokens in sync automatically from the original source and avoids duplication. Create React App should handle imports from node_modules after npm install.

Lastly, we might also consider adding the CSS import to index.css for CSS variable support: @import '@ode/tokens/dist/css/tokens.css';

Thanks again for the improvements mate!

thanks for the insight @IamLRBA , lemme improve accordingly.

IamLRBA added a commit that referenced this pull request Dec 14, 2025
This file adapts the @ode/tokens JSON export to the expected structure for theme.ts, transforming font properties to typography and parsing pixel values.
@IamLRBA
Copy link
Contributor

IamLRBA commented Dec 14, 2025

@Bahati308, based on the suggestion, I made some changes please have a look.

Summary

I fixed the token duplication issue by replacing the local tokens.ts file with direct imports from the @ode/tokens package. This ensures design tokens stay in sync automatically with the centralized design system.

Changes Made

  • Removed duplicate tokens.ts - Eliminated 170 lines of token definitions
  • Added @ode/tokens dependency - Now using the official design tokens package
  • Created tokens-adapter.ts - Bridges structure differences between the package export and theme requirements
  • Updated theme.ts - Changed import to use the new adapter instead of local tokens

Setup Steps

After pulling these changes, run the following to update package-lock.json and install dependencies:

# Build the tokens package first
cd packages/tokens
npm install
npm run build

# Then install dependencies in formulus-formplayer (this will auto-generate package-lock.json)
cd ../../formulus-formplayer
npm install

# Start the development server
npm start

The package-lock.json will be automatically generated/updated when you run npm install in the formulus-formplayer directory.

Benefits

  • Single source of truth - Tokens are now managed in one place (packages/tokens)
  • Automatic sync - Changes to tokens automatically propagate to formplayer
  • No duplication - Removed duplicate code

Note: I tested this works and the development server started successfully showing the use of token for the UI

new

@Bahati308 Bahati308 marked this pull request as ready for review December 14, 2025 16:37
@Bahati308
Copy link
Contributor Author

Bahati308 commented Dec 14, 2025

Screen.Recording.2025-12-14.at.20.22.34.mov

this is super dope, @IamLRBA, even Formulus can testify

Copy link
Contributor

@IamLRBA IamLRBA left a comment

Choose a reason for hiding this comment

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

I see the tokens are being reflected in Formulus as well
Nice going @Bahati308

@Bahati308 Bahati308 merged commit 4457fcb into OpenDataEnsemble:dev Dec 14, 2025
4 checks passed
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.

Formplayer: Modern styling

2 participants