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

Card: Making elevation themable by using the effects from theme instead of directly referencing Depths #9472

Merged
merged 3 commits into from
Jun 18, 2019

Conversation

khmakoto
Copy link
Member

@khmakoto khmakoto commented Jun 14, 2019

Pull request checklist

Description of changes

Card's elevation/box-shadow wasn't themable because it was directly referencing Depths. This PR changes that so that Card uses the effect provided via the theme instead.

This PR also removes @uifabric/fluent-theme from package.json and customizations.ts as we're not using it anymore for Depths and, given that Card is Fluent by Default, we shouldn't need a Fluent customization in the demos, hence why we don't need the package dependency anymore.

Focus areas to test

Because the correct effects have been chosen there shouldn't be any differences and this PR should comply with all of Card's snapshot and visual regression tests.

Microsoft Reviewers: Open in CodeFlow

@@ -1,21 +1,24 @@
import { getGlobalClassNames, HighContrastSelector } from '@uifabric/styling';
import { Depths } from '@uifabric/fluent-theme';
Copy link
Member

Choose a reason for hiding this comment

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

Can fluent-theme now be removed from react-cards package.json?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think so! Thanks for the catch.

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, now that I tried to do it, we can't because it is used for the demo customizations.

Copy link
Member

Choose a reason for hiding this comment

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

That raises another question.. will Cards have "Fluent by Default"? If so, it shouldn't need fluent-theme, even for demos.

Copy link
Member Author

Choose a reason for hiding this comment

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

That's true, let me remove that as well and update the description in this PR. Cards should be "Fluent by Default".

@msft-github-bot
Copy link
Contributor

msft-github-bot commented Jun 14, 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
ScenarioDefaultButton 44.636 42.751 0.446 0.428 false false

@size-auditor
Copy link

size-auditor bot commented Jun 14, 2019

Size Auditor did not detect a change in bundle size for any component!

@khmakoto khmakoto requested a review from ecraig12345 as a code owner June 14, 2019 22:33
@micahgodbolt micahgodbolt mentioned this pull request Jun 17, 2019
12 tasks
@msft-github-bot
Copy link
Contributor

Hello @khmakoto!

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.

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 msft-github-bot merged commit 4e81beb into microsoft:master Jun 18, 2019
@khmakoto khmakoto deleted the cardElevation branch June 18, 2019 17:58
Markionium added a commit to Markionium/office-ui-fabric-react that referenced this pull request Jun 19, 2019
* master: (46 commits)
  Enable conditional rendering of page sections depending on query present in the url to enable iframe rendering of examples on docs.microsoft OUFR portal (microsoft#9438)
  Applying package updates.
  Make more examples exportable to codepen (microsoft#9468)
  Fix create-package script (microsoft#9491)
  Card: Making elevation themable by using the effects from theme instead of directly referencing Depths (microsoft#9472)
  Revert "Tooltip: improve perf by preventing all render until after de… (microsoft#9495)
  a11y-tests: Run a11y tests on all component examples (microsoft#9479)
  Website (mobile): Add source code links, remove generic library link (microsoft#9487)
  Facepile - Adding OnRenderPersona and OnRenderPersonaCoin as optional… (microsoft#9480)
  Applying package updates.
  Accessibility improvement for DetailsList while placeholder data is being displayed (microsoft#9484)
  Button: Getting anchor native props if href prop is specified (microsoft#9456)
  Fabric website: add documentation entry points. (microsoft#9477)
  Website: Add overview and control request sections to mobile pages. (microsoft#9483)
  Fixing some styling bugs in theme designer: theme slots pivot was not centered & Main part of the page with the 3 stacks had a margin when it was unnecessary. Also cleaned up the code by creating a separate component for ThemeSlots that does the pivoting. (microsoft#9458)
  Only run KeytipManager update when relevant keytip props have changed (microsoft#9414)
  Theme colors page (microsoft#9369)
  Prevent Callout from being dismissed after mouse pressed inside but released outside (microsoft#9415)
  Add data viz separator for HorizontalBarChart (microsoft#9482)
  Applying package updates.
  ...
@msft-github-bot
Copy link
Contributor

🎉@uifabric/[email protected] 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.

Cards should be using themable elevation rather than depth constants
6 participants