-
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
Theming: Fix listText semantic slot name #3403
Conversation
@@ -238,7 +238,7 @@ export interface ISemanticColors { | |||
/** | |||
* The default text color for list item titles and text in column fields. | |||
*/ | |||
listTextColor: string; |
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.
this is a breaking change...
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.
Can you deprecate colors? and keep them the old value and not use them?
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.
can we not make breaking changes here?
@dzearing fixed your comments, please re-review |
@@ -481,7 +481,7 @@ export class ThemeGeneratorPage extends BaseComponent<any, IThemeGeneratorPageSt | |||
} | |||
document.body.style.backgroundColor = themeAsJson.backgroundColor; | |||
document.body.style.color = themeAsJson.bodyText; | |||
loadTheme({ palette: themeAsJson }); | |||
console.log('Full theme... ', loadTheme({ palette: themeAsJson })); |
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.
intended?
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.
Yes, just better logging.
@dzearing poke |
} | ||
|
||
function _fixDeprecatedSlots(s: ISemanticColors): ISemanticColors { | ||
s.listTextColor = s.listText; |
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.
What if the user passed in their own listTextColor but didn't pass in listText
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.
that's fine, they'd get a customized listTextColor but not a customized listText, as intended. hmm, i guess i could do it the other way and say listText: p.listTextColor || p.neutralPrimary........
* fix colors * change file * deprecate slots correctly
Pull request checklist
$ npm run change
Description of changes
Fix incorrect naming convention for the listText semantic slot which is not theming right now because it is incorrectly named.
Added framework for "deprecating" semantic slots.
Focus areas to test
(optional)