From 6f4382189fecf3ec8f11bf698668eba0164fef61 Mon Sep 17 00:00:00 2001 From: Asaad Mahmood Date: Mon, 25 Sep 2023 15:17:14 +0500 Subject: [PATCH] Button styling update for consistent buttons (#24483) * Updating button changes * Updating button * Updating invite modal button * Updating button changes * Updating button * Updating buttons * Updating buttons * Updating buttons * Updating back btn * Updating various buttons * Updating tests * Updating test * Reverting channel icon * Update channel_profile.tsx * Update setting_picture.tsx * Updating tests * Update group_member_list.test.tsx.snap * Update user_group_popover.test.tsx.snap * Update user_group_popover.test.tsx.snap * Updating tests and adding btn class * Adding btn-xs class * Updating tests * Updating test * Updating test file * Updating test * Updating changes requested by daniel * Updating test * Updating based on harrisons feedback * Updating buttons * Updating test --------- Co-authored-by: Mattermost Build --- .../get_link_modal.test.tsx.snap | 8 +- .../__snapshots__/save_button.test.tsx.snap | 10 +- .../setting_item_max.test.jsx.snap | 18 +- .../setting_picture.test.tsx.snap | 48 +-- .../access_history_modal.test.tsx.snap | 4 +- .../access_history_modal.tsx | 2 +- .../activity_log_modal.test.tsx.snap | 4 +- .../activity_log_modal/activity_log_modal.tsx | 2 +- .../add_user_to_channel_modal.test.tsx.snap | 2 +- .../add_user_to_channel_modal.tsx | 2 +- .../add_users_to_group_modal.test.tsx.snap | 2 +- .../add_users_to_group_modal.tsx | 2 +- .../bleve_settings.test.tsx.snap | 4 +- .../cluster_settings.test.jsx.snap | 8 +- .../database_settings.test.jsx.snap | 2 +- .../elasticsearch_settings.test.jsx.snap | 4 +- .../message_export_settings.test.jsx.snap | 8 +- .../__snapshots__/push_settings.test.tsx.snap | 4 +- .../schema_admin_settings.test.jsx.snap | 2 +- .../admin_console/audits/audits.tsx | 2 +- .../brand_image_setting.tsx | 7 +- .../admin_console/cluster_table.tsx | 2 +- .../compliance_reports/compliance_reports.tsx | 2 +- .../custom_plugin_settings.test.tsx.snap | 6 +- ...om_terms_of_service_settings.test.tsx.snap | 8 +- .../admin_console/data_grid/data_grid.scss | 2 +- .../admin_console/data_grid/data_grid.tsx | 5 +- .../custom_policy_form.test.tsx.snap | 4 +- .../global_policy_form.test.tsx.snap | 2 +- .../feature_discovery/feature_discovery.scss | 2 +- .../admin_console/file_upload_setting.jsx | 9 +- .../admin_console/filter/filter.scss | 8 - .../admin_console/filter/filter.tsx | 2 +- .../full_log_event_modal.tsx | 2 +- .../admin_console/generated_setting.tsx | 2 +- ...group_teams_and_channels_row.test.tsx.snap | 12 +- .../__snapshots__/group_users.test.tsx.snap | 24 +- .../group_teams_and_channels_row.test.tsx | 2 +- .../group_teams_and_channels_row.tsx | 2 +- .../group_details/group_users.tsx | 4 +- .../__snapshots__/groups_list.test.tsx.snap | 64 ++-- .../groups_list/groups_list.tsx | 8 +- .../admin_console/jobs/table.test.tsx | 2 +- .../components/admin_console/jobs/table.tsx | 2 +- .../manage_roles_modal/manage_roles_modal.tsx | 2 +- .../edit_post_time_limit_modal.tsx | 4 +- ...ssion_system_scheme_settings.test.tsx.snap | 24 +- ...permission_system_scheme_settings.test.tsx | 2 +- .../permission_system_scheme_settings.tsx | 4 +- ...mission_team_scheme_settings.test.tsx.snap | 8 +- .../plugin_management.test.tsx.snap | 84 ++--- .../plugin_management/plugin_management.tsx | 4 +- .../request_button.test.tsx.snap | 10 +- .../request_button/request_button.tsx | 2 +- .../reset_email_modal.test.tsx.snap | 4 +- .../reset_email_modal/reset_email_modal.tsx | 2 +- .../reset_password_modal.test.tsx.snap | 2 +- .../reset_password_modal.tsx | 2 +- .../admin_console/server_logs/log_list.tsx | 4 +- .../server_logs/plain_log_list.tsx | 4 +- .../system_user_detail.test.tsx.snap | 12 +- .../__snapshots__/abstract_list.test.tsx.snap | 12 +- .../team_list/abstract_list.scss | 2 +- .../team_list/abstract_list.tsx | 4 +- .../__snapshots__/system_users.test.tsx.snap | 2 +- .../system_users/system_users.tsx | 2 +- .../__snapshots__/abstract_list.test.tsx.snap | 4 +- .../team_channel_settings/abstract_list.tsx | 4 +- .../channel_profile.test.tsx.snap | 12 +- .../channel/details/channel_profile.tsx | 10 +- .../team_channel_settings/errors.tsx | 2 +- .../save_changes_panel.tsx | 2 +- .../__snapshots__/team_profile.test.tsx.snap | 72 +---- .../team/details/team_profile.tsx | 17 +- .../apps_form_component.test.tsx.snap | 2 +- .../apps_form/apps_form_component.tsx | 2 +- .../src/components/authorize/authorize.tsx | 2 +- .../browse_channels.test.tsx.snap | 4 +- .../browse_channels/browse_channels.scss | 22 -- .../browse_channels/browse_channels.tsx | 4 +- .../components/channel_info_rhs/header.tsx | 2 +- .../channel_invite_modal.test.tsx.snap | 6 +- .../channel_invite_modal.tsx | 4 +- .../components/channel_members_rhs/header.tsx | 2 +- .../channels/src/components/confirm_modal.tsx | 2 +- .../convert_channel_modal.tsx | 2 +- .../__snapshots__/display_name.test.tsx.snap | 4 +- .../create_team/components/display_name.tsx | 4 +- .../create_user_groups_modal.test.tsx.snap | 2 +- .../create_user_groups_modal.tsx | 2 +- .../delete_channel_modal.test.tsx.snap | 2 +- .../delete_channel_modal.tsx | 2 +- .../delete_post_modal.test.tsx.snap | 6 +- .../delete_post_modal/delete_post_modal.tsx | 2 +- .../edit_channel_header_modal.test.tsx.snap | 10 +- .../edit_channel_header_modal.tsx | 2 +- .../edit_channel_purpose_modal.test.tsx.snap | 28 +- .../edit_channel_purpose_modal.test.tsx | 2 +- .../edit_channel_purpose_modal.tsx | 4 +- .../__snapshots__/add_emoji.test.tsx.snap | 6 +- .../components/emoji/add_emoji/add_emoji.tsx | 2 +- .../emoji/emoji_list/emoji_list.tsx | 4 +- .../emoji_picker_custom_emoji_button.tsx | 2 +- .../src/components/get_link_modal.tsx | 2 +- .../abstract_command.test.tsx.snap | 6 +- .../abstract_incoming_hook.test.tsx.snap | 12 +- .../abstract_oauth_app.test.jsx.snap | 4 +- .../abstract_outgoing_webhook.test.tsx.snap | 2 +- .../integrations/abstract_command.tsx | 2 +- .../abstract_incoming_webhook.tsx | 2 +- .../integrations/abstract_oauth_app.jsx | 2 +- .../abstract_outgoing_webhook.tsx | 2 +- .../__snapshots__/add_bot.test.tsx.snap | 4 +- .../integrations/bots/add_bot/add_bot.tsx | 4 +- .../src/components/integrations/bots/bot.tsx | 2 +- .../interactive_dialog/interactive_dialog.jsx | 2 +- .../invitation_modal/invite_view.scss | 30 -- .../invitation_modal/invite_view.tsx | 2 +- .../invitation_modal/result_view.tsx | 2 +- .../leave_team_modal.test.tsx.snap | 2 +- .../leave_team_modal.test.tsx | 2 +- .../leave_team_modal/leave_team_modal.tsx | 2 +- .../linking_landing_page.tsx | 38 ++- webapp/channels/src/components/list_modal.tsx | 4 +- .../login/__snapshots__/login.test.tsx.snap | 2 +- .../__snapshots__/login_mfa.test.tsx.snap | 2 +- .../more_direct_channels.test.tsx.snap | 4 +- .../more_direct_channels.tsx | 2 +- .../__snapshots__/multiselect.test.tsx.snap | 12 +- .../components/multiselect/multiselect.tsx | 6 +- .../new_channel_modal.test.tsx | 4 +- .../onboarding_tasklist.tsx | 2 +- .../post_edit_history.test.tsx.snap | 8 +- .../rename_channel_modal.test.tsx.snap | 2 +- .../rename_channel_modal.tsx | 2 +- .../rhs_card_header/rhs_card_header.tsx | 4 +- .../rhs_header_post/rhs_header_post.tsx | 4 +- .../channels/src/components/save_button.tsx | 8 +- .../search_results_header.tsx | 4 +- .../components/searchable_channel_list.tsx | 6 +- .../searchable_user_list.tsx | 4 +- .../src/components/setting_item_max.tsx | 6 +- .../src/components/setting_picture.tsx | 6 +- .../signup/__snapshots__/signup.test.tsx.snap | 4 +- .../team_members_modal.test.tsx.snap | 2 +- .../team_members_modal/team_members_modal.tsx | 2 +- .../unarchive_channel_modal.test.tsx.snap | 2 +- .../unarchive_channel_modal.tsx | 2 +- .../update_user_group_modal.test.tsx.snap | 6 +- .../update_user_group_modal.scss | 8 - .../update_user_group_modal.tsx | 4 +- .../user_group_popover.test.tsx.snap | 6 +- .../user_group_popover/user_group_popover.tsx | 4 +- .../user_groups_list/user_groups_list.tsx | 2 +- .../user_groups_modal/user_groups_modal.scss | 44 +-- .../user_groups_modal_header.test.tsx.snap | 2 +- .../user_groups_modal_header.tsx | 2 +- .../import_theme_modal.test.tsx.snap | 2 +- .../custom_theme_chooser.test.tsx.snap | 2 +- .../custom_theme_chooser.tsx | 2 +- .../user_settings/import_theme_modal.tsx | 2 +- .../email_notification_setting.test.tsx.snap | 12 +- .../manage_auto_responder.test.tsx.snap | 12 +- .../user_access_token_section.tsx | 3 +- .../view_user_group_header_sub_menu.tsx | 2 +- .../view_user_group_list_item.tsx | 2 +- .../view_user_group_modal.scss | 53 ---- .../view_user_group_modal_header.tsx | 4 +- .../components/widgets/icons/fa_next_icon.tsx | 2 +- .../widgets/icons/fa_previous_icon.tsx | 2 +- .../widgets/icons/unarchive_icon.tsx | 22 -- .../src/sass/components/_buttons.scss | 288 ++++++++++++++---- .../components/_channel-invite-modal.scss | 21 -- .../channels/src/sass/components/_groups.scss | 4 +- .../channels/src/sass/components/_modal.scss | 24 +- .../src/sass/layout/_sidebar-right.scss | 4 +- .../src/sass/routes/_admin-console.scss | 2 +- webapp/channels/src/sass/routes/_get-app.scss | 34 --- .../channels/src/sass/routes/_settings.scss | 10 - webapp/channels/src/sass/routes/_signup.scss | 160 ---------- webapp/channels/src/utils/utils.tsx | 11 +- .../src/generic_modal/generic_modal.scss | 56 ---- .../src/generic_modal/generic_modal.tsx | 4 +- 183 files changed, 722 insertions(+), 1102 deletions(-) delete mode 100644 webapp/channels/src/components/widgets/icons/unarchive_icon.tsx diff --git a/webapp/channels/src/components/__snapshots__/get_link_modal.test.tsx.snap b/webapp/channels/src/components/__snapshots__/get_link_modal.test.tsx.snap index c3c03451a49..6372fda945c 100644 --- a/webapp/channels/src/components/__snapshots__/get_link_modal.test.tsx.snap +++ b/webapp/channels/src/components/__snapshots__/get_link_modal.test.tsx.snap @@ -60,7 +60,7 @@ exports[`components/GetLinkModal should have called onHide 1`] = ` componentClass="div" > diff --git a/webapp/channels/src/components/create_team/components/display_name.tsx b/webapp/channels/src/components/create_team/components/display_name.tsx index cca27aabffa..c47ce84024a 100644 --- a/webapp/channels/src/components/create_team/components/display_name.tsx +++ b/webapp/channels/src/components/create_team/components/display_name.tsx @@ -8,8 +8,6 @@ import type {Team} from '@mattermost/types/teams'; import {trackEvent} from 'actions/telemetry_actions.jsx'; -import NextIcon from 'components/widgets/icons/fa_next_icon'; - import logoImage from 'images/logo.png'; import Constants from 'utils/constants'; import {cleanUpUrlable} from 'utils/url'; @@ -150,7 +148,7 @@ export default class TeamSignupDisplayNamePage extends React.PureComponent - + diff --git a/webapp/channels/src/components/create_user_groups_modal/__snapshots__/create_user_groups_modal.test.tsx.snap b/webapp/channels/src/components/create_user_groups_modal/__snapshots__/create_user_groups_modal.test.tsx.snap index 38fb416e91f..21cec084bff 100644 --- a/webapp/channels/src/components/create_user_groups_modal/__snapshots__/create_user_groups_modal.test.tsx.snap +++ b/webapp/channels/src/components/create_user_groups_modal/__snapshots__/create_user_groups_modal.test.tsx.snap @@ -38,7 +38,7 @@ exports[`component/create_user_groups_modal should match snapshot with back butt > diff --git a/webapp/channels/src/components/new_channel_modal/new_channel_modal.test.tsx b/webapp/channels/src/components/new_channel_modal/new_channel_modal.test.tsx index 441ac95fdb5..b23e5eed73a 100644 --- a/webapp/channels/src/components/new_channel_modal/new_channel_modal.test.tsx +++ b/webapp/channels/src/components/new_channel_modal/new_channel_modal.test.tsx @@ -161,11 +161,11 @@ describe('components/new_channel_modal', () => { const cancelButton = screen.getByText('Cancel'); expect(cancelButton).toBeInTheDocument(); - expect(cancelButton).toHaveClass('GenericModal__button cancel'); + expect(cancelButton).toHaveClass('btn-tertiary'); const createChannelButton = screen.getByText('Create channel'); expect(createChannelButton).toBeInTheDocument(); - expect(createChannelButton).toHaveClass('GenericModal__button confirm'); + expect(createChannelButton).toHaveClass('btn-primary'); expect(createChannelButton).toBeDisabled(); }); diff --git a/webapp/channels/src/components/onboarding_tasklist/onboarding_tasklist.tsx b/webapp/channels/src/components/onboarding_tasklist/onboarding_tasklist.tsx index 3b7da5a2a43..81fd7b70f43 100644 --- a/webapp/channels/src/components/onboarding_tasklist/onboarding_tasklist.tsx +++ b/webapp/channels/src/components/onboarding_tasklist/onboarding_tasklist.tsx @@ -127,7 +127,7 @@ const Button = styled.button<{open: boolean}>(({open}) => { }); const PlayButton = styled.button` - padding: 10px 20px; + padding: 10px 0; max-width: 175px; background: var(--button-bg); border-radius: 4px; diff --git a/webapp/channels/src/components/post_edit_history/__snapshots__/post_edit_history.test.tsx.snap b/webapp/channels/src/components/post_edit_history/__snapshots__/post_edit_history.test.tsx.snap index 303ff4f2104..935a50b2941 100644 --- a/webapp/channels/src/components/post_edit_history/__snapshots__/post_edit_history.test.tsx.snap +++ b/webapp/channels/src/components/post_edit_history/__snapshots__/post_edit_history.test.tsx.snap @@ -30,7 +30,7 @@ exports[`components/post_edit_history should display error screen if errors are class="pull-right" > { diff --git a/webapp/channels/src/components/user_group_popover/__snapshots__/user_group_popover.test.tsx.snap b/webapp/channels/src/components/user_group_popover/__snapshots__/user_group_popover.test.tsx.snap index 49d8b1afe59..f95af5999bf 100644 --- a/webapp/channels/src/components/user_group_popover/__snapshots__/user_group_popover.test.tsx.snap +++ b/webapp/channels/src/components/user_group_popover/__snapshots__/user_group_popover.test.tsx.snap @@ -194,12 +194,12 @@ exports[`component/user_group_popover should match snapshot 1`] = `