Skip to content

Conversation

@charlescgs
Copy link
Contributor

@charlescgs charlescgs commented Nov 11, 2025

This PR is making an effort to improve upon existing DesignSystem.

  • Set up lightness and muted parameters on per theme basis instead relying on hard-coded values
  • Add some documentation
  • Add hsl helper function

@jrmoulton jrmoulton added this to the Version 3.0 milestone Nov 13, 2025
@charlescgs charlescgs marked this pull request as ready for review November 16, 2025 19:34
@charlescgs
Copy link
Contributor Author

Bumped to 1.90 as floor was constified at this rust version.

@charlescgs charlescgs changed the title WIP: Const DesignSystem Const DesignSystem Nov 17, 2025
@charlescgs charlescgs changed the title Const DesignSystem Constify DesignSystem Nov 17, 2025
@jrmoulton
Copy link
Collaborator

Hmm. I thought that this would improve the performance of the style pass but it doesn't actually seem to make a difference.

What was the motivation for this change?

There is a regression on disabled text color

@jrmoulton
Copy link
Collaborator

image

@jrmoulton
Copy link
Collaborator

While we use Color that is just an alias for AlphaColor that is all I can do.

Styles in most places accept a Brush which can be any color space (or a gradient/image)

@charlescgs
Copy link
Contributor Author

The motivation was to make it do more work at compile time instead of runtime, but if its not making a difference then yeah, feel free to close it.

@jrmoulton
Copy link
Collaborator

I think all of the clippy if let chains would be good to merge. Maybe let's just revert the changes to theme.rs

@charlescgs
Copy link
Contributor Author

Will do that. However, will keep hsl function as an alternative way of constructing color, which might be useful when you are trying your theme out. Will add also a way to customize background elevation level.

@charlescgs charlescgs changed the title Constify DesignSystem DesignSystem improvements Nov 17, 2025
@charlescgs
Copy link
Contributor Author

@jrmoulton PR is ready for review.

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