-
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
Card: Making elevation themable by using the effects from theme instead of directly referencing Depths #9472
Conversation
…ad of directly referencing Depths.
@@ -1,21 +1,24 @@ | |||
import { getGlobalClassNames, HighContrastSelector } from '@uifabric/styling'; | |||
import { Depths } from '@uifabric/fluent-theme'; |
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 fluent-theme
now be removed from react-cards package.json
?
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.
I think so! Thanks for the catch.
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.
Actually, now that I tried to do it, we can't because it is used for the demo customizations.
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 raises another question.. will Cards have "Fluent by Default"? If so, it shouldn't need fluent-theme
, even for demos.
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 true, let me remove that as well and update the description in this PR. Cards
should be "Fluent by Default".
Component perf results:
|
Size Auditor did not detect a change in bundle size for any component! |
Hello @khmakoto! Because this pull request has the 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 (
|
* 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. ...
🎉 Handy links: |
Pull request checklist
$ npm run change
Description of changes
Card's
elevation/box-shadow wasn't themable because it was directly referencingDepths
. This PR changes that so thatCard
uses theeffect
provided via thetheme
instead.This PR also removes
@uifabric/fluent-theme
frompackage.json
andcustomizations.ts
as we're not using it anymore forDepths
and, given thatCard
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 ofCard's
snapshot and visual regression tests.Microsoft Reviewers: Open in CodeFlow