-
Notifications
You must be signed in to change notification settings - Fork 6.8k
feat(material-experimental/theming): Introduce a facade layer between user-facing customizable keys and actual MDC token names #27219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have an example somewhere of how the API for customizing the tokens can be used?
@crisbeto the second commit here does show an example of customizing tokens, are you asking for an example that's more setting one-off toke values rather than just |
Yeah I was thinking of a demo showing how a user can override an arbitrary token (e.g. the border radius of something). |
Deployed dev-app for fabab6e to: https://ng-dev-previews-comp--pr-angular-components-27219-pj0g4m6m.web.app Note: As new commits are pushed to this pull request, this link is updated after the preview is rebuilt. |
user-facing customizable keys and actual MDC token names This allows us to expose easier to understand names for users, and decouples us from changes that MDC might make to token names in the future
Added an example of setting arbitrary custom token values |
Is the example supposed to work in the dev app or is this just to show the API? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm gonna make a suggestion that I think might help carve out this design, but don't hold yourself to it:
Write the user-facing documentation while you are creating these early designs and prototypes.
This would help us understand from a user-point-of-view whether there's anything that we might be missing or isn't intuitive, and it would help as we review as well.
@andrewseguin I don't want to spend too much time wordsmithing if its likely to change, but I can write up a rough bullet point version of the user docs, I think that would be helpful 👍 |
@crisbeto the example should work, you just need the magic param to turn on experimental styling: https://ng-dev-previews-comp--pr-angular-components-27219-pj0g4m6m.web.app/checkbox?tokenapi= (note: all of the other components will be un-styled in this mode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved - if there's any changes we want to make over time we can do that iteratively, but this seems good to land now
Yep, nothing is set in stone here, that's why its in material-experimental. I do expect some of it to change and that's fine |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This allows us to expose easier to understand names for users, and
decouples us from changes that MDC might make to token names in the
future