diff --git a/webapp/channels/src/components/admin_console/group_settings/__snapshots__/group_settings.test.tsx.snap b/webapp/channels/src/components/admin_console/group_settings/__snapshots__/group_settings.test.tsx.snap
index 34a16ae2d4c..ca02083032a 100644
--- a/webapp/channels/src/components/admin_console/group_settings/__snapshots__/group_settings.test.tsx.snap
+++ b/webapp/channels/src/components/admin_console/group_settings/__snapshots__/group_settings.test.tsx.snap
@@ -104,13 +104,39 @@ For more information on Groups, please see
class="group-list-link-unlink"
>
-
- Link Selected Groups
+
+
+
+
+
+
+
+
+ Link Selected Groups
+
diff --git a/webapp/channels/src/components/admin_console/group_settings/group_details/__snapshots__/group_details.test.tsx.snap b/webapp/channels/src/components/admin_console/group_settings/group_details/__snapshots__/group_details.test.tsx.snap
index 085c2e680f1..e8653781894 100644
--- a/webapp/channels/src/components/admin_console/group_settings/group_details/__snapshots__/group_details.test.tsx.snap
+++ b/webapp/channels/src/components/admin_console/group_settings/group_details/__snapshots__/group_details.test.tsx.snap
@@ -164,14 +164,18 @@ exports[`components/admin_console/group_settings/group_details/GroupDetails shou
class="MenuWrapper "
>
- Add Team or Channel
-
+
+ Add Team or Channel
+
+
@@ -356,24 +360,32 @@ exports[`components/admin_console/group_settings/group_details/GroupDetails shou
1 - 20 of 20
-
+
+
+
-
+
+
+
@@ -384,22 +396,28 @@ exports[`components/admin_console/group_settings/group_details/GroupDetails shou
class="admin-console-save"
>
-
+
Save
- Cancel
+
+ Cancel
+
- Add Team or Channel
-
+
+ Add Team or Channel
+
+
-
+
+
+
-
+
+
+
@@ -1734,23 +1742,31 @@ exports[`components/admin_console/group_settings/group_details/GroupUsers should
1 - 20 of 55
-
+
+
+
-
+
+
+
@@ -2612,22 +2628,30 @@ exports[`components/admin_console/group_settings/group_details/GroupUsers should
21 - 40 of 55
-
+
+
+
-
+
+
+
@@ -3284,23 +3308,31 @@ exports[`components/admin_console/group_settings/group_details/GroupUsers should
41 - 55 of 55
-
+
+
+
-
+
+
+
@@ -4162,24 +4194,32 @@ exports[`components/admin_console/group_settings/group_details/GroupUsers should
1 - 20 of 20
-
+
+
+
-
+
+
+
@@ -5079,24 +5119,32 @@ exports[`components/admin_console/group_settings/group_details/GroupUsers should
1 - 20 of 20
-
+
+
+
-
+
+
+
@@ -5991,24 +6039,32 @@ exports[`components/admin_console/group_settings/group_details/GroupUsers should
1 - 20 of 20
-
+
+
+
-
+
+
+
diff --git a/webapp/channels/src/components/admin_console/group_settings/group_details/group_details.tsx b/webapp/channels/src/components/admin_console/group_settings/group_details/group_details.tsx
index b1606632818..fa16559c3aa 100644
--- a/webapp/channels/src/components/admin_console/group_settings/group_details/group_details.tsx
+++ b/webapp/channels/src/components/admin_console/group_settings/group_details/group_details.tsx
@@ -5,7 +5,7 @@ import React, {type JSX} from 'react';
import type {WrappedComponentProps} from 'react-intl';
import {FormattedMessage, defineMessage, injectIntl} from 'react-intl';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import type {ChannelWithTeamData} from '@mattermost/types/channels';
import {
SyncableType,
diff --git a/webapp/channels/src/components/admin_console/group_settings/group_details/group_teams_and_channels_row.tsx b/webapp/channels/src/components/admin_console/group_settings/group_details/group_teams_and_channels_row.tsx
index 4472f640ab3..3882ee4f052 100644
--- a/webapp/channels/src/components/admin_console/group_settings/group_details/group_teams_and_channels_row.tsx
+++ b/webapp/channels/src/components/admin_console/group_settings/group_details/group_teams_and_channels_row.tsx
@@ -6,7 +6,7 @@ import isNil from 'lodash/isNil';
import React from 'react';
import {FormattedMessage} from 'react-intl';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import ConfirmModal from 'components/confirm_modal';
import GlobeIcon from 'components/widgets/icons/globe_icon';
diff --git a/webapp/channels/src/components/admin_console/group_settings/group_details/group_users.tsx b/webapp/channels/src/components/admin_console/group_settings/group_details/group_users.tsx
index e02bdd4c3a2..e64c72c945b 100644
--- a/webapp/channels/src/components/admin_console/group_settings/group_details/group_users.tsx
+++ b/webapp/channels/src/components/admin_console/group_settings/group_details/group_users.tsx
@@ -6,7 +6,7 @@ import React from 'react';
import {FormattedMessage} from 'react-intl';
import {Link} from 'react-router-dom';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import {GroupSource, PluginGroupSourcePrefix} from '@mattermost/types/groups';
import type {UserProfile} from '@mattermost/types/users';
diff --git a/webapp/channels/src/components/admin_console/group_settings/groups_list/__snapshots__/groups_list.test.tsx.snap b/webapp/channels/src/components/admin_console/group_settings/groups_list/__snapshots__/groups_list.test.tsx.snap
index 26c6d0f61c1..296df94a0f4 100644
--- a/webapp/channels/src/components/admin_console/group_settings/groups_list/__snapshots__/groups_list.test.tsx.snap
+++ b/webapp/channels/src/components/admin_console/group_settings/groups_list/__snapshots__/groups_list.test.tsx.snap
@@ -43,13 +43,39 @@ exports[`components/admin_console/group_settings/GroupsList.tsx should match sna
class="group-list-link-unlink"
>
-
- Link Selected Groups
+
+
+
+
+
+
+
+
+ Link Selected Groups
+
@@ -201,22 +227,53 @@ exports[`components/admin_console/group_settings/GroupsList.tsx should match sna
- Search
+
+ Search
+
-
- Link Selected Groups
+
+
+
+
+
+
+
+
+ Link Selected Groups
+
@@ -277,13 +334,39 @@ exports[`components/admin_console/group_settings/GroupsList.tsx should match sna
class="group-list-link-unlink"
>
-
- Link Selected Groups
+
+
+
+
+
+
+
+
+ Link Selected Groups
+
@@ -483,24 +566,32 @@ exports[`components/admin_console/group_settings/GroupsList.tsx should match sna
1 - 2 of 2
-
+
+
+
-
+
+
+
@@ -550,13 +641,39 @@ exports[`components/admin_console/group_settings/GroupsList.tsx should match sna
class="group-list-link-unlink"
>
-
- Unlink Selected Groups
+
+
+
+
+
+
+
+
+ Unlink Selected Groups
+
@@ -730,24 +847,32 @@ exports[`components/admin_console/group_settings/GroupsList.tsx should match sna
1 - 2 of 2
-
+
+
+
-
+
+
+
@@ -797,13 +922,39 @@ exports[`components/admin_console/group_settings/GroupsList.tsx should match sna
class="group-list-link-unlink"
>
-
- Link Selected Groups
+
+
+
+
+
+
+
+
+ Link Selected Groups
+
@@ -977,24 +1128,32 @@ exports[`components/admin_console/group_settings/GroupsList.tsx should match sna
1 - 2 of 2
-
+
+
+
-
+
+
+
@@ -1044,13 +1203,39 @@ exports[`components/admin_console/group_settings/GroupsList.tsx should match sna
class="group-list-link-unlink"
>
-
- Link Selected Groups
+
+
+
+
+
+
+
+
+ Link Selected Groups
+
@@ -1256,24 +1441,32 @@ exports[`components/admin_console/group_settings/GroupsList.tsx should match sna
1 - 3 of 3
-
+
+
+
-
+
+
+
@@ -1323,13 +1516,39 @@ exports[`components/admin_console/group_settings/GroupsList.tsx should match sna
class="group-list-link-unlink"
>
-
- Link Selected Groups
+
+
+
+
+
+
+
+
+ Link Selected Groups
+
@@ -1892,23 +2111,31 @@ exports[`components/admin_console/group_settings/GroupsList.tsx should match sna
1 - 200 of 401
-
+
+
+
-
+
+
+
@@ -1958,13 +2185,39 @@ exports[`components/admin_console/group_settings/GroupsList.tsx should match sna
class="group-list-link-unlink"
>
-
- Link Selected Groups
+
+
+
+
+
+
+
+
+ Link Selected Groups
+
@@ -2527,22 +2780,30 @@ exports[`components/admin_console/group_settings/GroupsList.tsx should match sna
201 - 400 of 401
-
+
+
+
-
+
+
+
@@ -2592,13 +2853,39 @@ exports[`components/admin_console/group_settings/GroupsList.tsx should match sna
class="group-list-link-unlink"
>
-
- Link Selected Groups
+
+
+
+
+
+
+
+
+ Link Selected Groups
+
@@ -2804,22 +3091,30 @@ exports[`components/admin_console/group_settings/GroupsList.tsx should match sna
201 - 400 of 401
-
+
+
+
-
+
+
+
@@ -2869,13 +3164,39 @@ exports[`components/admin_console/group_settings/GroupsList.tsx should match sna
class="group-list-link-unlink"
>
-
- Link Selected Groups
+
+
+
+
+
+
+
+
+ Link Selected Groups
+
@@ -2936,13 +3257,39 @@ exports[`components/admin_console/group_settings/GroupsList.tsx should match sna
class="group-list-link-unlink"
>
-
- Link Selected Groups
+
+
+
+
+
+
+
+
+ Link Selected Groups
+
@@ -3090,24 +3437,32 @@ exports[`components/admin_console/group_settings/GroupsList.tsx should match sna
1 - 2 of 2
-
+
+
+
-
+
+
+
diff --git a/webapp/channels/src/components/admin_console/group_settings/groups_list/groups_list.tsx b/webapp/channels/src/components/admin_console/group_settings/groups_list/groups_list.tsx
index 4e6cdc0338d..c9156462a2b 100644
--- a/webapp/channels/src/components/admin_console/group_settings/groups_list/groups_list.tsx
+++ b/webapp/channels/src/components/admin_console/group_settings/groups_list/groups_list.tsx
@@ -5,8 +5,10 @@ import classNames from 'classnames';
import React, {type JSX} from 'react';
import {defineMessage, FormattedMessage} from 'react-intl';
+import {LinkVariantIcon, LinkVariantOffIcon} from '@mattermost/compass-icons/components';
+import {Button} from '@mattermost/compass-ui/components/button';
import {Checkbox} from '@mattermost/compass-ui/components/checkbox';
-import {Button} from '@mattermost/shared/components/button';
+import {Icon} from '@mattermost/compass-ui/components/icon';
import type {GroupSearchOpts, MixedUnlinkedGroupRedux} from '@mattermost/types/groups';
import type {ActionResult} from 'mattermost-redux/types/actions';
@@ -164,8 +166,8 @@ export default class GroupsList extends React.PureComponent {
emphasis='primary'
onClick={() => this.linkSelectedGroups()}
disabled={this.props.readOnly}
+ leadingIcon={}/>}
>
-
{
emphasis='primary'
onClick={() => this.unlinkSelectedGroups()}
disabled={this.props.readOnly}
+ leadingIcon={}/>}
>
-
{
type='button'
emphasis='primary'
disabled={this.props.readOnly}
+ leadingIcon={}/>}
>
-
onConfirm?.(filterToDelete!)}
>
{formatMessage({id: 'admin.ip_filtering.delete_filter', defaultMessage: 'Delete filter'})}
diff --git a/webapp/channels/src/components/admin_console/ip_filtering/edit_section/edit_section_header.tsx b/webapp/channels/src/components/admin_console/ip_filtering/edit_section/edit_section_header.tsx
index 613a374d457..12f20a6bc67 100644
--- a/webapp/channels/src/components/admin_console/ip_filtering/edit_section/edit_section_header.tsx
+++ b/webapp/channels/src/components/admin_console/ip_filtering/edit_section/edit_section_header.tsx
@@ -4,7 +4,7 @@
import React from 'react';
import {FormattedMessage} from 'react-intl';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import IPNotInRangeErrorPanel from './edit_section_ip_not_in_range_panel';
diff --git a/webapp/channels/src/components/admin_console/ip_filtering/edit_section/edit_section_ip_not_in_range_panel.tsx b/webapp/channels/src/components/admin_console/ip_filtering/edit_section/edit_section_ip_not_in_range_panel.tsx
index 4b29de9d659..8a2274e2b14 100644
--- a/webapp/channels/src/components/admin_console/ip_filtering/edit_section/edit_section_ip_not_in_range_panel.tsx
+++ b/webapp/channels/src/components/admin_console/ip_filtering/edit_section/edit_section_ip_not_in_range_panel.tsx
@@ -5,8 +5,7 @@ import React from 'react';
import {FormattedMessage} from 'react-intl';
import {AlertOutlineIcon} from '@mattermost/compass-icons/components';
-import {Button} from '@mattermost/shared/components/button';
-
+import {Button} from '@mattermost/compass-ui/components/button';
type IPNotInRangeErrorPanelProps = {
currentUsersIP: string | null;
setShowAddModal: (show: boolean) => void;
diff --git a/webapp/channels/src/components/admin_console/ip_filtering/edit_section/edit_section_no_filters_panel.tsx b/webapp/channels/src/components/admin_console/ip_filtering/edit_section/edit_section_no_filters_panel.tsx
index cd311c1fbe8..f7b8fbb4b01 100644
--- a/webapp/channels/src/components/admin_console/ip_filtering/edit_section/edit_section_no_filters_panel.tsx
+++ b/webapp/channels/src/components/admin_console/ip_filtering/edit_section/edit_section_no_filters_panel.tsx
@@ -4,7 +4,7 @@
import React from 'react';
import {FormattedMessage} from 'react-intl';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import IPFilteringEarthSvg from 'components/common/svg_images_components/ip_filtering_earth_svg';
diff --git a/webapp/channels/src/components/admin_console/ip_filtering/edit_section/edit_sections.scss b/webapp/channels/src/components/admin_console/ip_filtering/edit_section/edit_sections.scss
index b9edd246441..39b55c52d10 100644
--- a/webapp/channels/src/components/admin_console/ip_filtering/edit_section/edit_sections.scss
+++ b/webapp/channels/src/components/admin_console/ip_filtering/edit_section/edit_sections.scss
@@ -143,12 +143,8 @@
line-height: 20px;
text-align: center;
- .btn-primary {
+ button {
margin-top: 16px;
-
- &:hover {
- cursor: pointer;
- }
}
}
}
diff --git a/webapp/channels/src/components/admin_console/ip_filtering/ip_filtering.scss b/webapp/channels/src/components/admin_console/ip_filtering/ip_filtering.scss
index d957fc9b686..f2e2f637b50 100644
--- a/webapp/channels/src/components/admin_console/ip_filtering/ip_filtering.scss
+++ b/webapp/channels/src/components/admin_console/ip_filtering/ip_filtering.scss
@@ -1,12 +1,6 @@
.IPFiltering {
height: 100%;
- .admin-console-save {
- .btn.btn-primary:disabled {
- color: rgba(var(--center-channel-color-rgb), 0.32) !important;
- }
- }
-
.MainPanel {
display: flex;
height: 100%;
diff --git a/webapp/channels/src/components/admin_console/ip_filtering/save_confirmation_modal.tsx b/webapp/channels/src/components/admin_console/ip_filtering/save_confirmation_modal.tsx
index 6a4323250ff..4c9c22b091b 100644
--- a/webapp/channels/src/components/admin_console/ip_filtering/save_confirmation_modal.tsx
+++ b/webapp/channels/src/components/admin_console/ip_filtering/save_confirmation_modal.tsx
@@ -6,7 +6,7 @@ import {Modal} from 'react-bootstrap';
import {FormattedMessage, useIntl} from 'react-intl';
import {InformationOutlineIcon} from '@mattermost/compass-icons/components';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import ExternalLink from 'components/external_link';
@@ -77,7 +77,7 @@ export default function SaveConfirmationModal({onExited, onConfirm, title, subti
data-testid='save-confirmation-button'
type='button'
emphasis='primary'
- variant='destructive'
+ destructive={true}
onClick={() => onConfirm?.()}
>
{buttonText}
diff --git a/webapp/channels/src/components/admin_console/jobs/table.scss b/webapp/channels/src/components/admin_console/jobs/table.scss
index 6c01b5aeae6..11d88c272ab 100644
--- a/webapp/channels/src/components/admin_console/jobs/table.scss
+++ b/webapp/channels/src/components/admin_console/jobs/table.scss
@@ -34,7 +34,7 @@
background-color: rgba(0, 0, 0, 0.05);
.view-details-link {
- color: var(--button-bg);
+ --button-fg: var(--button-bg);
}
}
@@ -48,24 +48,22 @@
text-align: right;
}
- .view-details-link.btn {
- display: inline-flex;
- align-items: center;
+ // Muted at rest so the row hover has something to reveal. Compass
+ // quaternary is --link-color out of the box, which left the link already
+ // blue and the hover a no-op. Colours go through --button-fg because the
+ // Compass label does not read `color`.
+ .view-details-link {
+ --button-fg: rgba(var(--sys-center-channel-color-rgb), 0.56);
+
padding: 0;
background: transparent;
- color: rgba(var(--sys-center-channel-color-rgb), 0.56);
- font-size: 12px;
- font-weight: 600;
white-space: nowrap;
&:hover,
&:focus {
- background: transparent;
- color: var(--button-bg);
- }
+ --button-fg: var(--button-bg);
- .icon {
- font-size: 16px;
+ background: transparent;
}
}
diff --git a/webapp/channels/src/components/admin_console/jobs/table.tsx b/webapp/channels/src/components/admin_console/jobs/table.tsx
index 86dd621ce5e..26b6776f0aa 100644
--- a/webapp/channels/src/components/admin_console/jobs/table.tsx
+++ b/webapp/channels/src/components/admin_console/jobs/table.tsx
@@ -5,7 +5,9 @@ import classNames from 'classnames';
import React, {type JSX} from 'react';
import {FormattedMessage} from 'react-intl';
-import {Button} from '@mattermost/shared/components/button';
+import {ChevronRightIcon} from '@mattermost/compass-icons/components';
+import {Button} from '@mattermost/compass-ui/components/button';
+import {Icon} from '@mattermost/compass-ui/components/icon';
import type {Job, JobType} from '@mattermost/types/jobs';
import type {ActionResult} from 'mattermost-redux/types/actions';
@@ -153,8 +155,9 @@ class JobTable extends React.PureComponent {
}/>}
onClick={(e) => {
e.stopPropagation();
this.props.onRowClick!(job);
@@ -164,7 +167,6 @@ class JobTable extends React.PureComponent {
id='admin.jobTable.viewDetails'
defaultMessage='View details'
/>
-
)}
diff --git a/webapp/channels/src/components/admin_console/license_settings/__snapshots__/license_settings.test.tsx.snap b/webapp/channels/src/components/admin_console/license_settings/__snapshots__/license_settings.test.tsx.snap
index 3ee15dd09a4..fc2029202b1 100644
--- a/webapp/channels/src/components/admin_console/license_settings/__snapshots__/license_settings.test.tsx.snap
+++ b/webapp/channels/src/components/admin_console/license_settings/__snapshots__/license_settings.test.tsx.snap
@@ -86,9 +86,14 @@ exports[`components/admin_console/license_settings/LicenseSettings load screen a
class="purchase-card"
>
- Contact Sales
+
+ Contact Sales
+
@@ -463,10 +468,14 @@ exports[`components/admin_console/license_settings/LicenseSettings load screen a
-
+
Add
@@ -309,12 +311,14 @@ exports[`admin_console/add_users_to_role_modal should exclude user 1`] = `
-
+
Add
@@ -496,12 +500,14 @@ exports[`admin_console/add_users_to_role_modal should have single passed value 1
-
+
Add
@@ -683,12 +689,14 @@ exports[`admin_console/add_users_to_role_modal should include additional user 1`
-
+
Add
@@ -870,12 +878,14 @@ exports[`admin_console/add_users_to_role_modal should not include bot user 1`] =
-
+
Add
diff --git a/webapp/channels/src/components/admin_console/system_roles/system_role/system_role_users/__snapshots__/system_role_users.test.tsx.snap b/webapp/channels/src/components/admin_console/system_roles/system_role/system_role_users/__snapshots__/system_role_users.test.tsx.snap
index 22e88eebe2b..37e9b29604d 100644
--- a/webapp/channels/src/components/admin_console/system_roles/system_role/system_role_users/__snapshots__/system_role_users.test.tsx.snap
+++ b/webapp/channels/src/components/admin_console/system_roles/system_role/system_role_users/__snapshots__/system_role_users.test.tsx.snap
@@ -23,10 +23,15 @@ exports[`admin_console/system_role_users should match snapshot 1`] = `
class="button"
>
- Add People
+
+ Add People
+
@@ -165,11 +170,16 @@ exports[`admin_console/system_role_users should match snapshot with readOnly tru
class="button"
>
- Add People
+
+ Add People
+
diff --git a/webapp/channels/src/components/admin_console/system_roles/system_role/system_role_users/system_role_users.tsx b/webapp/channels/src/components/admin_console/system_roles/system_role/system_role_users/system_role_users.tsx
index a0813c3e26a..f5a1d6a7438 100644
--- a/webapp/channels/src/components/admin_console/system_roles/system_role/system_role_users/system_role_users.tsx
+++ b/webapp/channels/src/components/admin_console/system_roles/system_role/system_role_users/system_role_users.tsx
@@ -4,7 +4,6 @@
import React, {type JSX} from 'react';
import {FormattedMessage, defineMessage} from 'react-intl';
-import {buttonClassNames} from '@mattermost/shared/components/button';
import type {Role} from '@mattermost/types/roles';
import type {UserProfile, UsersStats, GetFilteredUsersStatsOpts} from '@mattermost/types/users';
@@ -249,7 +248,7 @@ export default class SystemRoleUsers extends React.PureComponent {
button={
- Reset Password
+
+ Reset Password
+
- Deactivate
+
+ Deactivate
+
@@ -285,10 +295,14 @@ exports[`SystemUserDetail should match default snapshot 1`] = `
class="add-team-button"
>
- Add Team
+
+ Add Team
+
@@ -317,13 +331,15 @@ exports[`SystemUserDetail should match default snapshot 1`] = `
class="admin-console-save-buttons"
>
-
+
Save
@@ -588,14 +604,24 @@ exports[`SystemUserDetail should match snapshot if MFA is enabled 1`] = `
data-testid="adminUserCard-footer"
>
- Reset Password
+
+ Reset Password
+
- Deactivate
+
+ Deactivate
+
@@ -623,10 +649,14 @@ exports[`SystemUserDetail should match snapshot if MFA is enabled 1`] = `
class="add-team-button"
>
- Add Team
+
+ Add Team
+
@@ -655,13 +685,15 @@ exports[`SystemUserDetail should match snapshot if MFA is enabled 1`] = `
class="admin-console-save-buttons"
>
-
+
Save
@@ -926,14 +958,24 @@ exports[`SystemUserDetail should not fetch CPA data if disabled 1`] = `
data-testid="adminUserCard-footer"
>
- Reset Password
+
+ Reset Password
+
- Deactivate
+
+ Deactivate
+
@@ -961,10 +1003,14 @@ exports[`SystemUserDetail should not fetch CPA data if disabled 1`] = `
class="add-team-button"
>
- Add Team
+
+ Add Team
+
@@ -993,13 +1039,15 @@ exports[`SystemUserDetail should not fetch CPA data if disabled 1`] = `
class="admin-console-save-buttons"
>
-
+
Save
@@ -1264,14 +1312,24 @@ exports[`SystemUserDetail should not show manage user settings button when user
data-testid="adminUserCard-footer"
>
- Reset Password
+
+ Reset Password
+
- Deactivate
+
+ Deactivate
+
@@ -1299,10 +1357,14 @@ exports[`SystemUserDetail should not show manage user settings button when user
class="add-team-button"
>
- Add Team
+
+ Add Team
+
@@ -1331,13 +1393,15 @@ exports[`SystemUserDetail should not show manage user settings button when user
class="admin-console-save-buttons"
>
-
+
Save
@@ -1602,20 +1666,35 @@ exports[`SystemUserDetail should show manage user settings button as activated 1
data-testid="adminUserCard-footer"
>
- Reset Password
+
+ Reset Password
+
- Deactivate
+
+ Deactivate
+
- Manage User Settings
+
+ Manage User Settings
+
@@ -1643,10 +1722,14 @@ exports[`SystemUserDetail should show manage user settings button as activated 1
class="add-team-button"
>
- Add Team
+
+ Add Team
+
@@ -1675,13 +1758,15 @@ exports[`SystemUserDetail should show manage user settings button as activated 1
class="admin-console-save-buttons"
>
-
+
Save
@@ -1946,14 +2031,24 @@ exports[`SystemUserDetail should show manage user settings button as disabled wh
data-testid="adminUserCard-footer"
>
- Reset Password
+
+ Reset Password
+
- Deactivate
+
+ Deactivate
+
@@ -1981,10 +2076,14 @@ exports[`SystemUserDetail should show manage user settings button as disabled wh
class="add-team-button"
>
- Add Team
+
+ Add Team
+
@@ -2013,13 +2112,15 @@ exports[`SystemUserDetail should show manage user settings button as disabled wh
class="admin-console-save-buttons"
>
-
+
Save
@@ -2312,17 +2413,27 @@ exports[`SystemUserDetail should show the activate user button as disabled when
data-testid="adminUserCard-footer"
>
- Reset Password
+
+ Reset Password
+
- Deactivate
-
- (Managed By LDAP)
+
+ Deactivate
+
+ (Managed By LDAP)
+
@@ -2350,10 +2461,14 @@ exports[`SystemUserDetail should show the activate user button as disabled when
class="add-team-button"
>
- Add Team
+
+ Add Team
+
@@ -2382,13 +2497,15 @@ exports[`SystemUserDetail should show the activate user button as disabled when
class="admin-console-save-buttons"
>
-
+
Save
diff --git a/webapp/channels/src/components/admin_console/system_user_detail/system_user_detail.tsx b/webapp/channels/src/components/admin_console/system_user_detail/system_user_detail.tsx
index c650804586e..f621acaf470 100644
--- a/webapp/channels/src/components/admin_console/system_user_detail/system_user_detail.tsx
+++ b/webapp/channels/src/components/admin_console/system_user_detail/system_user_detail.tsx
@@ -10,7 +10,7 @@ import type {IntlShape, WrappedComponentProps} from 'react-intl';
import {FormattedMessage, defineMessage, injectIntl, useIntl} from 'react-intl';
import type {RouteComponentProps} from 'react-router-dom';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import {WithTooltip} from '@mattermost/shared/components/tooltip';
import type {ServerError} from '@mattermost/types/errors';
import {valueRefersToOptions} from '@mattermost/types/properties';
@@ -1489,7 +1489,7 @@ export class SystemUserDetail extends PureComponent {
{this.state.user?.delete_at === 0 && (
@@ -1659,7 +1659,7 @@ export class SystemUserDetail extends PureComponent {
)}
}
- confirmButtonVariant='destructive'
+ destructive={true}
confirmButtonText={
}
- confirmButtonVariant='destructive'
+ destructive={true}
confirmButtonText={
diff --git a/webapp/channels/src/components/admin_console/system_users/system_users_filters_popover/index.tsx b/webapp/channels/src/components/admin_console/system_users/system_users_filters_popover/index.tsx
index b38413fca1f..2ef056dee1d 100644
--- a/webapp/channels/src/components/admin_console/system_users/system_users_filters_popover/index.tsx
+++ b/webapp/channels/src/components/admin_console/system_users/system_users_filters_popover/index.tsx
@@ -6,7 +6,9 @@ import React, {useState} from 'react';
import {useIntl} from 'react-intl';
import {useDispatch} from 'react-redux';
-import {Button} from '@mattermost/shared/components/button';
+import {FilterVariantIcon} from '@mattermost/compass-icons/components';
+import {Button} from '@mattermost/compass-ui/components/button';
+import {Icon} from '@mattermost/compass-ui/components/icon';
import {setAdminConsoleUsersManagementTableProperties} from 'actions/views/admin';
@@ -120,13 +122,14 @@ export function SystemUsersFilterPopover(props: Props) {
return (
diff --git a/webapp/channels/src/components/admin_console/system_users/system_users_filters_popover/system_users_filter_popover.scss b/webapp/channels/src/components/admin_console/system_users/system_users_filters_popover/system_users_filter_popover.scss
index 88aec5bbcf7..4d3e1b46900 100644
--- a/webapp/channels/src/components/admin_console/system_users/system_users_filters_popover/system_users_filter_popover.scss
+++ b/webapp/channels/src/components/admin_console/system_users/system_users_filters_popover/system_users_filter_popover.scss
@@ -1,5 +1,18 @@
.systemUsersFilterContainer {
flex-grow: 1;
+
+ // Held-open state, to match the filter button on the other admin lists.
+ // useRole puts aria-expanded on the trigger, so it is already the source
+ // of truth. Nested for specificity: Compass's own :hover rule would
+ // otherwise tie with the bare selector and win on source order.
+ .systemUsersFilterTrigger[aria-expanded='true'],
+ .systemUsersFilterTrigger[aria-expanded='true']:hover {
+ background-color: rgba(var(--link-color-rgb), 0.24);
+ }
+}
+
+.systemUsersFilterTrigger {
+ display: inline-flex;
}
.systemUsersFilterPopoverContainer {
diff --git a/webapp/channels/src/components/admin_console/system_users/system_users_list_actions/confirm_reset_failed_attempts_modal.tsx b/webapp/channels/src/components/admin_console/system_users/system_users_list_actions/confirm_reset_failed_attempts_modal.tsx
index e39ee3fff1b..a85366f78e5 100644
--- a/webapp/channels/src/components/admin_console/system_users/system_users_list_actions/confirm_reset_failed_attempts_modal.tsx
+++ b/webapp/channels/src/components/admin_console/system_users/system_users_list_actions/confirm_reset_failed_attempts_modal.tsx
@@ -68,7 +68,7 @@ export default function ConfirmResetFailedAttemptsModal({user, onSuccess, onErro
-
+
+
+
-
+
+
+
diff --git a/webapp/channels/src/components/admin_console/team_channel_settings/abstract_list.tsx b/webapp/channels/src/components/admin_console/team_channel_settings/abstract_list.tsx
index 79d69b17a24..2bbf0f80d57 100644
--- a/webapp/channels/src/components/admin_console/team_channel_settings/abstract_list.tsx
+++ b/webapp/channels/src/components/admin_console/team_channel_settings/abstract_list.tsx
@@ -7,7 +7,7 @@ import type {JSX, MouseEvent} from 'react';
import type {MessageDescriptor} from 'react-intl';
import {FormattedMessage} from 'react-intl';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import type {Group} from '@mattermost/types/groups';
import type {Team} from '@mattermost/types/teams';
diff --git a/webapp/channels/src/components/admin_console/team_channel_settings/channel/details/__snapshots__/channel_details.test.tsx.snap b/webapp/channels/src/components/admin_console/team_channel_settings/channel/details/__snapshots__/channel_details.test.tsx.snap
index 1eab44bd1df..9a5581df24b 100644
--- a/webapp/channels/src/components/admin_console/team_channel_settings/channel/details/__snapshots__/channel_details.test.tsx.snap
+++ b/webapp/channels/src/components/admin_console/team_channel_settings/channel/details/__snapshots__/channel_details.test.tsx.snap
@@ -69,13 +69,39 @@ exports[`admin_console/team_channel_settings/channel/ChannelDetails should match
class="AdminChannelDetails_archiveContainer"
>
-
- Archive Channel
+
+
+
+
+
+
+
+
+ Archive Channel
+
@@ -324,10 +350,15 @@ exports[`admin_console/team_channel_settings/channel/ChannelDetails should match
class="button"
>
- Add Group
+
+ Add Group
+
@@ -381,25 +412,33 @@ exports[`admin_console/team_channel_settings/channel/ChannelDetails should match
1 - 1 of 1
-
+
+
+
-
+
+
+
@@ -413,22 +452,28 @@ exports[`admin_console/team_channel_settings/channel/ChannelDetails should match
class="admin-console-save"
>
-
+
Save
- Cancel
+
+ Cancel
+
-
- Archive Channel
+
+
+
+
+
+
+
+
+ Archive Channel
+
@@ -762,10 +833,15 @@ exports[`admin_console/team_channel_settings/channel/ChannelDetails should match
class="button"
>
- Add Group
+
+ Add Group
+
@@ -819,25 +895,33 @@ exports[`admin_console/team_channel_settings/channel/ChannelDetails should match
1 - 1 of 1
-
+
+
+
-
+
+
+
@@ -851,22 +935,28 @@ exports[`admin_console/team_channel_settings/channel/ChannelDetails should match
class="admin-console-save"
>
-
+
Save
- Cancel
+
+ Cancel
+
-
- Archive Channel
+
+
+
+
+
+
+
+
+ Archive Channel
+
@@ -1134,22 +1250,28 @@ exports[`admin_console/team_channel_settings/channel/ChannelDetails should match
class="admin-console-save"
>
-
+
Save
- Cancel
+
+ Cancel
+
-
- Archive Channel
+
+
+
+
+
+
+
+
+ Archive Channel
+
@@ -1416,22 +1564,28 @@ exports[`admin_console/team_channel_settings/channel/ChannelDetails should match
class="admin-console-save"
>
-
+
Save
- Cancel
+
+ Cancel
+
-
- Archive Channel
+
+
+
+
+
+
+
+
+ Archive Channel
+
@@ -1659,22 +1839,28 @@ exports[`admin_console/team_channel_settings/channel/ChannelDetails should match
class="admin-console-save"
>
-
+
Save
- Cancel
+
+ Cancel
+
-
- Archive Channel
+
+
+
+
+
+
+
+
+ Archive Channel
+
@@ -1901,22 +2113,28 @@ exports[`admin_console/team_channel_settings/channel/ChannelDetails should match
class="admin-console-save"
>
-
+
Save
- Cancel
+
+ Cancel
+
- Add Group
+
+ Add Group
+
@@ -80,25 +85,33 @@ exports[`admin_console/team_channel_settings/channel/ChannelGroups should match
1 - 1 of 1
-
+
+
+
-
+
+
+
diff --git a/webapp/channels/src/components/admin_console/team_channel_settings/channel/details/__snapshots__/channel_profile.test.tsx.snap b/webapp/channels/src/components/admin_console/team_channel_settings/channel/details/__snapshots__/channel_profile.test.tsx.snap
index b53ae4e3813..6b7d1ba4ebb 100644
--- a/webapp/channels/src/components/admin_console/team_channel_settings/channel/details/__snapshots__/channel_profile.test.tsx.snap
+++ b/webapp/channels/src/components/admin_console/team_channel_settings/channel/details/__snapshots__/channel_profile.test.tsx.snap
@@ -48,13 +48,39 @@ exports[`admin_console/team_channel_settings/channel/ChannelProfile should match
class="AdminChannelDetails_archiveContainer"
>
-
- Archive Channel
+
+
);
diff --git a/webapp/channels/src/components/feature_toast/feature_toast.tsx b/webapp/channels/src/components/feature_toast/feature_toast.tsx
index 01e6f084cf2..3d45faff654 100644
--- a/webapp/channels/src/components/feature_toast/feature_toast.tsx
+++ b/webapp/channels/src/components/feature_toast/feature_toast.tsx
@@ -7,6 +7,7 @@ import {useIntl} from 'react-intl';
import {useSelector} from 'react-redux';
import {PlaylistCheckIcon, CloseIcon} from '@mattermost/compass-icons/components';
+import {Button} from '@mattermost/compass-ui/components/button';
import {WithTooltip} from '@mattermost/shared/components/tooltip';
import {isAnyModalOpen} from 'selectors/views/modals';
@@ -78,12 +79,13 @@ export default function FeatureToast({
{message}
{showButton && (
-
{buttonText}
-
+
)}
diff --git a/webapp/channels/src/components/get_link_modal.scss b/webapp/channels/src/components/get_link_modal.scss
new file mode 100644
index 00000000000..0867a813b07
--- /dev/null
+++ b/webapp/channels/src/components/get_link_modal.scss
@@ -0,0 +1,9 @@
+// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
+// See LICENSE.txt for license information.
+
+// Confirmation that the link reached the clipboard. The old `btn-success`
+// class is nested under `.btn.btn-primary` in _buttons.scss, so it no longer
+// reaches the Compass button.
+.GetLinkModal__copied {
+ --button-bg: var(--online-indicator);
+}
diff --git a/webapp/channels/src/components/get_link_modal.test.tsx b/webapp/channels/src/components/get_link_modal.test.tsx
index f843d350bf7..14d74199dc4 100644
--- a/webapp/channels/src/components/get_link_modal.test.tsx
+++ b/webapp/channels/src/components/get_link_modal.test.tsx
@@ -62,7 +62,7 @@ describe('components/GetLinkModal', () => {
const copyButton = screen.getByRole('button', {name: /Copy Link/});
await user.click(copyButton);
expect(copyButton).toHaveTextContent('Copied');
- expect(copyButton).toHaveClass('btn-success');
+ expect(copyButton).toHaveClass('GetLinkModal__copied');
// Take snapshot with copied state
expect(baseElement).toMatchSnapshot();
@@ -77,7 +77,7 @@ describe('components/GetLinkModal', () => {
// Verify copiedLink was reset (button should show Copy Link, not Copied)
expect(copyButton).toHaveTextContent('Copy Link');
- expect(copyButton).not.toHaveClass('btn-success');
+ expect(copyButton).not.toHaveClass('GetLinkModal__copied');
});
test('should have handle copyLink', async () => {
@@ -97,7 +97,7 @@ describe('components/GetLinkModal', () => {
// Button should now show "Copied"
expect(copyButton).toHaveTextContent('Copied');
- expect(copyButton).toHaveClass('btn-success');
+ expect(copyButton).toHaveClass('GetLinkModal__copied');
});
test('should change button state when copying', async () => {
@@ -110,22 +110,19 @@ describe('components/GetLinkModal', () => {
// Initial state
expect(copyButton).toHaveTextContent('Copy Link');
- expect(copyButton).toHaveClass('btn-primary');
- expect(copyButton).not.toHaveClass('btn-success');
+ expect(copyButton).not.toHaveClass('GetLinkModal__copied');
// After copying
await user.click(copyButton);
expect(copyButton).toHaveTextContent('Copied');
- expect(copyButton).toHaveClass('btn-primary');
- expect(copyButton).toHaveClass('btn-success');
+ expect(copyButton).toHaveClass('GetLinkModal__copied');
// After timeout
act(() => {
jest.advanceTimersByTime(1000);
});
expect(copyButton).toHaveTextContent('Copy Link');
- expect(copyButton).toHaveClass('btn-primary');
- expect(copyButton).not.toHaveClass('btn-success');
+ expect(copyButton).not.toHaveClass('GetLinkModal__copied');
});
test('should cleanup timeout on unmount', async () => {
diff --git a/webapp/channels/src/components/get_link_modal.tsx b/webapp/channels/src/components/get_link_modal.tsx
index befd6a7d576..11f99e2aeec 100644
--- a/webapp/channels/src/components/get_link_modal.tsx
+++ b/webapp/channels/src/components/get_link_modal.tsx
@@ -6,7 +6,11 @@ import React, {type JSX} from 'react';
import {Modal} from 'react-bootstrap';
import {FormattedMessage} from 'react-intl';
-import {Button} from '@mattermost/shared/components/button';
+import {CheckIcon, LinkVariantIcon} from '@mattermost/compass-icons/components';
+import {Button} from '@mattermost/compass-ui/components/button';
+import {Icon} from '@mattermost/compass-ui/components/icon';
+
+import './get_link_modal.scss';
type Props = {
show: boolean;
@@ -92,26 +96,21 @@ export default class GetLinkModal extends React.PureComponent {
type='button'
emphasis='primary'
className={classNames({
- 'btn-success': this.state.copiedLink,
- }, 'pull-left')}
+ GetLinkModal__copied: this.state.copiedLink,
+ })}
onClick={this.copyLink}
+ leadingIcon={ : }/>}
>
{this.state.copiedLink ? (
- <>
-
-
- >
+
) : (
- <>
-
-
- >
+
)}
);
diff --git a/webapp/channels/src/components/get_public_link_modal/__snapshots__/get_public_link_modal.test.tsx.snap b/webapp/channels/src/components/get_public_link_modal/__snapshots__/get_public_link_modal.test.tsx.snap
index 35e16eef28c..e6e5dc9043e 100644
--- a/webapp/channels/src/components/get_public_link_modal/__snapshots__/get_public_link_modal.test.tsx.snap
+++ b/webapp/channels/src/components/get_public_link_modal/__snapshots__/get_public_link_modal.test.tsx.snap
@@ -71,22 +71,52 @@ exports[`components/GetPublicLinkModal should match snapshot when link is empty
class="modal-footer"
>
- Close
+
+ Close
+
-
- Copy Link
+
+
+
+
+
+
+
+
+ Copy Link
+
@@ -168,22 +198,52 @@ exports[`components/GetPublicLinkModal should match snapshot when link is not em
class="modal-footer"
>
- Close
+
+ Close
+
-
- Copy Link
+
+
+
+
+
+
+
+
+ Copy Link
+
diff --git a/webapp/channels/src/components/global_header/right_controls/plan_upgrade_button/index.tsx b/webapp/channels/src/components/global_header/right_controls/plan_upgrade_button/index.tsx
index 7eb11463796..5bda7c1239c 100644
--- a/webapp/channels/src/components/global_header/right_controls/plan_upgrade_button/index.tsx
+++ b/webapp/channels/src/components/global_header/right_controls/plan_upgrade_button/index.tsx
@@ -5,7 +5,7 @@ import React, {useEffect, type JSX} from 'react';
import {useIntl} from 'react-intl';
import {useDispatch, useSelector} from 'react-redux';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import {WithTooltip} from '@mattermost/shared/components/tooltip';
import {getCloudProducts, getCloudSubscription} from 'mattermost-redux/actions/cloud';
@@ -78,7 +78,7 @@ const PlanUpgradeButton = (): JSX.Element | null => {
aria-haspopup='dialog'
onClick={() => openPricingModal()}
emphasis='primary'
- size='xs'
+ size='x-small'
>
{formatMessage({id: 'pricing_modal.btn.viewPlans', defaultMessage: 'View plans'})}
diff --git a/webapp/channels/src/components/inline_action_button/index.tsx b/webapp/channels/src/components/inline_action_button/index.tsx
index b837debdf73..4ef9135466c 100644
--- a/webapp/channels/src/components/inline_action_button/index.tsx
+++ b/webapp/channels/src/components/inline_action_button/index.tsx
@@ -6,6 +6,7 @@ import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react';
import {FormattedMessage, useIntl} from 'react-intl';
import {useDispatch} from 'react-redux';
+import {Button} from '@mattermost/compass-ui/components/button';
import type {PostActionIntegrationFormat} from '@mattermost/types/integration_actions';
import {doPostActionWithCookie} from 'mattermost-redux/actions/posts';
@@ -218,10 +219,18 @@ const InlineActionButton: React.FC = ({href, postId, children, label, mmB
return (
<>
- = ({href, postId, children, label, mmB
>
{children}
-
+
{actionError && (
-
+
Create account
@@ -643,13 +645,15 @@ exports[`components/signup/Signup should match snapshot for all signup options e
-
+
Create account
diff --git a/webapp/channels/src/components/spinner_button.tsx b/webapp/channels/src/components/spinner_button.tsx
index 050ff3f3969..2ced6b48e47 100644
--- a/webapp/channels/src/components/spinner_button.tsx
+++ b/webapp/channels/src/components/spinner_button.tsx
@@ -2,16 +2,47 @@
// See LICENSE.txt for license information.
import React from 'react';
-import type {ReactNode} from 'react';
+import type {ButtonHTMLAttributes, ReactNode} from 'react';
+import {FormattedMessage} from 'react-intl';
import type {MessageDescriptor} from 'react-intl';
-import {Button, type ButtonProps} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
+import type {ButtonEmphasis, ButtonSize as CompassButtonSize} from '@mattermost/compass-ui/components/button';
-import LoadingWrapper from 'components/widgets/loading/loading_wrapper';
+type SharedSize = 'xs' | 'sm' | 'md' | 'lg';
-export interface SpinnerButtonProps extends Omit {
+const SHARED_TO_COMPASS_SIZE: Record = {
+ xs: 'x-small',
+ sm: 'small',
+ md: 'medium',
+ lg: 'large',
+};
+
+export interface SpinnerButtonProps extends Omit, 'children'> {
+ children: ReactNode;
spinning: boolean;
spinningText: ReactNode | MessageDescriptor;
+ emphasis?: ButtonEmphasis;
+ size?: SharedSize | CompassButtonSize;
+ destructive?: boolean;
+}
+
+function mapSize(size?: SharedSize | CompassButtonSize): CompassButtonSize | undefined {
+ if (!size) {
+ return undefined;
+ }
+ if (size in SHARED_TO_COMPASS_SIZE) {
+ return SHARED_TO_COMPASS_SIZE[size as SharedSize];
+ }
+ return size as CompassButtonSize;
+}
+
+function isMessageDescriptor(text: ReactNode | MessageDescriptor): text is MessageDescriptor {
+ return typeof text === 'object' && text !== null && 'id' in text && 'defaultMessage' in text;
+}
+
+function renderSpinningText(text: ReactNode | MessageDescriptor): ReactNode {
+ return isMessageDescriptor(text) ? : text;
}
const SpinnerButton = ({
@@ -19,20 +50,17 @@ const SpinnerButton = ({
spinningText,
children,
disabled,
+ size,
...otherProps
}: SpinnerButtonProps) => {
return (
-
- {children}
-
+ {spinning ? renderSpinningText(spinningText) : children}
);
};
diff --git a/webapp/channels/src/components/start_trial_form_modal/__snapshots__/start_trial_form_modal.test.tsx.snap b/webapp/channels/src/components/start_trial_form_modal/__snapshots__/start_trial_form_modal.test.tsx.snap
index 1d3cf57009d..a31ded93e03 100644
--- a/webapp/channels/src/components/start_trial_form_modal/__snapshots__/start_trial_form_modal.test.tsx.snap
+++ b/webapp/channels/src/components/start_trial_form_modal/__snapshots__/start_trial_form_modal.test.tsx.snap
@@ -362,11 +362,15 @@ Object {
class="buttons"
>
- Start trial
+
+ Start trial
+
diff --git a/webapp/channels/src/components/start_trial_form_modal/air_gapped_modal.tsx b/webapp/channels/src/components/start_trial_form_modal/air_gapped_modal.tsx
index 251a86f5b0b..da196f02aee 100644
--- a/webapp/channels/src/components/start_trial_form_modal/air_gapped_modal.tsx
+++ b/webapp/channels/src/components/start_trial_form_modal/air_gapped_modal.tsx
@@ -5,7 +5,7 @@ import React from 'react';
import {Modal} from 'react-bootstrap';
import {useIntl} from 'react-intl';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import AirgappedTrialActivationConfirmSvg from 'components/common/svg_images_components/airgapped_trial_activation_confirm_svg';
import ExternalLink from 'components/external_link';
diff --git a/webapp/channels/src/components/start_trial_form_modal/index.tsx b/webapp/channels/src/components/start_trial_form_modal/index.tsx
index 1c3da223fc7..d47122c8252 100644
--- a/webapp/channels/src/components/start_trial_form_modal/index.tsx
+++ b/webapp/channels/src/components/start_trial_form_modal/index.tsx
@@ -7,7 +7,7 @@ import {Modal} from 'react-bootstrap';
import {FormattedMessage, defineMessages, useIntl} from 'react-intl';
import {useSelector, useDispatch} from 'react-redux';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import {getLicenseConfig} from 'mattermost-redux/actions/general';
import {getCurrentUser} from 'mattermost-redux/selectors/entities/common';
diff --git a/webapp/channels/src/components/suggestion/switch_channel_provider.tsx b/webapp/channels/src/components/suggestion/switch_channel_provider.tsx
index a144512728f..d7ff1788f61 100644
--- a/webapp/channels/src/components/suggestion/switch_channel_provider.tsx
+++ b/webapp/channels/src/components/suggestion/switch_channel_provider.tsx
@@ -6,7 +6,7 @@ import React, {useLayoutEffect, useRef, useState} from 'react';
import {defineMessage, useIntl} from 'react-intl';
import {connect, useSelector} from 'react-redux';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import {WithTooltip} from '@mattermost/shared/components/tooltip';
import type {Channel, ChannelMembership} from '@mattermost/types/channels';
import type {PreferenceType} from '@mattermost/types/preferences';
@@ -367,7 +367,7 @@ export const SwitchChannelSuggestion = React.forwardRef(({
{hasPendingJoinRequest ? formatMessage({id: 'more_channels.withdrawRequest', defaultMessage: 'Withdraw request'}) : formatMessage({id: 'more_channels.requestToJoin', defaultMessage: 'Request to join'})}
diff --git a/webapp/channels/src/components/system_notice/__snapshots__/system_notice.test.tsx.snap b/webapp/channels/src/components/system_notice/__snapshots__/system_notice.test.tsx.snap
index 88ce608e02c..eef61be6416 100644
--- a/webapp/channels/src/components/system_notice/__snapshots__/system_notice.test.tsx.snap
+++ b/webapp/channels/src/components/system_notice/__snapshots__/system_notice.test.tsx.snap
@@ -55,16 +55,26 @@ exports[`components/SystemNotice should match snapshot for admin, admin notice 1
class="system-notice__footer"
>
- Remind Me Later
+
+ Remind Me Later
+
- Don't Show Again
+
+ Don't Show Again
+
@@ -118,16 +128,26 @@ exports[`components/SystemNotice should match snapshot for admin, regular notice
class="system-notice__footer"
>
- Remind Me Later
+
+ Remind Me Later
+
- Don't Show Again
+
+ Don't Show Again
+
@@ -181,16 +201,26 @@ exports[`components/SystemNotice should match snapshot for regular user, admin a
class="system-notice__footer"
>
- Remind Me Later
+
+ Remind Me Later
+
- Don't Show Again
+
+ Don't Show Again
+
@@ -252,16 +282,26 @@ exports[`components/SystemNotice should match snapshot for regular user, regular
class="system-notice__footer"
>
- Remind Me Later
+
+ Remind Me Later
+
- Don't Show Again
+
+ Don't Show Again
+
@@ -317,16 +357,26 @@ exports[`components/SystemNotice should match snapshot for show function returni
class="system-notice__footer"
>
- Remind Me Later
+
+ Remind Me Later
+
- Don't Show Again
+
+ Don't Show Again
+
@@ -380,10 +430,15 @@ exports[`components/SystemNotice should match snapshot for with allowForget equa
class="system-notice__footer"
>
- Remind Me Later
+
+ Remind Me Later
+
@@ -416,16 +471,26 @@ exports[`components/SystemNotice should match snapshot when a custom icon is pas
class="system-notice__footer"
>
- Remind Me Later
+
+ Remind Me Later
+
- Don't Show Again
+
+ Don't Show Again
+
diff --git a/webapp/channels/src/components/system_notice/system_notice.tsx b/webapp/channels/src/components/system_notice/system_notice.tsx
index d55a041afab..d3f166d3e8d 100644
--- a/webapp/channels/src/components/system_notice/system_notice.tsx
+++ b/webapp/channels/src/components/system_notice/system_notice.tsx
@@ -4,7 +4,7 @@
import React from 'react';
import {FormattedMessage, injectIntl, type WrappedComponentProps} from 'react-intl';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import type {AnalyticsState} from '@mattermost/types/admin';
import type {Channel} from '@mattermost/types/channels';
import type {ClientConfig, ClientLicense} from '@mattermost/types/config';
@@ -144,7 +144,7 @@ export class SystemNotice extends React.PureComponent {
{
id='invitePeople'
type='button'
emphasis='primary'
- size='sm'
+ size='small'
onClick={this.handleInvitePeople}
>
{formatMessage({id: 'team_settings.policy_editor.confirmation.apply', defaultMessage: 'Apply policy'})}
diff --git a/webapp/channels/src/components/team_settings/team_access_policies_tab/team_policy_editor.tsx b/webapp/channels/src/components/team_settings/team_access_policies_tab/team_policy_editor.tsx
index f717fdbdeb3..373f63d9b2f 100644
--- a/webapp/channels/src/components/team_settings/team_access_policies_tab/team_policy_editor.tsx
+++ b/webapp/channels/src/components/team_settings/team_access_policies_tab/team_policy_editor.tsx
@@ -5,9 +5,9 @@ import cloneDeep from 'lodash/cloneDeep';
import React, {useState, useEffect, useMemo, useCallback} from 'react';
import {FormattedMessage, useIntl} from 'react-intl';
+import {Button} from '@mattermost/compass-ui/components/button';
import {SectionNotice} from '@mattermost/compass-ui/components/section-notice';
import {GenericModal} from '@mattermost/components';
-import {Button} from '@mattermost/shared/components/button';
import type {AccessControlPolicy, AccessControlPolicyActiveUpdate, AccessControlPolicyRule} from '@mattermost/types/access_control';
import type {ChannelSearchOpts, ChannelWithTeamData} from '@mattermost/types/channels';
import type {AccessControlSettings} from '@mattermost/types/config';
@@ -634,7 +634,7 @@ export default function TeamPolicyEditor({
setShowDeleteModal(true)}
disabled={hasChannels() || hasMaskedRows}
>
@@ -700,7 +700,7 @@ export default function TeamPolicyEditor({
{formatMessage({id: 'team_settings.policy_editor.delete_confirmation.confirm', defaultMessage: 'Delete'})}
diff --git a/webapp/channels/src/components/team_settings/team_access_tab/invite_section_input.tsx b/webapp/channels/src/components/team_settings/team_access_tab/invite_section_input.tsx
index 354c640b97d..1758866504a 100644
--- a/webapp/channels/src/components/team_settings/team_access_tab/invite_section_input.tsx
+++ b/webapp/channels/src/components/team_settings/team_access_tab/invite_section_input.tsx
@@ -6,7 +6,7 @@ import {defineMessages, useIntl} from 'react-intl';
import {useSelector} from 'react-redux';
import {RefreshIcon} from '@mattermost/compass-icons/components';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import type {Team} from '@mattermost/types/teams';
import {Permissions} from 'mattermost-redux/constants';
diff --git a/webapp/channels/src/components/terms_of_service/__snapshots__/terms_of_service.test.tsx.snap b/webapp/channels/src/components/terms_of_service/__snapshots__/terms_of_service.test.tsx.snap
index ae632fb448f..10f9beb640e 100644
--- a/webapp/channels/src/components/terms_of_service/__snapshots__/terms_of_service.test.tsx.snap
+++ b/webapp/channels/src/components/terms_of_service/__snapshots__/terms_of_service.test.tsx.snap
@@ -40,18 +40,26 @@ exports[`components/terms_of_service/TermsOfService should match snapshot 1`] =
class="terms-of-service__button-group"
>
- I Agree
+
+ I Agree
+
- I Disagree
+
+ I Disagree
+
@@ -128,30 +136,39 @@ exports[`components/terms_of_service/TermsOfService should match snapshot, on ac
class="terms-of-service__button-group"
>
- I Agree
+
+ I Agree
+
- I Disagree
+
+ I Disagree
+
@@ -200,30 +217,39 @@ exports[`components/terms_of_service/TermsOfService should match snapshot, on re
class="terms-of-service__button-group"
>
- I Agree
+
+ I Agree
+
- I Disagree
+
+ I Disagree
+
diff --git a/webapp/channels/src/components/terms_of_service/terms_of_service.tsx b/webapp/channels/src/components/terms_of_service/terms_of_service.tsx
index b56757f5ff6..c963bb1ef3c 100644
--- a/webapp/channels/src/components/terms_of_service/terms_of_service.tsx
+++ b/webapp/channels/src/components/terms_of_service/terms_of_service.tsx
@@ -5,7 +5,7 @@ import React, {type JSX} from 'react';
import {FormattedMessage} from 'react-intl';
import type {RouteComponentProps} from 'react-router';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import type {TermsOfService as ReduxTermsOfService} from '@mattermost/types/terms_of_service';
import type {ActionResult} from 'mattermost-redux/types/actions';
@@ -17,7 +17,6 @@ import AnnouncementBar from 'components/announcement_bar';
import LoadingScreen from 'components/loading_screen';
import LogoutIcon from 'components/widgets/icons/fa_logout_icon';
import WarningIcon from 'components/widgets/icons/fa_warning_icon';
-import LoadingSpinner from 'components/widgets/loading/loading_spinner';
import {getHistory} from 'utils/browser_history';
import {Constants} from 'utils/constants';
@@ -198,11 +197,11 @@ export default class TermsOfService extends React.PureComponent
- {this.state.loadingAgree && }
- {this.state.loadingDisagree && }
{
expect(container).toMatchSnapshot();
const button = container.querySelector('button');
expect(button?.textContent).toBe('Delete Channel');
+ expect(button?.className).toContain('style--none');
+ });
+
+ test('renders compass-ui Button when emphasis is set', () => {
+ const {container} = renderWithContext(
+
+ {'Invite'}
+ ,
+ );
+
+ const button = container.querySelector('button');
+ expect(button).not.toBeNull();
+ expect(button?.className).not.toContain('style--none');
+ expect(button?.className).not.toContain('btn-primary');
+ expect(button?.textContent).toBe('Invite');
});
});
diff --git a/webapp/channels/src/components/toggle_modal_button.tsx b/webapp/channels/src/components/toggle_modal_button.tsx
index 64d7221ac94..754a2309dbb 100644
--- a/webapp/channels/src/components/toggle_modal_button.tsx
+++ b/webapp/channels/src/components/toggle_modal_button.tsx
@@ -4,6 +4,8 @@
import React, {type ComponentType, type MouseEvent, type ReactNode} from 'react';
import {useDispatch} from 'react-redux';
+import {Button, type ButtonAppearance, type ButtonEmphasis, type ButtonSize} from '@mattermost/compass-ui/components/button';
+
import {openModal} from 'actions/views/modals';
type Props = {
@@ -18,6 +20,15 @@ type Props = {
disabled?: boolean;
id?: string;
role?: string;
+
+ /**
+ * When set, renders a compass-ui Button instead of an unstyled trigger.
+ * Prefer this for button-looking CTAs; leave unset for link/menu/icon shells.
+ */
+ emphasis?: ButtonEmphasis;
+ size?: ButtonSize;
+ destructive?: boolean;
+ appearance?: ButtonAppearance;
};
const ToggleModalButton = ({
@@ -32,6 +43,10 @@ const ToggleModalButton = ({
disabled,
id,
role,
+ emphasis,
+ size,
+ destructive,
+ appearance,
}: Props) => {
const dispatch = useDispatch();
@@ -57,6 +72,26 @@ const ToggleModalButton = ({
show(e);
};
+ if (emphasis) {
+ return (
+
+ {children}
+ {badge}
+
+ );
+ }
+
return (
-
-
- >
+
);
- const nextBtn = (): JSX.Element => {
- let buttonText = (
- <>
-
-
- >
+ const lastStep = getLastStep(tourSteps);
+ let nextBtn = (
+
+ );
+ let nextTrailingIcon: JSX.Element | undefined = (
+ }/>
+ );
+ if (singleTip) {
+ nextBtn = (
+
);
- if (singleTip) {
- buttonText = (
-
- );
- return buttonText;
- }
-
- const lastStep = getLastStep(tourSteps);
- if (currentStep === lastStep) {
- buttonText = (
-
- );
- }
- return buttonText;
- };
+ nextTrailingIcon = undefined;
+ } else if (currentStep === lastStep) {
+ nextBtn = (
+
+ );
+ nextTrailingIcon = undefined;
+ }
return (
}/>}
step={currentStep}
placement={placement}
pulsatingDotPlacement={pulsatingDotPlacement}
diff --git a/webapp/channels/src/components/unarchive_channel_modal/__snapshots__/unarchive_channel_modal.test.tsx.snap b/webapp/channels/src/components/unarchive_channel_modal/__snapshots__/unarchive_channel_modal.test.tsx.snap
index 6247d7f2c30..86e008416ea 100644
--- a/webapp/channels/src/components/unarchive_channel_modal/__snapshots__/unarchive_channel_modal.test.tsx.snap
+++ b/webapp/channels/src/components/unarchive_channel_modal/__snapshots__/unarchive_channel_modal.test.tsx.snap
@@ -70,18 +70,26 @@ exports[`components/unarchive_channel_modal should match snapshot for unarchive_
class="modal-footer"
>
- Cancel
+
+ Cancel
+
- Unarchive
+
+ Unarchive
+
diff --git a/webapp/channels/src/components/unarchive_channel_modal/unarchive_channel_modal.tsx b/webapp/channels/src/components/unarchive_channel_modal/unarchive_channel_modal.tsx
index 7c095be0d11..a3f2de952e5 100644
--- a/webapp/channels/src/components/unarchive_channel_modal/unarchive_channel_modal.tsx
+++ b/webapp/channels/src/components/unarchive_channel_modal/unarchive_channel_modal.tsx
@@ -5,7 +5,7 @@ import React, {type JSX} from 'react';
import {Modal} from 'react-bootstrap';
import {FormattedMessage} from 'react-intl';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import type {Channel} from '@mattermost/types/channels';
import type {ActionResult} from 'mattermost-redux/types/actions';
@@ -92,11 +92,11 @@ export default class UnarchiveChannelModal extends React.PureComponent
- Back
+
+ Back
+
-
+
Save Details
diff --git a/webapp/channels/src/components/update_user_group_modal/update_user_group_modal.tsx b/webapp/channels/src/components/update_user_group_modal/update_user_group_modal.tsx
index 5eb0a724c33..9394180b744 100644
--- a/webapp/channels/src/components/update_user_group_modal/update_user_group_modal.tsx
+++ b/webapp/channels/src/components/update_user_group_modal/update_user_group_modal.tsx
@@ -5,7 +5,7 @@ import React, {useCallback, useEffect, useState} from 'react';
import {Modal} from 'react-bootstrap';
import {FormattedMessage, useIntl} from 'react-intl';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import type {CustomGroupPatch, Group} from '@mattermost/types/groups';
import type {ActionResult} from 'mattermost-redux/types/actions';
diff --git a/webapp/channels/src/components/user_groups_modal/__snapshots__/user_groups_modal.test.tsx.snap b/webapp/channels/src/components/user_groups_modal/__snapshots__/user_groups_modal.test.tsx.snap
index 32e3fc47a9d..f1727f06eb2 100644
--- a/webapp/channels/src/components/user_groups_modal/__snapshots__/user_groups_modal.test.tsx.snap
+++ b/webapp/channels/src/components/user_groups_modal/__snapshots__/user_groups_modal.test.tsx.snap
@@ -47,9 +47,14 @@ exports[`component/user_groups_modal should match snapshot with groups 1`] = `
User Groups
- Create Group
+
+ Create Group
+
@@ -318,9 +323,14 @@ exports[`component/user_groups_modal should match snapshot without groups 1`] =
User Groups
- Create Group
+
+ Create Group
+
diff --git a/webapp/channels/src/components/user_groups_modal/ad_ldap_upsell_banner.tsx b/webapp/channels/src/components/user_groups_modal/ad_ldap_upsell_banner.tsx
index 2793eead201..b689344ef2e 100644
--- a/webapp/channels/src/components/user_groups_modal/ad_ldap_upsell_banner.tsx
+++ b/webapp/channels/src/components/user_groups_modal/ad_ldap_upsell_banner.tsx
@@ -6,6 +6,7 @@ import React, {memo, useEffect, useState, type JSX} from 'react';
import {useIntl} from 'react-intl';
import {useDispatch, useSelector} from 'react-redux';
+import {Button} from '@mattermost/compass-ui/components/button';
import type {GlobalState} from '@mattermost/types/store';
import {getPrevTrialLicense} from 'mattermost-redux/actions/admin';
@@ -90,19 +91,21 @@ function ADLDAPUpsellBanner() {
let btn: JSX.Element | null = (
setConfirmed(true)}
/>);
if (prevTrialed || isCloud) {
btn = (
-
{formatMessage({id: 'adldap_upsell_banner.sales_btn', defaultMessage: 'Contact sales to use'})}
-
+
);
}
diff --git a/webapp/channels/src/components/user_groups_modal/user_groups_modal.scss b/webapp/channels/src/components/user_groups_modal/user_groups_modal.scss
index d1545b455d9..f9c7acf4ccd 100644
--- a/webapp/channels/src/components/user_groups_modal/user_groups_modal.scss
+++ b/webapp/channels/src/components/user_groups_modal/user_groups_modal.scss
@@ -47,12 +47,13 @@
}
.ad-ldap-banner-btn {
- border: none;
- background: none;
- color: var(--button-color);
+ // Sits on the brand-coloured banner. Compass's
+ // appearance='inverted' resolves to --sidebar-text, which goes
+ // dark on Quartz, so drive the foreground from --button-color.
+ --button-fg: var(--button-color);
+
font-size: 14px;
font-weight: 600;
- line-height: 14px;
}
}
diff --git a/webapp/channels/src/components/user_groups_modal/user_groups_modal.tsx b/webapp/channels/src/components/user_groups_modal/user_groups_modal.tsx
index cdba99b136d..06b38694780 100644
--- a/webapp/channels/src/components/user_groups_modal/user_groups_modal.tsx
+++ b/webapp/channels/src/components/user_groups_modal/user_groups_modal.tsx
@@ -4,8 +4,8 @@
import React, {useCallback, useEffect, useMemo, useState} from 'react';
import {defineMessage, FormattedMessage} from 'react-intl';
+import {Button} from '@mattermost/compass-ui/components/button';
import {GenericModal} from '@mattermost/components';
-import {Button} from '@mattermost/shared/components/button';
import type {GetGroupsForUserParams, GetGroupsParams, Group, GroupSearchParams} from '@mattermost/types/groups';
import './user_groups_modal.scss';
@@ -215,8 +215,8 @@ const UserGroupsModal = (props: Props) => {
headerButton={
props.canCreateCustomGroups &&
-
-
- Save
-
-
-
- Cancel
-
+
+
+ Save
+
+
+
+
+ Cancel
+
+
+
diff --git a/webapp/channels/src/components/user_settings/advanced/user_settings_advanced.tsx b/webapp/channels/src/components/user_settings/advanced/user_settings_advanced.tsx
index 6cb927512f2..a0a022a153a 100644
--- a/webapp/channels/src/components/user_settings/advanced/user_settings_advanced.tsx
+++ b/webapp/channels/src/components/user_settings/advanced/user_settings_advanced.tsx
@@ -676,7 +676,7 @@ export default class AdvancedSettingsDisplay extends React.PureComponent
}
- confirmButtonVariant='destructive'
+ destructive={true}
confirmButtonText={deactivateMemberButton}
onConfirm={this.handleDeactivateAccountSubmit}
onCancel={this.handleHideDeactivateAccountModal}
diff --git a/webapp/channels/src/components/user_settings/display/__snapshots__/user_settings_display.test.tsx.snap b/webapp/channels/src/components/user_settings/display/__snapshots__/user_settings_display.test.tsx.snap
index 992386c81f4..c768998f208 100644
--- a/webapp/channels/src/components/user_settings/display/__snapshots__/user_settings_display.test.tsx.snap
+++ b/webapp/channels/src/components/user_settings/display/__snapshots__/user_settings_display.test.tsx.snap
@@ -391,7 +391,7 @@ exports[`components/user_settings/display/UserSettingsDisplay should match snaps