Skip to content

Theming: Fix listText semantic slot name#3403

Merged
dzearing merged 3 commits into
microsoft:masterfrom
phkuo:phkuo/fixListText
Jan 20, 2018
Merged

Theming: Fix listText semantic slot name#3403
dzearing merged 3 commits into
microsoft:masterfrom
phkuo:phkuo/fixListText

Conversation

@phkuo

@phkuo phkuo commented Nov 16, 2017

Copy link
Copy Markdown
Contributor

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
/**
* The default text color for list item titles and text in column fields.
*/
listTextColor: string;

Copy link
Copy Markdown
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
Copy Markdown
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?

@dzearing dzearing left a comment

Copy link
Copy Markdown
Member

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

phkuo commented Nov 17, 2017

Copy link
Copy Markdown
Contributor Author

@dzearing fixed your comments, please re-review

@phkuo

phkuo commented Nov 29, 2017

Copy link
Copy Markdown
Contributor Author

@dzearing @yiminwu ping

document.body.style.backgroundColor = themeAsJson.backgroundColor;
document.body.style.color = themeAsJson.bodyText;
loadTheme({ palette: themeAsJson });
console.log('Full theme... ', loadTheme({ palette: themeAsJson }));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

intended?

Copy link
Copy Markdown
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

phkuo commented Jan 12, 2018

Copy link
Copy Markdown
Contributor Author

@dzearing poke

}

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

Copy link
Copy Markdown
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
Copy Markdown
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
@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