From 471e5beaaeb93291860102062ec1ff1223e2f2bd Mon Sep 17 00:00:00 2001 From: julia foresti Date: Tue, 24 May 2022 16:57:51 -0300 Subject: [PATCH 01/22] Update Buttons with new colors. Ghost variant deprecated - replaced with Secondary. Replace ActionButton with IconButton. --- .yarnrc.yml | 2 ++ apps/meteor/client/components/GenericModal.tsx | 2 +- apps/meteor/client/components/Header/State.tsx | 5 ++--- .../client/components/Header/ToolBoxAction.tsx | 5 ++--- .../components/Message/MessageActions/Action.tsx | 2 +- .../Omnichannel/modals/TranscriptModal.tsx | 2 +- apps/meteor/client/components/Sidebar/Header.js | 4 ++-- apps/meteor/client/components/TextCopy.tsx | 2 +- apps/meteor/client/components/UserStatusMenu.tsx | 12 +++++++++++- .../components/VerticalBar/VerticalBarButton.tsx | 4 +++- .../avatar/UserAvatarEditor/UserAvatarEditor.js | 10 +++------- .../client/components/voip/modal/WrapUpCallModal.tsx | 2 +- apps/meteor/client/sidebar/Item/Condensed.js | 4 ++-- apps/meteor/client/sidebar/Item/Extended.js | 4 ++-- apps/meteor/client/sidebar/Item/Medium.js | 4 ++-- .../meteor/client/sidebar/footer/voip/VoipFooter.tsx | 6 +++--- .../meteor/client/sidebar/header/EditStatusModal.tsx | 4 ++-- .../client/views/account/AccountIntegrationsPage.tsx | 4 ++-- .../client/views/account/AccountProfilePage.js | 4 ++-- .../client/views/account/security/TwoFactorEmail.js | 2 +- .../client/views/account/security/TwoFactorTOTP.js | 2 +- .../views/admin/apps/AppPermissionsReviewModal.js | 2 +- .../client/views/admin/apps/AppUpdateModal.tsx | 4 ++-- apps/meteor/client/views/admin/apps/WarningModal.js | 4 ++-- .../views/admin/cloud/WorkspaceLoginSection.js | 4 ++-- .../views/admin/customEmoji/EditCustomEmoji.tsx | 8 +++----- .../admin/customEmoji/EditCustomEmojiWithData.tsx | 2 +- .../views/admin/customSounds/EditCustomSound.tsx | 2 +- .../client/views/admin/customSounds/EditSound.tsx | 8 +++----- .../admin/customUserStatus/CustomUserStatusForm.tsx | 2 +- .../CustomUserStatusFormWithData.tsx | 2 +- .../client/views/admin/emailInbox/EmailInboxForm.js | 2 +- .../client/views/admin/emailInbox/SendTestButton.tsx | 6 ++---- .../client/views/admin/import/NewImportPage.js | 2 +- .../client/views/admin/import/PrepareImportPage.js | 2 +- .../admin/integrations/edit/EditIncomingWebhook.js | 2 +- .../admin/integrations/edit/EditOutgoingWebhook.js | 2 +- .../views/admin/integrations/edit/HistoryItem.js | 2 +- .../integrations/edit/OutgoingWebhookHistoryPage.js | 2 +- apps/meteor/client/views/admin/invites/InviteRow.tsx | 6 ++---- .../client/views/admin/oauthApps/EditOauthApp.tsx | 2 +- .../views/admin/oauthApps/EditOauthAppWithData.tsx | 2 +- .../client/views/admin/permissions/EditRolePage.tsx | 6 +++--- .../UsersInRoleTable/UsersInRoleTableRow.tsx | 2 +- apps/meteor/client/views/admin/rooms/EditRoom.tsx | 2 +- .../meteor/client/views/admin/settings/GroupPage.tsx | 2 +- .../views/admin/settings/ResetSettingButton.tsx | 8 ++------ apps/meteor/client/views/admin/settings/Section.js | 2 +- .../views/admin/settings/groups/OAuthGroupPage.tsx | 2 +- .../admin/settings/groups/voip/AssignAgentButton.tsx | 6 ++---- .../admin/settings/groups/voip/RemoveAgentButton.tsx | 6 ++---- apps/meteor/client/views/meet/CallPage.tsx | 2 +- .../views/omnichannel/agents/RemoveAgentButton.js | 6 ++---- .../businessHours/EditBusinessHoursPage.js | 2 +- .../omnichannel/currentChats/RemoveChatButton.tsx | 8 +++----- .../customFields/RemoveCustomFieldButton.js | 6 ++---- .../omnichannel/departments/RemoveAgentButton.js | 8 ++------ .../departments/RemoveDepartmentButton.js | 6 ++---- .../views/omnichannel/facebook/FacebookPage.tsx | 2 +- .../omnichannel/managers/RemoveManagerButton.tsx | 6 ++---- .../client/views/omnichannel/triggers/TriggersRow.js | 6 ++---- .../contextualBar/Info/EditRoomInfo/EditChannel.js | 2 +- .../NotificationPreferences.js | 6 ++---- .../contextualBar/OTR/components/OTREstablished.tsx | 2 +- .../contextualBar/PruneMessages/PruneMessages.js | 2 +- .../RoomMembers/List/components/MemberItem.js | 4 ++-- .../room/contextualBar/Threads/components/Message.js | 10 ++++------ .../UserInfo/UserWebRTC/UserWebRTCButtons.tsx | 2 +- .../contextualBar/VideoConference/BBB/CallBBB.tsx | 2 +- .../client/views/room/hooks/useUserInfoActions.js | 4 ++-- .../room/modals/FileUploadModal/FileUploadModal.tsx | 2 +- .../views/room/webdav/AddWebdavAccountModal.tsx | 4 ++-- .../channels/ConfirmationModal/ConfirmationModal.tsx | 2 +- .../teams/contextualBar/channels/TeamsChannelItem.js | 4 ++-- .../client/omnichannel/RemoveBusinessHourButton.js | 6 ++---- .../cannedResponses/RemoveCannedResponseButton.tsx | 8 +++----- .../ee/client/omnichannel/monitors/MonitorsRow.js | 6 ++---- .../omnichannel/priorities/RemovePriorityButton.js | 6 ++---- .../ee/client/omnichannel/tags/RemoveTagButton.js | 6 ++---- .../ee/client/omnichannel/units/RemoveUnitButton.js | 6 ++---- .../engagementDashboard/users/ContentForDays.tsx | 10 +++------- packages/livechat/src/components/Modal/component.js | 2 +- .../src/routes/SwitchDepartment/component.js | 2 +- yarn.lock | 2 +- 84 files changed, 149 insertions(+), 193 deletions(-) diff --git a/.yarnrc.yml b/.yarnrc.yml index d4854ebe9212..9fcd9d1afd98 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -11,3 +11,5 @@ plugins: spec: "@yarnpkg/plugin-typescript" yarnPath: .yarn/releases/yarn-3.2.0.cjs + +checksumBehavior: update \ No newline at end of file diff --git a/apps/meteor/client/components/GenericModal.tsx b/apps/meteor/client/components/GenericModal.tsx index afd8467aee08..d44aa8d35f28 100644 --- a/apps/meteor/client/components/GenericModal.tsx +++ b/apps/meteor/client/components/GenericModal.tsx @@ -82,7 +82,7 @@ const GenericModal: FC = ({ {dontAskAgain} {onCancel && ( - )} diff --git a/apps/meteor/client/components/Header/State.tsx b/apps/meteor/client/components/Header/State.tsx index 65b51e33466f..63ac1ceb1f3a 100644 --- a/apps/meteor/client/components/Header/State.tsx +++ b/apps/meteor/client/components/Header/State.tsx @@ -1,7 +1,6 @@ -import { Icon, ActionButton } from '@rocket.chat/fuselage'; +import { Icon, IconButton } from '@rocket.chat/fuselage'; import React, { FC } from 'react'; -const State: FC = (props) => - props.onClick ? : ; +const State: FC = (props) => (props.onClick ? : ); export default State; diff --git a/apps/meteor/client/components/Header/ToolBoxAction.tsx b/apps/meteor/client/components/Header/ToolBoxAction.tsx index d1aebb2f31f3..1154c878257d 100644 --- a/apps/meteor/client/components/Header/ToolBoxAction.tsx +++ b/apps/meteor/client/components/Header/ToolBoxAction.tsx @@ -1,8 +1,8 @@ -import { ActionButton } from '@rocket.chat/fuselage'; +import { IconButton } from '@rocket.chat/fuselage'; import React, { FC } from 'react'; const ToolBoxAction: FC = ({ id, icon, color, title, action, className, index, ...props }) => ( - = ({ id, icon, color, title, action, className, ind key={id} icon={icon} position='relative' - ghost tiny overflow='visible' color={!!color && color} diff --git a/apps/meteor/client/components/Message/MessageActions/Action.tsx b/apps/meteor/client/components/Message/MessageActions/Action.tsx index 942ab68c0b5e..3a205adde4bd 100644 --- a/apps/meteor/client/components/Message/MessageActions/Action.tsx +++ b/apps/meteor/client/components/Message/MessageActions/Action.tsx @@ -27,7 +27,7 @@ const Action: FC = ({ icon, methodId, i18nLabel, label, runAction const resolvedIcon = resolveLegacyIcon(icon); return ( - diff --git a/apps/meteor/client/components/Omnichannel/modals/TranscriptModal.tsx b/apps/meteor/client/components/Omnichannel/modals/TranscriptModal.tsx index c25e8cc23aaa..2b773f417055 100644 --- a/apps/meteor/client/components/Omnichannel/modals/TranscriptModal.tsx +++ b/apps/meteor/client/components/Omnichannel/modals/TranscriptModal.tsx @@ -110,7 +110,7 @@ const TranscriptModal: FC = ({ {roomOpen && transcriptRequest ? ( - ) : ( diff --git a/apps/meteor/client/components/Sidebar/Header.js b/apps/meteor/client/components/Sidebar/Header.js index 1c90fbd05c8e..23fc786c8d0c 100644 --- a/apps/meteor/client/components/Sidebar/Header.js +++ b/apps/meteor/client/components/Sidebar/Header.js @@ -1,4 +1,4 @@ -import { Box, ActionButton } from '@rocket.chat/fuselage'; +import { Box, IconButton } from '@rocket.chat/fuselage'; import React from 'react'; const Header = ({ title, onClose, children = undefined, ...props }) => ( @@ -10,7 +10,7 @@ const Header = ({ title, onClose, children = undefined, ...props }) => ( {title} )} - {onClose && } + {onClose && } )} {children} diff --git a/apps/meteor/client/components/TextCopy.tsx b/apps/meteor/client/components/TextCopy.tsx index 89d4300687f1..dc92e722a0a6 100644 --- a/apps/meteor/client/components/TextCopy.tsx +++ b/apps/meteor/client/components/TextCopy.tsx @@ -39,7 +39,7 @@ const TextCopy = ({ text, wrapper = defaultWrapperRenderer, ...props }: TextCopy {...props} > {wrapper(text)} - diff --git a/apps/meteor/client/components/UserStatusMenu.tsx b/apps/meteor/client/components/UserStatusMenu.tsx index c435f26cc8e1..e29627622a50 100644 --- a/apps/meteor/client/components/UserStatusMenu.tsx +++ b/apps/meteor/client/components/UserStatusMenu.tsx @@ -77,7 +77,17 @@ const UserStatusMenu = ({ return ( <> - diff --git a/apps/meteor/client/components/VerticalBar/VerticalBarButton.tsx b/apps/meteor/client/components/VerticalBar/VerticalBarButton.tsx index 12d9283e820b..299cfa0c77ee 100644 --- a/apps/meteor/client/components/VerticalBar/VerticalBarButton.tsx +++ b/apps/meteor/client/components/VerticalBar/VerticalBarButton.tsx @@ -1,6 +1,8 @@ import { Button } from '@rocket.chat/fuselage'; import React, { ComponentProps, memo, ReactElement } from 'react'; -const VerticalBarButton = (props: ComponentProps): ReactElement => - - + + {suggestions && ( { - )} {callerState === 'OFFER_RECEIVED' && ( - )} diff --git a/apps/meteor/client/sidebar/header/EditStatusModal.tsx b/apps/meteor/client/sidebar/header/EditStatusModal.tsx index 16ec76b24bd5..93b04600fb83 100644 --- a/apps/meteor/client/sidebar/header/EditStatusModal.tsx +++ b/apps/meteor/client/sidebar/header/EditStatusModal.tsx @@ -40,7 +40,7 @@ const EditStatusModal = ({ onClose, userStatus, userStatusText }: EditStatusModa await setUserStatus(statusType, statusText); dispatchToastMessage({ type: 'success', message: t('StatusMessage_Changed_Successfully') }); } catch (error) { - dispatchToastMessage({ type: 'error', message: error }); + dispatchToastMessage({ type: 'error', message: String(error) }); } onClose(); @@ -75,7 +75,7 @@ const EditStatusModal = ({ onClose, userStatus, userStatusText }: EditStatusModa -