-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Foundation: Support contextual theming and styles #5867
Foundation: Support contextual theming and styles #5867
Conversation
…ngs to createComponent. Create examples to demo.
// TODO: do we want field props? should fields be part of IComponentOptions and used here? | ||
// TODO: should we centrally define DefaultFields? (not exported from styling) | ||
const DefaultFields = ['theme', 'styles']; | ||
return Customizations.getSettings(DefaultFields, displayName, context.customizations); |
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.
defaultfields are default... some components, like Layer, can mark additional fields as customizable (such as "hostId"). How is this piped in?
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.
Yeah, I wanted to talk to you about that. I have the TODO on line 106 for exactly that. 😄
>({ | ||
displayName: 'CollapsibleSection', | ||
view: CollapsibleSectionView, | ||
styles |
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.
customizableProps: ['foo', 'bar', 'baz']; maybe
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.
Yep, that's what I was thinking, assuming we still needed to pipe them in (tied to other comment)
Pull request checklist
$ npm run change
Description of changes
Add support for contextual theming, styles, settings and scoped settings to createComponent. Create examples to demo.
There's a bit of engineering debt accruing here but seeing as we wanted something for Friday and I'm on Shield, we can either leave this open until issues are addressed or merge and follow up.
Focus areas to test
Tests to be written (aforementioned engineering debt.)
Microsoft Reviewers: Open in CodeFlow