From 3358cef433dfe4758fb36e54431c1e674311d0c8 Mon Sep 17 00:00:00 2001 From: Tessa Thornton Date: Mon, 9 Dec 2019 18:03:30 -0500 Subject: [PATCH] [CORL-746] updated branding: buttons (#2748) * new button component * update specs * fix up markers * fix docz so it renders * clean up buttons implementation * update snaps * clean up slack buttons * update snaps --- .../client/admin/App/UserMenu/UserMenu.tsx | 3 +- .../admin/components/ModerateCard/Markers.tsx | 9 +- .../UserHistoryDrawer/ModeratorNote.tsx | 22 +- .../UserDrawerNotesContainer.tsx | 4 +- .../UserHistoryDrawerContainer.tsx | 6 +- .../components/UserRole/UserRoleChange.tsx | 4 +- .../admin/components/UserStatus/BanModal.tsx | 9 +- .../components/UserStatus/PremodModal.tsx | 9 +- .../components/UserStatus/SuspendForm.tsx | 9 +- .../components/UserStatus/SuspendModal.tsx | 7 +- .../UserStatus/UserStatusChange.tsx | 2 +- .../Community/InviteUsers/InviteUsers.tsx | 4 +- .../Community/InviteUsers/InviteUsersForm.tsx | 10 +- .../client/admin/routes/Community/UserRow.tsx | 3 +- .../routes/Community/UserTableFilter.tsx | 4 +- .../admin/routes/Configure/Configure.tsx | 3 +- .../Configure/sections/Advanced/EmbedCode.tsx | 2 +- .../Configure/sections/Auth/OIDCConfig.tsx | 2 - .../Configure/sections/Auth/RedirectField.tsx | 2 +- .../Configure/sections/Auth/SSOKeyField.tsx | 2 - .../Configure/sections/Slack/SlackChannel.tsx | 2 - .../sections/Slack/SlackConfigContainer.tsx | 7 +- .../ModerateSearchBar/ModerateAllOption.tsx | 9 +- .../admin/routes/Moderate/Queue/Queue.tsx | 6 +- .../Stories/StoryStatus/StoryStatusChange.tsx | 3 +- .../admin/routes/Stories/StoryTableFilter.tsx | 4 +- .../__snapshots__/community.spec.tsx.snap | 64 +- .../__snapshots__/advanced.spec.tsx.snap | 12 +- .../__snapshots__/auth.spec.tsx.snap | 36 +- .../__snapshots__/general.spec.tsx.snap | 6 +- .../__snapshots__/moderation.spec.tsx.snap | 6 +- .../__snapshots__/organization.spec.tsx.snap | 6 +- .../__snapshots__/wordList.spec.tsx.snap | 6 +- .../__snapshots__/regularQueue.spec.tsx.snap | 28 +- .../__snapshots__/rejectedQueue.spec.tsx.snap | 16 +- .../__snapshots__/singleComment.spec.tsx.snap | 12 +- .../__snapshots__/stories.spec.tsx.snap | 28 +- .../framework/components/CopyButton.tsx | 5 +- .../client/ui/components/v2/AppBar/AppBar.mdx | 2 - .../client/ui/components/v2/Button/Button.css | 698 +++++++++--------- .../ui/components/v2/Button/Button.spec.tsx | 2 +- .../client/ui/components/v2/Button/Button.tsx | 56 +- .../ui/components/v2/Button/ButtonIcon.css | 6 - .../Button/__snapshots__/Button.spec.tsx.snap | 16 +- .../client/ui/components/v2/Modal/Modal.mdx | 5 +- .../ui/components/v2/Popover/Popover.mdx | 9 +- src/core/client/ui/theme/variables2.ts | 2 +- 47 files changed, 545 insertions(+), 623 deletions(-) diff --git a/src/core/client/admin/App/UserMenu/UserMenu.tsx b/src/core/client/admin/App/UserMenu/UserMenu.tsx index 3499b0b85..fd71feeee 100644 --- a/src/core/client/admin/App/UserMenu/UserMenu.tsx +++ b/src/core/client/admin/App/UserMenu/UserMenu.tsx @@ -60,9 +60,8 @@ const UserMenu: FunctionComponent = props => ( className={styles.button} onClick={toggleVisibility} ref={ref} - variant="plain" + variant="text" uppercase={false} - size="small" > account_circle diff --git a/src/core/client/admin/components/ModerateCard/Markers.tsx b/src/core/client/admin/components/ModerateCard/Markers.tsx index ba97b9668..6c5ea4502 100644 --- a/src/core/client/admin/components/ModerateCard/Markers.tsx +++ b/src/core/client/admin/components/ModerateCard/Markers.tsx @@ -28,16 +28,11 @@ const Markers: FunctionComponent = ({ children, details }) => { {children} {details && ( - + )} diff --git a/src/core/client/admin/components/UserHistoryDrawer/UserDrawerNotesContainer.tsx b/src/core/client/admin/components/UserHistoryDrawer/UserDrawerNotesContainer.tsx index 46537c9cf..190c12fcc 100644 --- a/src/core/client/admin/components/UserHistoryDrawer/UserDrawerNotesContainer.tsx +++ b/src/core/client/admin/components/UserHistoryDrawer/UserDrawerNotesContainer.tsx @@ -78,9 +78,7 @@ const UserDrawerNotesContainer: FunctionComponent = ({ - + diff --git a/src/core/client/admin/components/UserHistoryDrawer/UserHistoryDrawerContainer.tsx b/src/core/client/admin/components/UserHistoryDrawer/UserHistoryDrawerContainer.tsx index c6ba1dcf2..3822ca586 100644 --- a/src/core/client/admin/components/UserHistoryDrawer/UserHistoryDrawerContainer.tsx +++ b/src/core/client/admin/components/UserHistoryDrawer/UserHistoryDrawerContainer.tsx @@ -43,7 +43,7 @@ const UserHistoryDrawerContainer: FunctionComponent = ({ return ( <> - @@ -84,7 +84,7 @@ const UserHistoryDrawerContainer: FunctionComponent = ({ {user.email} - + = ({ {user.id} - + diff --git a/src/core/client/admin/components/UserRole/UserRoleChange.tsx b/src/core/client/admin/components/UserRole/UserRoleChange.tsx index ac982c772..a9851a404 100644 --- a/src/core/client/admin/components/UserRole/UserRoleChange.tsx +++ b/src/core/client/admin/components/UserRole/UserRoleChange.tsx @@ -61,10 +61,10 @@ const UserRoleChange: FunctionComponent = props => ( className={styles.button} onClick={toggleVisibility} uppercase={false} + size="large" color="mono" ref={ref} - variant="plain" - size="small" + variant="text" > {props.role} { diff --git a/src/core/client/admin/components/UserStatus/BanModal.tsx b/src/core/client/admin/components/UserStatus/BanModal.tsx index faf2410c9..1cc8c5575 100644 --- a/src/core/client/admin/components/UserStatus/BanModal.tsx +++ b/src/core/client/admin/components/UserStatus/BanModal.tsx @@ -117,17 +117,12 @@ const BanModal: FunctionComponent = ({ - - diff --git a/src/core/client/admin/components/UserStatus/PremodModal.tsx b/src/core/client/admin/components/UserStatus/PremodModal.tsx index 7bb16c1b8..d860f1e8f 100644 --- a/src/core/client/admin/components/UserStatus/PremodModal.tsx +++ b/src/core/client/admin/components/UserStatus/PremodModal.tsx @@ -52,18 +52,13 @@ const PremodModal: FunctionComponent = ({ - - diff --git a/src/core/client/admin/components/UserStatus/SuspendForm.tsx b/src/core/client/admin/components/UserStatus/SuspendForm.tsx index 38f8ae6a8..f883f3b62 100644 --- a/src/core/client/admin/components/UserStatus/SuspendForm.tsx +++ b/src/core/client/admin/components/UserStatus/SuspendForm.tsx @@ -196,17 +196,12 @@ const SuspendForm: FunctionComponent = ({ - - diff --git a/src/core/client/admin/components/UserStatus/SuspendModal.tsx b/src/core/client/admin/components/UserStatus/SuspendModal.tsx index 7b1690e7d..00a885728 100644 --- a/src/core/client/admin/components/UserStatus/SuspendModal.tsx +++ b/src/core/client/admin/components/UserStatus/SuspendModal.tsx @@ -71,12 +71,7 @@ const SuspendModal: FunctionComponent = ({ - diff --git a/src/core/client/admin/components/UserStatus/UserStatusChange.tsx b/src/core/client/admin/components/UserStatus/UserStatusChange.tsx index a0d603532..606cdc5a7 100644 --- a/src/core/client/admin/components/UserStatus/UserStatusChange.tsx +++ b/src/core/client/admin/components/UserStatus/UserStatusChange.tsx @@ -144,7 +144,7 @@ const UserStatusChange: FunctionComponent = ({ ref={ref} color="mono" uppercase={false} - variant="plain" + variant="text" > {children} { diff --git a/src/core/client/admin/routes/Community/InviteUsers/InviteUsers.tsx b/src/core/client/admin/routes/Community/InviteUsers/InviteUsers.tsx index a7f79e783..f54b808a6 100644 --- a/src/core/client/admin/routes/Community/InviteUsers/InviteUsers.tsx +++ b/src/core/client/admin/routes/Community/InviteUsers/InviteUsers.tsx @@ -17,9 +17,9 @@ const InviteUsers: FunctionComponent = () => {
diff --git a/src/core/client/admin/routes/Community/UserRow.tsx b/src/core/client/admin/routes/Community/UserRow.tsx index 9d0333679..e5160dbf7 100644 --- a/src/core/client/admin/routes/Community/UserRow.tsx +++ b/src/core/client/admin/routes/Community/UserRow.tsx @@ -58,7 +58,8 @@ const UserRow: FunctionComponent = ({ )} {!deletedAt && ( diff --git a/src/core/client/admin/routes/Stories/StoryStatus/StoryStatusChange.tsx b/src/core/client/admin/routes/Stories/StoryStatus/StoryStatusChange.tsx index eae78de7d..535ddf2e6 100644 --- a/src/core/client/admin/routes/Stories/StoryStatus/StoryStatusChange.tsx +++ b/src/core/client/admin/routes/Stories/StoryStatus/StoryStatusChange.tsx @@ -64,8 +64,7 @@ const StoryStatusChange: FunctionComponent = props => ( ref={ref} color="mono" uppercase={false} - variant="plain" - size="small" + variant="text" > {props.status} { diff --git a/src/core/client/admin/routes/Stories/StoryTableFilter.tsx b/src/core/client/admin/routes/Stories/StoryTableFilter.tsx index 1ebd6753c..f6e9f1470 100644 --- a/src/core/client/admin/routes/Stories/StoryTableFilter.tsx +++ b/src/core/client/admin/routes/Stories/StoryTableFilter.tsx @@ -63,9 +63,9 @@ const StoryTableFilter: FunctionComponent = props => ( >
@@ -72,9 +71,9 @@ import Icon from "../Icon"; id="my-popover-1" body={({ toggleVisibility }) => ( - +

I am a Tooltip - +

)} dark diff --git a/src/core/client/ui/theme/variables2.ts b/src/core/client/ui/theme/variables2.ts index 708a53c98..e6a1dc026 100644 --- a/src/core/client/ui/theme/variables2.ts +++ b/src/core/client/ui/theme/variables2.ts @@ -314,7 +314,7 @@ const variables2 = { 8: "60px", 9: "84px", }, - roundCorners: "2px", + roundCorners: "3px", }; export default variables2;