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

Dropdown: Update some palette to use semantic slots instead #9182

Merged
merged 4 commits into from
May 23, 2019

Conversation

cliffkoh
Copy link
Contributor

@cliffkoh cliffkoh commented May 22, 2019

Pull request checklist

  • Addresses an existing issue: Fixes #0000
  • Include a change request file using $ npm run change

Description of changes

This PR attempts to reduce the amount of palette slot usage and replace with semantic slots in Dropdown.

Focus areas to test

(optional)

Microsoft Reviewers: Open in CodeFlow

@cliffkoh cliffkoh requested a review from phkuo May 22, 2019 19:50
@cliffkoh
Copy link
Contributor Author

@msft-github-bot whenever github gets back to a healthy state, please make sure @phkuo signs off.

@cliffkoh cliffkoh changed the title Update some palette to use semantic slots instead Dropdown: Update some palette to use semantic slots instead May 22, 2019
@@ -218,15 +218,15 @@ export const getStyles: IStyleFunction<IDropdownStyleProps, IDropdownStyles> = p
],
caretDown: [
globalClassnames.caretDown,
{ color: palette.neutralSecondary, fontSize: FontSizes.small, pointerEvents: 'none' },
{ color: semanticColors.inputPlaceholderText, fontSize: FontSizes.small, pointerEvents: 'none' },
Copy link
Contributor Author

Choose a reason for hiding this comment

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

not a fan of this, but can't find something more appropriate

Copy link
Contributor

Choose a reason for hiding this comment

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

maybe bodySubtext? (or a menuItem equivalent of it)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is nothing in menu that maps to neutralSecondary, but I will change to bodySubtext. Thanks for the suggestion!

Copy link
Contributor

Choose a reason for hiding this comment

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

@cliffkoh this is exactly why I we need designers to help us out with this kind of issues by making a pass through all semantic slots and create redlines for each component in pointing the correct usage of these slots. It might be very possible that ew end up with new slots addition but we should be very careful with it.

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah you might want to add a menu item version of bodySubtext at some point

Copy link
Contributor

Choose a reason for hiding this comment

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

bodySubtext is only going to work while the menuBackground and bodyBackground are the same

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should I delay merging this PR? Or at least revert these two lines of more contentious changes?

Copy link
Contributor

Choose a reason for hiding this comment

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

up to you. currently there are no themes that customize semantic slots so this is only a theoretical issue

@msft-github-bot
Copy link
Contributor

Hello @cliffkoh!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

Do note that I've been instructed to only help merge pull requests of this repository that have been opened for at least 8 hours, a condition that is not currently met. No worries though, I will be back when the time is right! 😉

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msft-github-bot) and give me an instruction to get started! Learn more here.

@msft-github-bot
Copy link
Contributor

Hello @cliffkoh!

Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:

  • I'll only merge this pull request if it's approved by @phkuo

If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you".

Copy link
Contributor

@phkuo phkuo left a comment

Choose a reason for hiding this comment

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

see comments

@msft-github-bot
Copy link
Contributor

msft-github-bot commented May 22, 2019

Component perf results:

Scenario Target branch avg total (ms) PR avg total (ms) Target branch avg per item (ms) PR avg per item (ms) Is significant change Is regression
PrimaryButton 71.863 73.330 0.719 0.733 false false
BaseButton 27.081 27.212 0.271 0.272 false false
NewButton 51.634 54.323 0.516 0.543 false false
button 4.181 4.413 0.042 0.044 false false
DetailsRows without styles 154.465 150.171 1.545 1.502 false false
DetailsRows 148.963 146.840 1.490 1.468 false false
Toggles 29.898 30.617 0.299 0.306 false false
NewToggle 58.907 58.309 0.589 0.583 false false
DocumentCardTitle with truncation 17.394 17.499 0.174 0.175 false false

@size-auditor
Copy link

size-auditor bot commented May 22, 2019

Bundle test Size (minified) Diff from master
Dropdown 216.269 kB ExceedsBaseline     2 bytes

ExceedsTolerance  Exceeds Tolerance     ExceedsBaseline  Exceeds Baseline     BelowBaseline  Below Baseline     1 kB = 1000 bytes

@msft-github-bot msft-github-bot merged commit ebe2615 into microsoft:master May 23, 2019
@cliffkoh cliffkoh deleted the cliffkoh/semantic branch May 23, 2019 04:42
@msft-github-bot
Copy link
Contributor

🎉office-ui-fabric-react@v6.186.0 has been released which incorporates this pull request.:tada:

Handy links:

@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants