-
Notifications
You must be signed in to change notification settings - Fork 235
feat: remove theme fragment minimum and allow "app" fragments #1522
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.
Exepting the minor comment I posted, the changes look good, great job. Thanks for working on this and proposing a solution so fast!
My opinion on some of the questions posted:
- Generally speaking, I think it's enough (at least for my team) to only have one
appfragment. We can compute ourappstyles locally, depending oncolor,scaleor other factors and register it when ready. - I cannot think of a scenario where we would want that, as long as we can change the styles for the app fragment. Keeping in mind that the local
appstyles might also depend oncolororscale, we might want to recompute theappstyles and update them, but not remove.
packages/theme/src/Theme.ts
Outdated
| if (currentStyles) { | ||
| acc.push(currentStyles.styles); | ||
| const addStyles = ( | ||
| name: FragmentType, |
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.
Shouldn't this be of type FragmentName, as it can have values other than 'color' | 'scale' | 'core' | 'app'?
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.
Good call. Even my own typescript alludes me more than I'd like! 🙈
e7accb8 to
4fed6b1
Compare
76b4793 to
5bd662d
Compare
ae4f12f to
29fbd44
Compare
8a8249c to
004527d
Compare
stanvladut
left a comment
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.
Great work! 💯
9684996 to
d273341
Compare
7aaaafd to
67e1441
Compare
stanvladut
left a comment
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.
Great work!
5d1f4fb to
d6ef939
Compare
Description
sp-themeappfragment so that consuming application can hang local extensions of the Spectrum CSS Custom Properties API on thesp-themeelementQuestions:
appfragment, is that OK?appfragment, is that OK?Related Issue
fixes #1496
Motivation and Context
Easier customization of applications consuming Spectrum Web Component and associated styling APIs
How Has This Been Tested?
Types of changes
Checklist: