Skip to content
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

Merged
merged 3 commits into from
Jan 20, 2018

Conversation

phkuo
Copy link
Contributor

@phkuo phkuo commented Nov 16, 2017

Pull request checklist

  • Addresses an existing issue: Fixes #0000
  • Include a change request file using $ 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)

@phkuo phkuo requested review from dzearing and yiminwu November 16, 2017 03:21
@@ -238,7 +238,7 @@ export interface ISemanticColors {
/**
* The default text color for list item titles and text in column fields.
*/
listTextColor: string;
Copy link
Member

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...

Copy link
Member

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?

Copy link
Member

@dzearing dzearing left a 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?

@phkuo
Copy link
Contributor Author

phkuo commented Nov 17, 2017

@dzearing fixed your comments, please re-review

@phkuo
Copy link
Contributor Author

phkuo commented Nov 29, 2017

@dzearing @yiminwu ping

@@ -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 }));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, just better logging.

@phkuo phkuo requested a review from joschect December 2, 2017 02:25
@phkuo phkuo dismissed dzearing’s stale review December 4, 2017 19:33

addressed comments

@phkuo
Copy link
Contributor Author

phkuo commented Jan 12, 2018

@dzearing poke

}

function _fixDeprecatedSlots(s: ISemanticColors): ISemanticColors {
s.listTextColor = s.listText;
Copy link
Contributor

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

Copy link
Contributor Author

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........

@dzearing dzearing merged commit 04bf3df into microsoft:master Jan 20, 2018
chrismohr pushed a commit to chrismohr/office-ui-fabric-react that referenced this pull request Apr 17, 2018
* fix colors

* change file

* deprecate slots correctly
@phkuo phkuo deleted the phkuo/fixListText branch June 7, 2018 21:55
@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants