-
Notifications
You must be signed in to change notification settings - Fork 536
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow customization of AvatarStack hover behavior and size (#3466)
* adds a prop to prevent avatars from spreading on hover * enables AvatarStack to render any size avatar * updates tests and stories * Update generated/components.json * Create eighty-islands-join.md * replace custom function to find smallest number with Math.min * makes Avatar and AvatarStack 'size' prop responsive * updates stories and tests, fixes bugs * updates changeset * updates changeset again * changeset update AGAIN * fixes linter errors * updates snapshots after updating dependencies * test(vrt): update snapshots * typescript improvements * convert clasnames to clsx --------- Co-authored-by: mperrotti <mperrotti@users.noreply.github.com>
- Loading branch information
Showing
72 changed files
with
6,005 additions
and
89 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"@primer/react": minor | ||
--- | ||
|
||
Allows consumers to disable the behavior where the AvatarStack expands to show each Avatar on hover. There are also changes that allow users to customize the size of the avatars - even responsively! | ||
|
||
<!-- Changed components: Avatar, AvatarStack --> |
Binary file added
BIN
+23.5 KB
...nents/Avatar.test.ts-snapshots/Avatar-Size-Responsive-dark-colorblind-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+22.9 KB
...omponents/Avatar.test.ts-snapshots/Avatar-Size-Responsive-dark-dimmed-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+25.6 KB
...ts/Avatar.test.ts-snapshots/Avatar-Size-Responsive-dark-high-contrast-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+23.5 KB
...shots/components/Avatar.test.ts-snapshots/Avatar-Size-Responsive-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+23.5 KB
...nents/Avatar.test.ts-snapshots/Avatar-Size-Responsive-dark-tritanopia-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+25.2 KB
...ents/Avatar.test.ts-snapshots/Avatar-Size-Responsive-light-colorblind-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+25.4 KB
...s/Avatar.test.ts-snapshots/Avatar-Size-Responsive-light-high-contrast-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+25.2 KB
...hots/components/Avatar.test.ts-snapshots/Avatar-Size-Responsive-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+25.2 KB
...ents/Avatar.test.ts-snapshots/Avatar-Size-Responsive-light-tritanopia-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+8.61 KB
...pshots/AvatarStack-Custom-Size-On-Children-Responsive-dark-colorblind-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+8.64 KB
...-snapshots/AvatarStack-Custom-Size-On-Children-Responsive-dark-dimmed-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+8.62 KB
...ots/AvatarStack-Custom-Size-On-Children-Responsive-dark-high-contrast-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+8.6 KB
...test.ts-snapshots/AvatarStack-Custom-Size-On-Children-Responsive-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+8.61 KB
...pshots/AvatarStack-Custom-Size-On-Children-Responsive-dark-tritanopia-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+8.37 KB
...shots/AvatarStack-Custom-Size-On-Children-Responsive-light-colorblind-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+8.38 KB
...ts/AvatarStack-Custom-Size-On-Children-Responsive-light-high-contrast-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+8.38 KB
...est.ts-snapshots/AvatarStack-Custom-Size-On-Children-Responsive-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+8.38 KB
...shots/AvatarStack-Custom-Size-On-Children-Responsive-light-tritanopia-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.95 KB
...test.ts-snapshots/AvatarStack-Custom-Size-On-Children-dark-colorblind-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.92 KB
...ack.test.ts-snapshots/AvatarStack-Custom-Size-On-Children-dark-dimmed-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.95 KB
...t.ts-snapshots/AvatarStack-Custom-Size-On-Children-dark-high-contrast-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.97 KB
...vatarStack.test.ts-snapshots/AvatarStack-Custom-Size-On-Children-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.97 KB
...test.ts-snapshots/AvatarStack-Custom-Size-On-Children-dark-tritanopia-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.81 KB
...est.ts-snapshots/AvatarStack-Custom-Size-On-Children-light-colorblind-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.81 KB
....ts-snapshots/AvatarStack-Custom-Size-On-Children-light-high-contrast-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.81 KB
...atarStack.test.ts-snapshots/AvatarStack-Custom-Size-On-Children-light-linux.png
Oops, something went wrong.
Binary file added
BIN
+6.81 KB
...est.ts-snapshots/AvatarStack-Custom-Size-On-Children-light-tritanopia-linux.png
Oops, something went wrong.
Binary file added
BIN
+11.5 KB
...napshots/AvatarStack-Custom-Size-On-Parent-Responsive-dark-colorblind-linux.png
Oops, something went wrong.
Binary file added
BIN
+11.6 KB
...ts-snapshots/AvatarStack-Custom-Size-On-Parent-Responsive-dark-dimmed-linux.png
Oops, something went wrong.
Binary file added
BIN
+11.5 KB
...shots/AvatarStack-Custom-Size-On-Parent-Responsive-dark-high-contrast-linux.png
Oops, something went wrong.
Binary file added
BIN
+11.6 KB
...k.test.ts-snapshots/AvatarStack-Custom-Size-On-Parent-Responsive-dark-linux.png
Oops, something went wrong.
Binary file added
BIN
+11.6 KB
...napshots/AvatarStack-Custom-Size-On-Parent-Responsive-dark-tritanopia-linux.png
Oops, something went wrong.
Binary file added
BIN
+11.2 KB
...apshots/AvatarStack-Custom-Size-On-Parent-Responsive-light-colorblind-linux.png
Oops, something went wrong.
Binary file added
BIN
+11.2 KB
...hots/AvatarStack-Custom-Size-On-Parent-Responsive-light-high-contrast-linux.png
Oops, something went wrong.
Binary file added
BIN
+11.2 KB
....test.ts-snapshots/AvatarStack-Custom-Size-On-Parent-Responsive-light-linux.png
Oops, something went wrong.
Binary file added
BIN
+11.2 KB
...apshots/AvatarStack-Custom-Size-On-Parent-Responsive-light-tritanopia-linux.png
Oops, something went wrong.
Binary file added
BIN
+8.6 KB
...k.test.ts-snapshots/AvatarStack-Custom-Size-On-Parent-dark-colorblind-linux.png
Oops, something went wrong.
Binary file added
BIN
+8.63 KB
...Stack.test.ts-snapshots/AvatarStack-Custom-Size-On-Parent-dark-dimmed-linux.png
Oops, something went wrong.
Binary file added
BIN
+8.61 KB
...est.ts-snapshots/AvatarStack-Custom-Size-On-Parent-dark-high-contrast-linux.png
Oops, something went wrong.
Binary file added
BIN
+8.61 KB
.../AvatarStack.test.ts-snapshots/AvatarStack-Custom-Size-On-Parent-dark-linux.png
Oops, something went wrong.
Binary file added
BIN
+8.6 KB
...k.test.ts-snapshots/AvatarStack-Custom-Size-On-Parent-dark-tritanopia-linux.png
Oops, something went wrong.
Binary file added
BIN
+8.38 KB
....test.ts-snapshots/AvatarStack-Custom-Size-On-Parent-light-colorblind-linux.png
Oops, something went wrong.
Binary file added
BIN
+8.38 KB
...st.ts-snapshots/AvatarStack-Custom-Size-On-Parent-light-high-contrast-linux.png
Oops, something went wrong.
Binary file added
BIN
+8.38 KB
...AvatarStack.test.ts-snapshots/AvatarStack-Custom-Size-On-Parent-light-linux.png
Oops, something went wrong.
Binary file added
BIN
+8.38 KB
....test.ts-snapshots/AvatarStack-Custom-Size-On-Parent-light-tritanopia-linux.png
Oops, something went wrong.
Binary file added
BIN
+6.95 KB
...test.ts-snapshots/AvatarStack-Disable-Expand-On-Hover-dark-colorblind-linux.png
Oops, something went wrong.
Binary file added
BIN
+6.94 KB
...ack.test.ts-snapshots/AvatarStack-Disable-Expand-On-Hover-dark-dimmed-linux.png
Oops, something went wrong.
Binary file added
BIN
+6.95 KB
...t.ts-snapshots/AvatarStack-Disable-Expand-On-Hover-dark-high-contrast-linux.png
Oops, something went wrong.
Binary file added
BIN
+6.95 KB
...vatarStack.test.ts-snapshots/AvatarStack-Disable-Expand-On-Hover-dark-linux.png
Oops, something went wrong.
Binary file added
BIN
+6.95 KB
...test.ts-snapshots/AvatarStack-Disable-Expand-On-Hover-dark-tritanopia-linux.png
Oops, something went wrong.
Binary file added
BIN
+6.81 KB
...est.ts-snapshots/AvatarStack-Disable-Expand-On-Hover-light-colorblind-linux.png
Oops, something went wrong.
Binary file added
BIN
+6.81 KB
....ts-snapshots/AvatarStack-Disable-Expand-On-Hover-light-high-contrast-linux.png
Oops, something went wrong.
Binary file added
BIN
+6.81 KB
...atarStack.test.ts-snapshots/AvatarStack-Disable-Expand-On-Hover-light-linux.png
Oops, something went wrong.
Binary file added
BIN
+6.81 KB
...est.ts-snapshots/AvatarStack-Disable-Expand-On-Hover-light-tritanopia-linux.png
Oops, something went wrong.
This file contains 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
This file contains 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
Oops, something went wrong.