Skip to content

Conversation

@BenOsodrac
Copy link
Contributor

@BenOsodrac BenOsodrac commented Nov 15, 2025

Issue number: internal


What is the new behavior?

This pull request updates the design token build system and its dependencies, simplifying the process and removing custom scripts in favor of using the latest features of the outsystems-design-tokens package. The changes modernize how design tokens are generated and maintained, reducing custom code and leveraging upstream improvements.

Key changes include:

Build Process Simplification:

  • The custom design token generation scripts (core/scripts/tokens/index.mjs and core/scripts/tokens/utils.mjs) have been removed. Token generation is now handled directly via the outsystems-design-tokens package using an npx command in the build.tokens script. This reduces maintenance overhead and keeps the build process aligned with upstream best practices. [1] [2] [3]

Dependency Updates:

  • Updated outsystems-design-tokens to version 1.3.3 and style-dictionary to version 5.1.1 in both package.json and package-lock.json. This ensures compatibility with the latest features and bug fixes and removes the need to specify style-dictionary directly as a dependency. [1] [2] [3] [4]

SCSS Utility Import:

  • The @forward "../../foundations/ionic.utility"; statement was removed from core/src/css/ionic/utils.bundle.ionic.scss, likely because the utility SCSS is now generated and managed by the new token build process.

Removed CSS tests for Ionic theme, as they relied heavily on testing the effect of the utility-classes, that are no longer created on the ionic scope.

Does this introduce a breaking change?

  • Yes
  • No

@BenOsodrac BenOsodrac requested a review from a team as a code owner November 15, 2025 19:50
@BenOsodrac BenOsodrac requested a review from thetaPC November 15, 2025 19:50
@BenOsodrac BenOsodrac added package: core @ionic/core package type: bug a confirmed bug report dependencies Pull requests that update a dependency file labels Nov 15, 2025
@vercel
Copy link

vercel bot commented Nov 15, 2025

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

Project Deployment Preview Comments Updated (UTC)
ionic-framework Ready Ready Preview Comment Nov 17, 2025 8:52pm

@BenOsodrac BenOsodrac requested review from brandyscarney and removed request for thetaPC November 15, 2025 19:51
Copy link
Contributor

@thetaPC thetaPC left a comment

Choose a reason for hiding this comment

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

The foundations/README.md also needs to be updated to exlcude ionic.utility.scss since that file isn't being generated anymore.

Copy link
Contributor

Choose a reason for hiding this comment

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

Revert this deletion. We use it to test on ios and md.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, done!

"jest": "^29.7.0",
"jest-cli": "^29.7.0",
"outsystems-design-tokens": "^1.3.2",
"outsystems-design-tokens": "1.3.3",
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we pinning the version?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it won't matter, as Ionic will no longer consume os-tokens in the near future. But still, removed the pin for now :)

Copy link
Contributor

Choose a reason for hiding this comment

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

No worries, if there's a good reason to pin then I'm not against it. Just wanted to keep record in case we should be aware of something.

@BenOsodrac BenOsodrac changed the title fix(tokens): remove style dictionary scripts and reuse oos tokens logic fix(tokens): remove style dictionary scripts and reuse os tokens logic Nov 17, 2025
Copy link
Member

@brandyscarney brandyscarney left a comment

Choose a reason for hiding this comment

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

I'm approving this based on the changes but please review my comments as some of the screenshot diffs look wrong and will likely need to be addressed. 👍

Copy link
Member

Choose a reason for hiding this comment

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

We should consider using the existing Ionic CSS utility classes to get the ion-margin styles here (and in others).

Copy link
Member

Choose a reason for hiding this comment

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

We should consider using the existing Ionic CSS utility classes to get the ion-padding styles here (and in others).

Copy link
Member

Choose a reason for hiding this comment

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

The CSS utilities would be especially useful for this screenshot - you can't see the entire focused border anymore without the ion-padding styles:

`<div id="container" class="ion-padding">
  <ion-chip class="ion-focused">
    <ion-label>Focused</ion-label>
  </ion-chip>
</div>`,

Copy link
Member

Choose a reason for hiding this comment

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

This letter spacing is a bit weird - not sure if intentional

Copy link
Member

Choose a reason for hiding this comment

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

Same weirdness with letter spacing here as in segment button

Copy link
Member

Choose a reason for hiding this comment

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

Button letter-spacing is a bit weird now - is this intentional?

Copy link
Contributor

@thetaPC thetaPC left a comment

Choose a reason for hiding this comment

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

LGTM, as long as Brandy's feedback is addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file package: core @ionic/core package type: bug a confirmed bug report

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants