fix: Make border around Avatar's badge transparent using a mask#27527
Merged
behowell merged 18 commits intomicrosoft:masterfrom Apr 24, 2023
Merged
fix: Make border around Avatar's badge transparent using a mask#27527behowell merged 18 commits intomicrosoft:masterfrom
behowell merged 18 commits intomicrosoft:masterfrom
Conversation
Collaborator
📊 Bundle size reportUnchanged fixtures
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 999a7998e3913ab823fe24069f0b5d1aab2b2ce0 (build) |
Collaborator
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 714 | 720 | 5000 | |
| Button | mount | 373 | 376 | 5000 | |
| Field | mount | 1292 | 1273 | 5000 | |
| FluentProvider | mount | 917 | 915 | 5000 | |
| FluentProviderWithTheme | mount | 117 | 114 | 10 | |
| FluentProviderWithTheme | virtual-rerender | 101 | 101 | 10 | |
| FluentProviderWithTheme | virtual-rerender-with-unmount | 112 | 108 | 10 | |
| InfoButton | mount | 20 | 22 | 5000 | |
| MakeStyles | mount | 1121 | 1128 | 50000 | |
| Persona | mount | 2043 | 1962 | 5000 | |
| SpinButton | mount | 1616 | 1604 | 5000 |
fabricteam
reviewed
Apr 12, 2023
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit d501da0:
|
f784832 to
3ccfcf9
Compare
…vatar/badge-mask
…atar/badge-mask
…splayed while the image is loading.
sopranopillow
approved these changes
Apr 19, 2023
Contributor
sopranopillow
left a comment
There was a problem hiding this comment.
Other than the minor comment, lgtm
marcosmoura
added a commit
to marcosmoura/fluentui
that referenced
this pull request
Apr 25, 2023
* master: applying package updates microsoft#25730: TimePicker Default Value Fix, Controllable Usage, Example Updates (microsoft#26482) docs(react-datepicker-compat): Add description to README.md (microsoft#27677) Updated to use single hook selector (microsoft#27491) fix: Make border around Avatar's badge transparent using a mask (microsoft#27527) Disable focus on non-interactive elements (microsoft#27580) feat(react-drawer): implement "prevent close on click outside" feature (microsoft#27551)
marcosmoura
added a commit
to marcosmoura/fluentui
that referenced
this pull request
Apr 25, 2023
* master: applying package updates microsoft#25730: TimePicker Default Value Fix, Controllable Usage, Example Updates (microsoft#26482) docs(react-datepicker-compat): Add description to README.md (microsoft#27677) Updated to use single hook selector (microsoft#27491) fix: Make border around Avatar's badge transparent using a mask (microsoft#27527) Disable focus on non-interactive elements (microsoft#27580) feat(react-drawer): implement "prevent close on click outside" feature (microsoft#27551)
marcosmoura
added a commit
to marcosmoura/fluentui
that referenced
this pull request
Apr 25, 2023
* feat/drawer-components: (81 commits) docs: remove TODO marks fix: remove conflict code leftover applying package updates microsoft#25730: TimePicker Default Value Fix, Controllable Usage, Example Updates (microsoft#26482) docs(react-datepicker-compat): Add description to README.md (microsoft#27677) Updated to use single hook selector (microsoft#27491) fix: Make border around Avatar's badge transparent using a mask (microsoft#27527) Disable focus on non-interactive elements (microsoft#27580) feat(react-drawer): implement "prevent close on click outside" feature (microsoft#27551) fix(react-datepicker-compat): Make onValidationError onValidationResult so the error is updated when there's no longer an error (microsoft#27655) Fix `@fluentui/react-portal-compat`: to be compatible with React 18 (microsoft#27577) chore: fix versions of @fluentui/react-datepicker-compat (microsoft#27666) applying package updates applying package updates Make line chart screen reader accessible (microsoft#27632) fix(react-examples): Improve keyboard navigation in ContextualMenu.CustomMenuList (microsoft#25172) docs(react-textarea): Update examples to use Field (microsoft#27644) bugfix(react-dialog): `DialogTitle` root as `h2` by default (microsoft#27555) applying package updates chore: restructure stories, add separate category for flat tree (microsoft#27586) ...
Collaborator
|
🎉 Handy links: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Previous Behavior
The gap between the Avatar and its badge is a solid color border, which matches the default background color. This results in a visible border around the badge when it is placed on another color background.
New Behavior
mask-image: radial-gradient(...)to punch out a circle for the badge.::afterelement, and leave the active ring on the::beforeelement.mask-imageproperty clips everything outside of the element'sborder-box, which prevents the shadow from rendering whenactiveDisplay="shadow"since shadows render outside of the border ox.. To fix this, need to put the ring and shadow on separate elements, and only apply the mask to the ring.radial-gradientdefinition with slightly different parameters.::beforeand::afterelements into the root resetStyles. This reduces bundle size and improves perf when theactiveprop is used. This is not strictly related to this change, but it is enabled by the newringWidthvariable, and offsets the bundle size increases from the rest of this PR.Related Issue(s)