diff --git a/e2e-tests/cypress/tests/integration/channels/accessibility/accessibility_account_settings_spec.js b/e2e-tests/cypress/tests/integration/channels/accessibility/accessibility_account_settings_spec.js
index 092bdb0a669..0692a4769b9 100644
--- a/e2e-tests/cypress/tests/integration/channels/accessibility/accessibility_account_settings_spec.js
+++ b/e2e-tests/cypress/tests/integration/channels/accessibility/accessibility_account_settings_spec.js
@@ -176,13 +176,20 @@ describe('Verify Accessibility Support in different sections in Settings and Pro
cy.get('#changeInterfaceLanguageLabel').should('be.visible').and('have.text', 'Change interface language');
// # When space key is pressed on dropdown, it should expand and should collapse when esc key is pressed
- cy.get('@inputEl').typeWithForce(' ');
- cy.findByRole('listbox').should('have.class', 'react-select__menu-list').as('listBox');
+ // Menu is portaled to document.body (outside the aria-modal dialog), so query by class
+ // and assert role=listbox rather than findByRole (inaccessible outside the modal).
+ cy.get('@inputEl').focus().typeWithForce(' ');
+ cy.get('.react-select__menu-list').
+ should('be.visible').
+ and('have.attr', 'role', 'listbox').
+ and('have.class', 'react-select__menu-list').
+ as('listBox');
cy.get('@inputEl').typeWithForce('{esc}');
cy.get('@listBox').should('not.exist');
// # Press down arrow twice and check aria label
- cy.get('@inputEl').typeWithForce(' ');
+ cy.get('@inputEl').focus().typeWithForce(' ');
+ cy.get('.react-select__menu-list').should('be.visible');
cy.get('@inputEl').typeWithForce('{downarrow}{downarrow}');
cy.get('#displayLanguage').within(($el) => {
cy.wrap($el).findByRole('log').should('have.attr', 'aria-live', 'assertive').as('ariaEl');
@@ -276,7 +283,7 @@ describe('Verify Accessibility Support in different sections in Settings and Pro
// * Check Tab behavior in MFA section
cy.get('#mfaEdit').click();
cy.get('#passwordEdit').focus().tab({shift: true}).tab().tab();
- cy.get('.setting-list button.btn').should('have.class', 'a11y--active a11y--focused').tab();
+ cy.get('.setting-list').findByRole('button', {name: /Add|Remove/i}).should('have.class', 'a11y--active a11y--focused').tab();
cy.get('#cancelSetting').should('have.class', 'a11y--active a11y--focused');
// * Check Tab behavior in Sign-In Method if its available
@@ -284,7 +291,7 @@ describe('Verify Accessibility Support in different sections in Settings and Pro
if (el.find('#signinEdit').length) {
cy.get('#signinEdit').click();
cy.get('#mfaEdit').focus().tab({shift: true}).tab().tab();
- cy.get('.setting-list a.btn').should('have.class', 'a11y--active a11y--focused').tab();
+ cy.get('.setting-list').findByRole('link').should('have.class', 'a11y--active a11y--focused').tab();
cy.get('#cancelSetting').should('have.class', 'a11y--active a11y--focused');
}
});
diff --git a/e2e-tests/cypress/tests/integration/channels/collapsed_reply_threads/replies_spec.ts b/e2e-tests/cypress/tests/integration/channels/collapsed_reply_threads/replies_spec.ts
index 30562d1c6e3..a6fcb71c833 100644
--- a/e2e-tests/cypress/tests/integration/channels/collapsed_reply_threads/replies_spec.ts
+++ b/e2e-tests/cypress/tests/integration/channels/collapsed_reply_threads/replies_spec.ts
@@ -145,7 +145,7 @@ describe('Collapsed Reply Threads', () => {
cy.uiGetPostThreadFooter(postForAvatar.id).find('.Avatars').find('button').first().click();
// * Profile popover should be visible and close on ESC
- cy.get('div.user-profile-popover').first().should('be.visible').find('button.btn-primary.btn-sm').type('{esc}');
+ cy.get('div.user-profile-popover').first().should('be.visible').find('.user-popover__bottom-row-container button').type('{esc}');
// # Visit global threads
cy.uiClickSidebarItem('threads');
@@ -153,8 +153,8 @@ describe('Collapsed Reply Threads', () => {
// * Find the first avatar and click it
cy.get('div.ThreadItem').find('.activity').find('.Avatars').find('button').first().click();
- // * Profile popover should be visible and close on ESC
- cy.get('div.user-profile-popover').first().should('be.visible').find('button.btn-primary.btn-sm');
+ // * Profile popover should be visible
+ cy.get('div.user-profile-popover').first().should('be.visible').find('.user-popover__bottom-row-container button');
});
it('MM-T4143 Emoji reaction - type +:+1:', () => {
diff --git a/e2e-tests/cypress/tests/integration/channels/emoji/custom_emoji_1_1_spec.ts b/e2e-tests/cypress/tests/integration/channels/emoji/custom_emoji_1_1_spec.ts
index 9e81ff19cce..aa5da966413 100644
--- a/e2e-tests/cypress/tests/integration/channels/emoji/custom_emoji_1_1_spec.ts
+++ b/e2e-tests/cypress/tests/integration/channels/emoji/custom_emoji_1_1_spec.ts
@@ -55,7 +55,7 @@ describe('Custom emojis', () => {
cy.uiOpenCustomEmoji();
// # Click on add custom emoji
- cy.findByRole('button', {name: 'Add Custom Emoji'}).should('be.visible').click();
+ cy.findByRole('link', {name: 'Add Custom Emoji'}).should('be.visible').click();
// # Type emoji name
cy.get('#name').type(customEmojiWithColons);
@@ -122,5 +122,5 @@ function saveCustomEmoji(teamName: string) {
// * Should return to list of custom emojis
cy.url().should('include', `${teamName}/emoji`);
- cy.findByRole('button', {name: 'Add Custom Emoji'}).should('be.visible');
+ cy.findByRole('link', {name: 'Add Custom Emoji'}).should('be.visible');
}
diff --git a/e2e-tests/cypress/tests/integration/channels/emoji/custom_emoji_1_spec.ts b/e2e-tests/cypress/tests/integration/channels/emoji/custom_emoji_1_spec.ts
index 5a777268906..d85e450e30c 100644
--- a/e2e-tests/cypress/tests/integration/channels/emoji/custom_emoji_1_spec.ts
+++ b/e2e-tests/cypress/tests/integration/channels/emoji/custom_emoji_1_spec.ts
@@ -105,7 +105,7 @@ describe('Custom emojis', () => {
cy.uiOpenCustomEmoji();
// # Click on add custom emoji
- cy.findByRole('button', {name: 'Add Custom Emoji'}).should('be.visible').click();
+ cy.findByRole('link', {name: 'Add Custom Emoji'}).should('be.visible').click();
// # Type emoji name
cy.get('#name').should('be.visible').type(customEmojiWithColons);
@@ -180,5 +180,5 @@ function saveCustomEmoji(teamName: string) {
// * Should return to list of custom emojis
cy.url().should('include', `${teamName}/emoji`);
- cy.findByRole('button', {name: 'Add Custom Emoji'}).should('be.visible');
+ cy.findByRole('link', {name: 'Add Custom Emoji'}).should('be.visible');
}
diff --git a/e2e-tests/cypress/tests/integration/channels/enterprise/guest_accounts/guest_invitation_ui_more_spec.ts b/e2e-tests/cypress/tests/integration/channels/enterprise/guest_accounts/guest_invitation_ui_more_spec.ts
index 5b63917bc26..b97c12df8db 100644
--- a/e2e-tests/cypress/tests/integration/channels/enterprise/guest_accounts/guest_invitation_ui_more_spec.ts
+++ b/e2e-tests/cypress/tests/integration/channels/enterprise/guest_accounts/guest_invitation_ui_more_spec.ts
@@ -136,7 +136,7 @@ describe('Guest Account - Guest User Invitation Flow', () => {
// * Update email outside whitelisted domain and verify error message
cy.get('#resetEmailModal').should('be.visible').within(() => {
cy.get('input[type="email"]').type(email);
- cy.get('button.btn-primary.confirm').click();
+ cy.get('button.GenericModal__button.confirm').click();
cy.get('.error').should('be.visible').and('have.text', 'The email you provided does not belong to an accepted domain for guest accounts. Please contact your administrator or sign up with a different email.');
cy.get('.close').click();
});
diff --git a/e2e-tests/cypress/tests/integration/channels/enterprise/guest_accounts/system_console_manage_guest_spec.ts b/e2e-tests/cypress/tests/integration/channels/enterprise/guest_accounts/system_console_manage_guest_spec.ts
index 56122570081..72fabcca7d7 100644
--- a/e2e-tests/cypress/tests/integration/channels/enterprise/guest_accounts/system_console_manage_guest_spec.ts
+++ b/e2e-tests/cypress/tests/integration/channels/enterprise/guest_accounts/system_console_manage_guest_spec.ts
@@ -87,7 +87,7 @@ describe('Guest Account - Verify Manage Guest Users', () => {
const email = `temp-${getRandomId()}@mattermost.com`;
cy.get('#resetEmailModal').should('be.visible').within(() => {
cy.get('input[type="email"]').type(email);
- cy.get('button.btn-primary.confirm').click();
+ cy.get('button.GenericModal__button.confirm').click();
});
// * Verify if Guest's email was updated
diff --git a/e2e-tests/cypress/tests/integration/channels/enterprise/system_console/archived_channels_spec.js b/e2e-tests/cypress/tests/integration/channels/enterprise/system_console/archived_channels_spec.js
index 676d387d48b..6b469906ea1 100644
--- a/e2e-tests/cypress/tests/integration/channels/enterprise/system_console/archived_channels_spec.js
+++ b/e2e-tests/cypress/tests/integration/channels/enterprise/system_console/archived_channels_spec.js
@@ -62,7 +62,7 @@ describe('Archived channels', () => {
cy.visit(`/admin_console/user_management/channels/${testChannel.id}`);
// * Verify the Unarchive Channel button is visible
- cy.get('button.btn-secondary', {timeout: TIMEOUTS.TWO_SEC}).should('have.text', 'Unarchive Channel').should('be.visible').should('be.enabled');
+ cy.findByRole('button', {name: 'Unarchive Channel', timeout: TIMEOUTS.TWO_SEC}).should('be.visible').should('be.enabled');
// * Verify that only one widget is visible
cy.get('div.AdminPanel').should('be.visible').and('have.length', 1);
@@ -73,10 +73,10 @@ describe('Archived channels', () => {
cy.visit(`/admin_console/user_management/channels/${testChannel.id}`);
// # Click Unarchive Channel button
- cy.get('button.btn-secondary', {timeout: TIMEOUTS.TWO_SEC}).findAllByText('Unarchive Channel').click();
+ cy.findByRole('button', {name: 'Unarchive Channel', timeout: TIMEOUTS.TWO_SEC}).click();
// * Verify the Archive Channel button is visible
- cy.get('button.btn-secondary.btn-danger', {timeout: TIMEOUTS.TWO_SEC}).findAllByText('Archive Channel').should('be.visible');
+ cy.findByRole('button', {name: 'Archive Channel', timeout: TIMEOUTS.TWO_SEC}).should('be.visible');
// * Verify that the other widget appears
cy.get('div.AdminPanel').should('be.visible').should('have.length', 5);
diff --git a/e2e-tests/cypress/tests/integration/channels/integrations/custom_slash_commands/slash_commands_spec.js b/e2e-tests/cypress/tests/integration/channels/integrations/custom_slash_commands/slash_commands_spec.js
index e73d5e317c3..f21bc2a060c 100644
--- a/e2e-tests/cypress/tests/integration/channels/integrations/custom_slash_commands/slash_commands_spec.js
+++ b/e2e-tests/cypress/tests/integration/channels/integrations/custom_slash_commands/slash_commands_spec.js
@@ -155,7 +155,7 @@ describe('Slash commands page', () => {
cy.get('#url').clear().type('http://mattermost.com');
// # Click on Cancel
- cy.get('a').contains('Cancel').click();
+ cy.findByRole('link', {name: 'Cancel'}).click();
// # Click on edit again
cy.get('a[href*="/edit"]').click();
diff --git a/e2e-tests/cypress/tests/integration/channels/interactive_dialog/file_upload_spec.js b/e2e-tests/cypress/tests/integration/channels/interactive_dialog/file_upload_spec.js
index ae2704f647f..d9fe2af9a4a 100644
--- a/e2e-tests/cypress/tests/integration/channels/interactive_dialog/file_upload_spec.js
+++ b/e2e-tests/cypress/tests/integration/channels/interactive_dialog/file_upload_spec.js
@@ -76,7 +76,7 @@ describe('Interactive Dialog - File Upload', () => {
cy.get('label').should('be.visible').and('contain', singleElement.display_name);
// * Verify "Choose File" button for allow_multiple=false
- cy.get('button.btn-tertiary').should('be.visible').and('have.text', 'Choose File');
+ cy.findByRole('button', {name: 'Choose File'}).should('be.visible');
// * Verify placeholder / help text is visible before any upload
cy.get('.help-text').should('be.visible');
@@ -87,7 +87,7 @@ describe('Interactive Dialog - File Upload', () => {
cy.get('label').should('be.visible').and('contain', multipleElement.display_name);
// * Verify "Choose Files" button for allow_multiple=true
- cy.get('button.btn-tertiary').should('be.visible').and('have.text', 'Choose Files');
+ cy.findByRole('button', {name: 'Choose Files'}).should('be.visible');
// * Verify placeholder / help text is visible before any upload
cy.get('.help-text').should('be.visible');
diff --git a/e2e-tests/cypress/tests/integration/channels/message_forwarding/forward_message_from_dm_spec.js b/e2e-tests/cypress/tests/integration/channels/message_forwarding/forward_message_from_dm_spec.js
index 6f386a80a25..035a8c2b5d9 100644
--- a/e2e-tests/cypress/tests/integration/channels/message_forwarding/forward_message_from_dm_spec.js
+++ b/e2e-tests/cypress/tests/integration/channels/message_forwarding/forward_message_from_dm_spec.js
@@ -191,8 +191,8 @@ describe('Forward Message', () => {
// * Assert channel select is not existent
cy.get('.forward-post__select').should('not.exist');
- // * Assert if button is enabled
- cy.get('.btn-tertiary').should('not.be.disabled');
+ // * Assert if cancel button is enabled
+ cy.findByRole('button', {name: 'Cancel'}).should('not.be.disabled');
// * Assert Notification is shown
cy.findByTestId('notification_forward_post').should('be.visible').should('contain.text', `This message is from a private conversation and can only be shared with ${dmChannel.display_name}`);
@@ -206,8 +206,8 @@ describe('Forward Message', () => {
}
if (cancel) {
- // * Assert if button is active
- cy.get('.btn-tertiary').should('not.be.disabled').type('{esc}', {force: true});
+ // * Assert if cancel button is active, then dismiss with escape
+ cy.findByRole('button', {name: 'Cancel'}).should('not.be.disabled').type('{esc}', {force: true});
} else {
// * Assert if button is active
cy.get('.GenericModal__button.confirm').should('not.be.disabled').type('{enter}', {force: true});
diff --git a/e2e-tests/cypress/tests/integration/channels/message_forwarding/forward_message_from_private_channel_spec.js b/e2e-tests/cypress/tests/integration/channels/message_forwarding/forward_message_from_private_channel_spec.js
index 5fa8cb785fb..fae10016ed0 100644
--- a/e2e-tests/cypress/tests/integration/channels/message_forwarding/forward_message_from_private_channel_spec.js
+++ b/e2e-tests/cypress/tests/integration/channels/message_forwarding/forward_message_from_private_channel_spec.js
@@ -188,8 +188,8 @@ describe('Forward Message', () => {
cy.findByTestId('notification_forward_post').should('be.visible').should('contain.text', `This message is from a private channel and can only be shared with ~${privateChannel.display_name}`);
if (cancel) {
- // * Assert if button is active
- cy.get('.btn-tertiary').should('not.be.disabled').click();
+ // * Assert if cancel button is active
+ cy.findByRole('button', {name: 'Cancel'}).should('not.be.disabled').click();
} else {
// * Assert if button is active
cy.get('.GenericModal__button.confirm').should('not.be.disabled').click();
diff --git a/e2e-tests/cypress/tests/integration/channels/multi_team_and_dm/existing_channel_name_spec.js b/e2e-tests/cypress/tests/integration/channels/multi_team_and_dm/existing_channel_name_spec.js
index c075ca6347e..9b4f442bed8 100644
--- a/e2e-tests/cypress/tests/integration/channels/multi_team_and_dm/existing_channel_name_spec.js
+++ b/e2e-tests/cypress/tests/integration/channels/multi_team_and_dm/existing_channel_name_spec.js
@@ -62,7 +62,7 @@ describe('Channel', () => {
cy.get('.url-input-error').should('not.exist');
// * 'Create Channel' button should be enabled
- cy.findByText('Create channel').should('not.have.class', 'disabled');
+ cy.findByRole('button', {name: 'Create channel'}).should('not.be.disabled');
// # Click on Cancel button to move out of New Channel Modal
cy.findByText('Cancel').click();
@@ -92,7 +92,7 @@ function verifyExistingChannelError(newChannelName, makePrivate = false) {
cy.get('.url-input-error').contains('A channel with that URL already exists');
// * 'Create Channel' button should be disabled
- cy.findByText('Create channel').should('have.class', 'disabled');
+ cy.findByRole('button', {name: 'Create channel'}).should('be.disabled');
}
/**
diff --git a/e2e-tests/cypress/tests/integration/channels/system_console/user_management/users_spec.js b/e2e-tests/cypress/tests/integration/channels/system_console/user_management/users_spec.js
index fff50a3a33a..673137e1577 100644
--- a/e2e-tests/cypress/tests/integration/channels/system_console/user_management/users_spec.js
+++ b/e2e-tests/cypress/tests/integration/channels/system_console/user_management/users_spec.js
@@ -70,7 +70,7 @@ describe('System Console > User Management > Users', () => {
// # Type new password and submit.
cy.get('input[type=password]').type('new' + testUser.password);
- cy.get('button.btn-primary.confirm').should('contain', 'Reset').click().wait(TIMEOUTS.HALF_SEC);
+ cy.get('button.GenericModal__button.confirm').should('contain', 'Reset').click().wait(TIMEOUTS.HALF_SEC);
// # Log out.
cy.apiLogout();
@@ -96,7 +96,7 @@ describe('System Console > User Management > Users', () => {
cy.get('input[type=password]').eq(1).type('new' + otherAdmin.password);
// # Click the 'Cancel' button.
- cy.get('.modal-footer > .btn-tertiary').should('contain', 'Cancel').click().wait(TIMEOUTS.HALF_SEC);
+ cy.get('.modal-footer').findByRole('button', {name: 'Cancel'}).click().wait(TIMEOUTS.HALF_SEC);
// # Log out.
cy.apiLogout();
@@ -113,7 +113,7 @@ describe('System Console > User Management > Users', () => {
cy.get('input[type=password]').eq(1).type('new' + otherAdmin.password);
// # Click the 'Reset' button.
- cy.get('button.btn-primary.confirm').should('contain', 'Reset').click().wait(TIMEOUTS.HALF_SEC);
+ cy.get('button.GenericModal__button.confirm').should('contain', 'Reset').click().wait(TIMEOUTS.HALF_SEC);
// * Verify the appropriate error is returned (current password error shows in modal header area).
cy.get('.genericModalError .error').should('be.visible').
@@ -128,7 +128,7 @@ describe('System Console > User Management > Users', () => {
cy.get('input[type=password]').eq(1).type('new');
// # Click the 'Reset' button.
- cy.get('button.btn-primary.confirm').should('contain', 'Reset').click().wait(TIMEOUTS.HALF_SEC);
+ cy.get('button.GenericModal__button.confirm').should('contain', 'Reset').click().wait(TIMEOUTS.HALF_SEC);
// * Verify the appropriate error is returned (new password error shows under the input).
cy.get('.Input___error').should('be.visible').and('contain', 'characters long');
@@ -138,7 +138,7 @@ describe('System Console > User Management > Users', () => {
searchUserAndOpenResetPassword(otherAdmin.username, otherAdmin.email);
// # Click the 'Reset' button.
- cy.get('button.btn-primary.confirm').should('contain', 'Reset').click().wait(TIMEOUTS.HALF_SEC);
+ cy.get('button.GenericModal__button.confirm').should('contain', 'Reset').click().wait(TIMEOUTS.HALF_SEC);
// * Verify the appropriate error is returned (current password missing).
cy.get('.genericModalError .error').should('be.visible').
@@ -148,7 +148,7 @@ describe('System Console > User Management > Users', () => {
cy.get('input[type=password]').eq(0).type(otherAdmin.password);
// # Click the 'Reset' button.
- cy.get('button.btn-primary.confirm').should('contain', 'Reset').click().wait(TIMEOUTS.HALF_SEC);
+ cy.get('button.GenericModal__button.confirm').should('contain', 'Reset').click().wait(TIMEOUTS.HALF_SEC);
// * Verify the appropriate error is returned (new password error shows under the input).
cy.get('.Input___error').should('be.visible').and('contain', 'characters long');
@@ -162,7 +162,7 @@ describe('System Console > User Management > Users', () => {
cy.get('input[type=password]').eq(1).type('new' + otherAdmin.password);
// # Click the 'Reset' button.
- cy.get('button.btn-primary.confirm').should('contain', 'Reset').click().wait(TIMEOUTS.HALF_SEC);
+ cy.get('button.GenericModal__button.confirm').should('contain', 'Reset').click().wait(TIMEOUTS.HALF_SEC);
// # Log out.
cy.apiLogout();
diff --git a/e2e-tests/cypress/tests/integration/channels/system_console/user_management_spec.js b/e2e-tests/cypress/tests/integration/channels/system_console/user_management_spec.js
index 5dbecfefac5..8dc6bd2ca94 100644
--- a/e2e-tests/cypress/tests/integration/channels/system_console/user_management_spec.js
+++ b/e2e-tests/cypress/tests/integration/channels/system_console/user_management_spec.js
@@ -194,7 +194,7 @@ describe('User Management', () => {
// # Set new password.
cy.get('input[type=password]').type('new' + testUser.password);
- cy.get('button.btn-primary.confirm').should('contain', 'Reset').click().wait(TIMEOUTS.HALF_SEC);
+ cy.get('button.GenericModal__button.confirm').should('contain', 'Reset').click().wait(TIMEOUTS.HALF_SEC);
// * Verify Update email option is visible.
cy.get('#systemUsersTable-cell-0_actionsColumn').click().wait(TIMEOUTS.HALF_SEC);
@@ -269,7 +269,7 @@ describe('User Management', () => {
}
// # Click the "Update" button.
- cy.get('button.btn-primary.confirm').click();
+ cy.get('button.GenericModal__button.confirm').click();
// * Check for the error messages, if any.
if (errorMsg.length > 0) {
diff --git a/e2e-tests/playwright/lib/src/ui/components/channels/delete_post_confirmation_dialog.ts b/e2e-tests/playwright/lib/src/ui/components/channels/delete_post_confirmation_dialog.ts
index 5f32a3f3178..a5a603c8681 100644
--- a/e2e-tests/playwright/lib/src/ui/components/channels/delete_post_confirmation_dialog.ts
+++ b/e2e-tests/playwright/lib/src/ui/components/channels/delete_post_confirmation_dialog.ts
@@ -13,7 +13,7 @@ export default class DeletePostConfirmationDialog {
constructor(container: Locator) {
this.container = container;
- this.cancelButton = container.locator('button.btn.btn-tertiary');
+ this.cancelButton = container.getByRole('button', {name: 'Cancel'});
this.confirmButton = container.locator('button#deletePostModalButton');
}
diff --git a/e2e-tests/playwright/lib/src/ui/components/channels/marketplace_modal.ts b/e2e-tests/playwright/lib/src/ui/components/channels/marketplace_modal.ts
index 85b90cc51bc..d58b4b175c2 100644
--- a/e2e-tests/playwright/lib/src/ui/components/channels/marketplace_modal.ts
+++ b/e2e-tests/playwright/lib/src/ui/components/channels/marketplace_modal.ts
@@ -56,7 +56,7 @@ export default class MarketplaceModal {
}
await installButton.click();
- await expect(this.pluginRow(pluginId).getByRole('button', {name: 'Configure'})).toBeVisible({
+ await expect(this.pluginRow(pluginId).getByRole('link', {name: 'Configure'})).toBeVisible({
timeout: duration.one_min,
});
@@ -67,6 +67,6 @@ export default class MarketplaceModal {
* Clicks "Configure" for the given plugin, which navigates to its System Console settings page.
*/
async clickConfigure(pluginId: string) {
- await this.pluginRow(pluginId).getByRole('button', {name: 'Configure'}).click();
+ await this.pluginRow(pluginId).getByRole('link', {name: 'Configure'}).click();
}
}
diff --git a/e2e-tests/playwright/lib/src/ui/components/channels/restore_post_confirmation_dialog.ts b/e2e-tests/playwright/lib/src/ui/components/channels/restore_post_confirmation_dialog.ts
index 9e1ad0ad71d..f5f88728833 100644
--- a/e2e-tests/playwright/lib/src/ui/components/channels/restore_post_confirmation_dialog.ts
+++ b/e2e-tests/playwright/lib/src/ui/components/channels/restore_post_confirmation_dialog.ts
@@ -13,8 +13,8 @@ export default class RestorePostConfirmationDialog {
constructor(container: Locator) {
this.container = container;
- this.cancelButton = container.locator('button.btn.btn-tertiary');
- this.confirmButton = container.locator('button.GenericModal__button.btn.btn-primary.confirm');
+ this.cancelButton = container.getByRole('button', {name: 'Cancel'});
+ this.confirmButton = container.locator('button.GenericModal__button.confirm');
}
async toBeVisible() {
diff --git a/e2e-tests/playwright/specs/accessibility/channels/settings_dialog/notifications.spec.ts b/e2e-tests/playwright/specs/accessibility/channels/settings_dialog/notifications.spec.ts
index 4c420d9baf2..e80e1b17003 100644
--- a/e2e-tests/playwright/specs/accessibility/channels/settings_dialog/notifications.spec.ts
+++ b/e2e-tests/playwright/specs/accessibility/channels/settings_dialog/notifications.spec.ts
@@ -104,9 +104,10 @@ test(
- heading "Notifications" [level=3]
- link "Learn more about notifications":
- /url: https://mattermost.com/pl/about-notifications?utm_source=mattermost&utm_medium=in-product&utm_content=user_settings_notifications&uid=${user.id}&sid=${clientConfig.DiagnosticId}&edition=enterprise&server_version=${clientConfig.Version}
- - img
- heading "Desktop and mobile notifications Permission required" [level=4]:
+ - text: ""
- img
+ - text: ""
- button "Desktop and mobile notifications Permission required Edit"
- text: Mentions, direct messages, and group messages
- heading "Desktop notification sounds" [level=4]
@@ -114,6 +115,7 @@ test(
- text: "\\"Bing\\" for messages"
- heading "Email notifications" [level=4]
- button "Email notifications Edit"
+ - text: "On"
- heading "Auto-follow threads on channel-wide mentions" [level=4]
- button "Auto-follow threads on channel-wide mentions Edit"
- text: "On"
@@ -122,6 +124,7 @@ test(
- text: "\\"@${user.username}\\", \\"@channel\\", \\"@all\\", \\"@here\\""
- heading "Keywords that get highlighted (without notifications)" [level=4]
- button "Keywords that get highlighted (without notifications) Edit"
+ - text: None
- heading "Troubleshooting notifications" [level=4]
- text: Not receiving notifications? Start by sending a test notification to all your devices to check if they’re working as expected. If issues persist, explore ways to solve them with troubleshooting steps.
- button "Send a test notification"
diff --git a/webapp/AGENTS.md b/webapp/AGENTS.md
index f3fdbcaa4a8..c65edc4c49a 100644
--- a/webapp/AGENTS.md
+++ b/webapp/AGENTS.md
@@ -12,6 +12,7 @@ Follow `webapp/STYLE_GUIDE.md` for canonical style, accessibility, and testing s
- **New UI**: prefer `@mattermost/compass-ui` when a published (on npm) component exists. Import via subpaths:
`import {Button} from '@mattermost/compass-ui/components/button';`
Do not use the root barrel. Do not recreate Compass primitives.
+- **Button**: use Compass UI for text-based button UI. Do not use `@mattermost/shared` `Button` (removed); `buttonClassNames` from `@mattermost/shared/components/button` remains for menu triggers and similar class-only cases. Sizes: `x-small` / `small` / `medium` / `large`. Use `destructive` (boolean) and `appearance="inverted"` for those styles. For link-styled CTAs, use `asChild` with a single `` or router `Link` child instead of nesting a button.
- **Do not mass-migrate** existing UI components to Compass. Only switch when building new UI or when the task is an intentional migration of the code you are already changing.
- **`@mattermost/compass-proto`**: prototyping package not published to npm (shells, call composites, hardcoded menu recipes, proto `WithTooltip`). Not for Mattermost webapp product code — do not add the dependency or import from it unless explicitly adopting that package. Prefer existing webapp / shared / MUI stacks for those surfaces.
- **Exceptions (keep current stacks)**: icons → `@mattermost/compass-icons`; emoji → `Emoji` (`@mattermost/shared`); modals → existing shared / `GenericModal`; menus → existing MUI menus. Do not switch Modal/Menu to compass-ui yet.
diff --git a/webapp/CLAUDE.OPTIONAL.md b/webapp/CLAUDE.OPTIONAL.md
index c4cbeca2b01..bbfbfd742ee 100644
--- a/webapp/CLAUDE.OPTIONAL.md
+++ b/webapp/CLAUDE.OPTIONAL.md
@@ -67,7 +67,7 @@ import Client4 from '../platform/client/src/client4.ts';
- **React Router 5.3**: Client-side routing
- **React Intl**: Internationalization
- **Floating UI**: Tooltips and popovers (prefer `WithTooltip` from `@mattermost/shared/components/tooltip`)
-- **@mattermost/compass-ui**: Published Compass UI components (prefer `Button` from `@mattermost/compass-ui/components/button` over hand-rolled or shared Button)
+- **@mattermost/compass-ui**: Published Compass UI components (prefer `Button` from `@mattermost/compass-ui/components/button` over hand-rolled or shared Button; shared `Button` is removed, `buttonClassNames` remains for class-only cases)
- **@mattermost/shared**: Shared components and utilities (`WithTooltip`, `Emoji`, etc.) — use where `webapp/AGENTS.md` specifies them
- **@mattermost/compass-icons**: Icon library (prefer over font-awesome)
- **Monaco Editor**: Code editor integration
diff --git a/webapp/STYLE_GUIDE.md b/webapp/STYLE_GUIDE.md
index efe3e276c34..254ff6d5649 100644
--- a/webapp/STYLE_GUIDE.md
+++ b/webapp/STYLE_GUIDE.md
@@ -102,7 +102,7 @@ The following guidelines should be applied to both new and existing code. Howeve
- **React Bootstrap**: Avoid using React Bootstrap directly.
- **Modals**: Use `GenericModal` from `@mattermost/components` instead of React Bootstrap's `Modal`.
- - **Buttons**: Use `Button` from `@mattermost/compass-ui/components/button` instead of React Bootstrap's `Button` or raw Bootstrap like ``. For when to adopt Compass vs leave existing UI components, see `webapp/AGENTS.md` (do not mass-migrate).
+ - **Buttons**: Use `Button` from `@mattermost/compass-ui/components/button` instead of React Bootstrap's `Button`, raw Bootstrap like ``, or the removed `@mattermost/shared` `Button`. For navigational CTAs, pass `asChild` with a single `` or router `Link` child. `buttonClassNames` from `@mattermost/shared/components/button` remains for menu triggers and other class-only styling. For when to adopt Compass vs leave existing UI components, see `webapp/AGENTS.md` (do not mass-migrate).
- **Tooltips**: Use `WithTooltip` from `@mattermost/shared` instead of React Bootstrap's `OverlayTrigger`, `Tooltip`, Floating UI, or other tooltip primitives.
- **MUI**: Consult with the team before using MUI. If it is used, wrap the usage in another component to avoid leaking implementation details.
- **Popovers**: Use `WithTooltip` for simple tooltips. Use Floating UI for more advanced overlays.
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 98b23902937..bed8693f534 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
@@ -68,22 +68,52 @@ exports[`components/GetLinkModal should have called onHide when close button is
class="modal-footer"
>
- Close
+
+ Close
+
-
- Copied
+
+
+
+
+ Copied
+
@@ -160,22 +190,52 @@ exports[`components/GetLinkModal should have called onHide when close button is
class="modal-footer"
>
- Close
+
+ Close
+
-
- Copy Link
+
+
+
+
+ Copy Link
+
@@ -257,22 +317,52 @@ exports[`components/GetLinkModal should match snapshot when all props is set 1`]
class="modal-footer"
>
- Close
+
+ Close
+
-
- Copy Link
+
+
+
+
+ Copy Link
+
@@ -349,22 +439,52 @@ exports[`components/GetLinkModal should match snapshot when helpText is not set
class="modal-footer"
>
- Close
+
+ Close
+
-
- Copy Link
+
+
+
+
+ Copy Link
+
diff --git a/webapp/channels/src/components/__snapshots__/list_modal.test.tsx.snap b/webapp/channels/src/components/__snapshots__/list_modal.test.tsx.snap
index 15bed1551ec..0163a068a9b 100644
--- a/webapp/channels/src/components/__snapshots__/list_modal.test.tsx.snap
+++ b/webapp/channels/src/components/__snapshots__/list_modal.test.tsx.snap
@@ -175,9 +175,14 @@ exports[`components/ListModal should match snapshot with title bar button 1`] =
- Add Foo
+
+ Add Foo
+
diff --git a/webapp/channels/src/components/__snapshots__/save_button.test.tsx.snap b/webapp/channels/src/components/__snapshots__/save_button.test.tsx.snap
index 42afb762be5..61006aafbec 100644
--- a/webapp/channels/src/components/__snapshots__/save_button.test.tsx.snap
+++ b/webapp/channels/src/components/__snapshots__/save_button.test.tsx.snap
@@ -3,12 +3,14 @@
exports[`components/SaveButton should match snapshot, extraClasses 1`] = `
-
+
Save
@@ -18,12 +20,14 @@ exports[`components/SaveButton should match snapshot, extraClasses 1`] = `
exports[`components/SaveButton should match snapshot, on defaultMessage 1`] = `
-
+
Save
@@ -33,12 +37,14 @@ exports[`components/SaveButton should match snapshot, on defaultMessage 1`] = `
exports[`components/SaveButton should match snapshot, on defaultMessage 2`] = `
-
+
Go
@@ -48,21 +54,26 @@ exports[`components/SaveButton should match snapshot, on defaultMessage 2`] = `
exports[`components/SaveButton should match snapshot, on savingMessage 1`] = `
+
+
Saving
@@ -72,21 +83,26 @@ exports[`components/SaveButton should match snapshot, on savingMessage 1`] = `
exports[`components/SaveButton should match snapshot, on savingMessage 2`] = `
+
+
Saving Config...
diff --git a/webapp/channels/src/components/__snapshots__/setting_item_max.test.tsx.snap b/webapp/channels/src/components/__snapshots__/setting_item_max.test.tsx.snap
index d8ca91faef2..b0e51d6c14c 100644
--- a/webapp/channels/src/components/__snapshots__/setting_item_max.test.tsx.snap
+++ b/webapp/channels/src/components/__snapshots__/setting_item_max.test.tsx.snap
@@ -3,7 +3,7 @@
exports[`components/SettingItemMax should match snapshot 1`] = `
@@ -57,7 +68,7 @@ exports[`components/SettingItemMax should match snapshot 1`] = `
exports[`components/SettingItemMax should match snapshot, on clientError 1`] = `
@@ -111,7 +133,7 @@ exports[`components/SettingItemMax should match snapshot, on clientError 1`] = `
exports[`components/SettingItemMax should match snapshot, on serverError 1`] = `
{serverError && (
diff --git a/webapp/channels/src/components/admin_console/admin_settings/__snapshots__/admin_setting.test.tsx.snap b/webapp/channels/src/components/admin_console/admin_settings/__snapshots__/admin_setting.test.tsx.snap
index e0337db3539..e307547131c 100644
--- a/webapp/channels/src/components/admin_console/admin_settings/__snapshots__/admin_setting.test.tsx.snap
+++ b/webapp/channels/src/components/admin_console/admin_settings/__snapshots__/admin_setting.test.tsx.snap
@@ -20,13 +20,15 @@ exports[`AdminSettings should match snapshot 1`] = `
class="admin-console-save"
>
-
+
Save
diff --git a/webapp/channels/src/components/admin_console/admin_user_card/admin_user_card.scss b/webapp/channels/src/components/admin_console/admin_user_card/admin_user_card.scss
index 702edeb15e1..999d7075444 100644
--- a/webapp/channels/src/components/admin_console/admin_user_card/admin_user_card.scss
+++ b/webapp/channels/src/components/admin_console/admin_user_card/admin_user_card.scss
@@ -83,9 +83,11 @@ input.AdminUserCard__picture-input[type='file'] {
.AdminUserCard__footer {
display: flex;
flex-direction: row;
+ align-items: center;
padding: 20px;
border-top: solid 1px rgba(0, 0, 0, 0.2);
background-color: #fff;
+ gap: 8px;
}
.AdminUserCard__user-info {
diff --git a/webapp/channels/src/components/admin_console/audits/audits.tsx b/webapp/channels/src/components/admin_console/audits/audits.tsx
index b8f70380c1a..9504fdeabb1 100644
--- a/webapp/channels/src/components/admin_console/audits/audits.tsx
+++ b/webapp/channels/src/components/admin_console/audits/audits.tsx
@@ -5,7 +5,7 @@ import React, {useEffect, useState, memo, useCallback} from 'react';
import type {CSSProperties} from 'react';
import {FormattedMessage, defineMessages} from 'react-intl';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import type {Audit} from '@mattermost/types/audits';
import type {ActionResult} from 'mattermost-redux/types/actions';
diff --git a/webapp/channels/src/components/admin_console/billing/billing_subscriptions/cancel_subscription.tsx b/webapp/channels/src/components/admin_console/billing/billing_subscriptions/cancel_subscription.tsx
index a07e7c6e76c..dcf58f3ecc5 100644
--- a/webapp/channels/src/components/admin_console/billing/billing_subscriptions/cancel_subscription.tsx
+++ b/webapp/channels/src/components/admin_console/billing/billing_subscriptions/cancel_subscription.tsx
@@ -4,7 +4,7 @@
import React from 'react';
import {FormattedMessage} from 'react-intl';
-import {buttonClassNames} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import {useOpenCloudZendeskSupportForm} from 'components/common/hooks/useOpenZendeskForm';
import ExternalLink from 'components/external_link';
@@ -28,16 +28,23 @@ const CancelSubscription = () => {
defaultMessage='At this time, deleting a workspace can only be done with the help of a customer support representative.'
/>
-
-
-
+
+
+
+
);
diff --git a/webapp/channels/src/components/admin_console/billing/billing_subscriptions/contact_sales_card.tsx b/webapp/channels/src/components/admin_console/billing/billing_subscriptions/contact_sales_card.tsx
index 70eab1e0bb1..a6113fce254 100644
--- a/webapp/channels/src/components/admin_console/billing/billing_subscriptions/contact_sales_card.tsx
+++ b/webapp/channels/src/components/admin_console/billing/billing_subscriptions/contact_sales_card.tsx
@@ -4,7 +4,7 @@
import React from 'react';
import {FormattedMessage} from 'react-intl';
-import {Button, buttonClassNames} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import useOpenSalesLink from 'components/common/hooks/useOpenSalesLink';
import CloudTrialSvg from 'components/common/svg_images_components/cloud_trial_svg';
@@ -140,17 +140,21 @@ const ContactSalesCard = (props: Props) => {
{description}
{(isFreeTrial || subscriptionPlan === CloudProducts.ENTERPRISE || isCloudLegacyPlan) &&
-
-
-
-
+
+
+
+
}
{(!isFreeTrial && subscriptionPlan !== CloudProducts.ENTERPRISE && subscriptionPlan !== CloudProducts.LEGACY) &&
-
-
-
+
+
+
+
);
@@ -115,17 +121,17 @@ export const FreeTrial = ({daysLeftOnTrial}: FreeTrialProps) => {
/>
}
- openSalesLink()}
- className={buttonClassNames({emphasis: 'primary'}, 'UpgradeMattermostCloud__upgradeButton')}
>
-
-
+
);
};
@@ -337,16 +343,18 @@ export const InvoiceInfo = ({invoice, product, fullCharges, partialCharges, hasM
- }/>}
>
-
-
+
- }/>}
>
-
-
-
+
+
+
+
);
@@ -41,15 +46,18 @@ const noCompanyInfoSection = (
defaultMessage='There is currently no company information on file.'
/>
-
-
-
+
+
+
+
);
diff --git a/webapp/channels/src/components/admin_console/billing/company_info_edit.tsx b/webapp/channels/src/components/admin_console/billing/company_info_edit.tsx
index e604772cd3e..f5472052f21 100644
--- a/webapp/channels/src/components/admin_console/billing/company_info_edit.tsx
+++ b/webapp/channels/src/components/admin_console/billing/company_info_edit.tsx
@@ -7,7 +7,7 @@ import {defineMessage, FormattedMessage} from 'react-intl';
import {useDispatch, useSelector} from 'react-redux';
import {useHistory} from 'react-router-dom';
-import {buttonClassNames} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import {getCloudCustomer, updateCloudCustomer, updateCloudCustomerAddress} from 'mattermost-redux/actions/cloud';
@@ -285,15 +285,17 @@ const CompanyInfoEdit: React.FC = () => {
/>
)}
/>
-
-
-
+
+
+
+
);
diff --git a/webapp/channels/src/components/admin_console/billing/plan_details/plan_details.tsx b/webapp/channels/src/components/admin_console/billing/plan_details/plan_details.tsx
index 31c6bc32a21..73526994209 100644
--- a/webapp/channels/src/components/admin_console/billing/plan_details/plan_details.tsx
+++ b/webapp/channels/src/components/admin_console/billing/plan_details/plan_details.tsx
@@ -4,7 +4,7 @@
import React from 'react';
import {FormattedMessage, useIntl} from 'react-intl';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import useOpenPricingModal from 'components/common/hooks/useOpenPricingModal';
import Tag from 'components/widgets/tag/tag';
diff --git a/webapp/channels/src/components/admin_console/blockable_button/blockable_button.tsx b/webapp/channels/src/components/admin_console/blockable_button/blockable_button.tsx
deleted file mode 100644
index 229cc0a3f5d..00000000000
--- a/webapp/channels/src/components/admin_console/blockable_button/blockable_button.tsx
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
-// See LICENSE.txt for license information.
-
-import React, {useCallback} from 'react';
-import type {MouseEvent} from 'react';
-
-type Props = {
- id?: string;
- activeClassName?: string;
-
- // Bool whether navigation is blocked
- blocked: boolean;
-
- actions: {
-
- // Function for deferring navigation while blocked
- deferNavigation: (func: () => void) => void;
- };
- children?: React.ReactNode;
- className?: string;
- onClick?: (e: React.MouseEvent) => void;
- onCancelConfirmed: () => void;
-};
-
-const BlockableButton = ({blocked, actions, onClick, onCancelConfirmed, ...restProps}: Props) => {
- const handleClick = useCallback((e: MouseEvent) => {
- onClick?.(e);
-
- if (blocked) {
- e.preventDefault();
- actions.deferNavigation(() => {
- onCancelConfirmed();
- });
- }
- }, [actions, blocked, onClick, onCancelConfirmed]);
-
- return (
-
- );
-};
-
-export default React.memo(BlockableButton);
diff --git a/webapp/channels/src/components/admin_console/blockable_button/index.ts b/webapp/channels/src/components/admin_console/blockable_button/index.ts
deleted file mode 100644
index 2a02851efe5..00000000000
--- a/webapp/channels/src/components/admin_console/blockable_button/index.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
-// See LICENSE.txt for license information.
-
-import {connect} from 'react-redux';
-import {bindActionCreators} from 'redux';
-import type {Dispatch} from 'redux';
-
-import {deferNavigation} from 'actions/admin_actions';
-import {getNavigationBlocked} from 'selectors/views/admin';
-
-import type {GlobalState} from 'types/store';
-
-import BlockableButton from './blockable_button';
-
-function mapStateToProps(state: GlobalState) {
- return {
- blocked: getNavigationBlocked(state),
- };
-}
-
-function mapDispatchToProps(dispatch: Dispatch) {
- return {
- actions: bindActionCreators({
- deferNavigation,
- }, dispatch),
- };
-}
-
-export default connect(mapStateToProps, mapDispatchToProps)(BlockableButton);
diff --git a/webapp/channels/src/components/admin_console/blockable_link/blockable_link.tsx b/webapp/channels/src/components/admin_console/blockable_link/blockable_link.tsx
index bd4c416d17a..2e28cfcf33d 100644
--- a/webapp/channels/src/components/admin_console/blockable_link/blockable_link.tsx
+++ b/webapp/channels/src/components/admin_console/blockable_link/blockable_link.tsx
@@ -24,6 +24,7 @@ type Props = {
children?: string | React.ReactNode;
className?: string;
onClick?: (e: React.MouseEvent) => void;
+ 'data-testid'?: string;
};
const BlockableLink = ({blocked, actions, onClick, to, ...restProps}: Props) => {
diff --git a/webapp/channels/src/components/admin_console/board_attributes/board_attributes_delete_modal.tsx b/webapp/channels/src/components/admin_console/board_attributes/board_attributes_delete_modal.tsx
index 30237762e15..ef96ab060ca 100644
--- a/webapp/channels/src/components/admin_console/board_attributes/board_attributes_delete_modal.tsx
+++ b/webapp/channels/src/components/admin_console/board_attributes/board_attributes_delete_modal.tsx
@@ -70,7 +70,7 @@ function RemoveBoardAttributeFieldModal({
return (
) => (
+
+);
export const TableWrapper = styled.div`
table.adminConsoleListTable {
@@ -209,6 +211,7 @@ export const ActionsCell = styled.div`
text-align: right;
`;
+// Native button (not Compass) — hover styles without styled(CompassButton).
export const DeleteButton = styled.button.attrs({className: 'btn btn-sm btn-transparent'})`
&:hover {
background: rgba(var(--error-text-color-rgb, 210, 75, 78), 0.08);
diff --git a/webapp/channels/src/components/admin_console/cluster_table.tsx b/webapp/channels/src/components/admin_console/cluster_table.tsx
index 0e1817279c3..46fb8f15728 100644
--- a/webapp/channels/src/components/admin_console/cluster_table.tsx
+++ b/webapp/channels/src/components/admin_console/cluster_table.tsx
@@ -5,7 +5,7 @@ import React, {PureComponent} from 'react';
import type {CSSProperties, MouseEvent} from 'react';
import {FormattedMessage} from 'react-intl';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import ReloadIcon from 'components/widgets/icons/fa_reload_icon';
import WarningIcon from 'components/widgets/icons/fa_warning_icon';
diff --git a/webapp/channels/src/components/admin_console/compliance_reports/compliance_reports.tsx b/webapp/channels/src/components/admin_console/compliance_reports/compliance_reports.tsx
index 439d34e6ea4..c8fb6de6cc8 100644
--- a/webapp/channels/src/components/admin_console/compliance_reports/compliance_reports.tsx
+++ b/webapp/channels/src/components/admin_console/compliance_reports/compliance_reports.tsx
@@ -4,7 +4,7 @@
import React, {type JSX} from 'react';
import {FormattedDate, FormattedMessage, FormattedTime, defineMessage} from 'react-intl';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import type {Compliance} from '@mattermost/types/compliance';
import type {UserProfile} from '@mattermost/types/users';
diff --git a/webapp/channels/src/components/admin_console/content_flagging/content_reviewers/team_reviewers_section/team_reviewers_section.tsx b/webapp/channels/src/components/admin_console/content_flagging/content_reviewers/team_reviewers_section/team_reviewers_section.tsx
index 8c310633ebb..93baf47720d 100644
--- a/webapp/channels/src/components/admin_console/content_flagging/content_reviewers/team_reviewers_section/team_reviewers_section.tsx
+++ b/webapp/channels/src/components/admin_console/content_flagging/content_reviewers/team_reviewers_section/team_reviewers_section.tsx
@@ -5,6 +5,7 @@ import React, {useCallback, useEffect, useMemo, useState, type JSX} from 'react'
import {useIntl} from 'react-intl';
import {useDispatch} from 'react-redux';
+import {Button} from '@mattermost/compass-ui/components/button';
import {Switch} from '@mattermost/compass-ui/components/switch';
import type {TeamReviewerSetting} from '@mattermost/types/config';
import type {Team, TeamSearchOpts} from '@mattermost/types/teams';
@@ -198,16 +199,17 @@ export default function TeamReviewers({teamReviewersSetting, onChange, disabled}
const disableAllBtn = useMemo(() => (
-
{intl.formatMessage({id: 'admin.dataSpillage.reviewerSettings.disableAll', defaultMessage: 'Disable for all teams'})}
-
+
), [disabled, intl, handleDisableForAllTeams]);
diff --git a/webapp/channels/src/components/admin_console/custom_plugin_settings/__snapshots__/custom_plugin_settings.test.tsx.snap b/webapp/channels/src/components/admin_console/custom_plugin_settings/__snapshots__/custom_plugin_settings.test.tsx.snap
index b6f71ffdd2b..7d7d7da4d42 100644
--- a/webapp/channels/src/components/admin_console/custom_plugin_settings/__snapshots__/custom_plugin_settings.test.tsx.snap
+++ b/webapp/channels/src/components/admin_console/custom_plugin_settings/__snapshots__/custom_plugin_settings.test.tsx.snap
@@ -349,10 +349,14 @@ exports[`components/admin_console/CustomPluginSettings should match snapshot wit
class="help-text"
>
- Regenerate
+
+ Regenerate
+
-
+
Save
@@ -488,13 +494,15 @@ exports[`components/admin_console/CustomPluginSettings should match snapshot wit
class="admin-console-save"
>
-
+
Save
@@ -856,10 +864,14 @@ exports[`components/admin_console/CustomPluginSettings should match snapshot wit
class="help-text"
>
- Regenerate
+
+ Regenerate
+
-
+
Save
diff --git a/webapp/channels/src/components/admin_console/custom_plugin_settings/enable_plugin_button.tsx b/webapp/channels/src/components/admin_console/custom_plugin_settings/enable_plugin_button.tsx
index 2a04e2a9556..07684ce1492 100644
--- a/webapp/channels/src/components/admin_console/custom_plugin_settings/enable_plugin_button.tsx
+++ b/webapp/channels/src/components/admin_console/custom_plugin_settings/enable_plugin_button.tsx
@@ -171,7 +171,7 @@ export function PluginEnableButton({actions, disabled, homepageUrl, id, saveNeed
defaultMessage='Are you sure you would like to remove the plugin?'
/>
}
- confirmButtonVariant='destructive'
+ destructive={true}
confirmButtonText={
-
+
Save
diff --git a/webapp/channels/src/components/admin_console/data_retention_settings/__snapshots__/data_retention_settings.test.tsx.snap b/webapp/channels/src/components/admin_console/data_retention_settings/__snapshots__/data_retention_settings.test.tsx.snap
index 002ecfcf778..48a42496667 100644
--- a/webapp/channels/src/components/admin_console/data_retention_settings/__snapshots__/data_retention_settings.test.tsx.snap
+++ b/webapp/channels/src/components/admin_console/data_retention_settings/__snapshots__/data_retention_settings.test.tsx.snap
@@ -86,9 +86,14 @@ exports[`components/admin_console/data_retention_settings/data_retention_setting
- Add policy
+
+ Add policy
+
- Run Deletion Job Now
+
+ Run Deletion Job Now
+
- Add policy
+
+ Add policy
+
- Run Deletion Job Now
+
+ Run Deletion Job Now
+
- Add policy
+
+ Add policy
+
- Run Deletion Job Now
+
+ Run Deletion Job Now
+
- Add policy
+
+ Add policy
+
- Run Deletion Job Now
+
+ Run Deletion Job Now
+
-
- Filters
+
+
+
+
+ Filters
+
- Apply
+
+ Apply
+
@@ -426,13 +457,40 @@ exports[`components/admin_console/data_retention_settings/channel_list should ma
class="Filter"
>
-
- Filters
+
+
+
+
+ Filters
+
- Apply
+
+ Apply
+
diff --git a/webapp/channels/src/components/admin_console/data_retention_settings/custom_policy_form/__snapshots__/custom_policy_form.test.tsx.snap b/webapp/channels/src/components/admin_console/data_retention_settings/custom_policy_form/__snapshots__/custom_policy_form.test.tsx.snap
index cce996a0fcd..5f2947b779e 100644
--- a/webapp/channels/src/components/admin_console/data_retention_settings/custom_policy_form/__snapshots__/custom_policy_form.test.tsx.snap
+++ b/webapp/channels/src/components/admin_console/data_retention_settings/custom_policy_form/__snapshots__/custom_policy_form.test.tsx.snap
@@ -200,9 +200,14 @@ exports[`components/admin_console/data_retention_settings/custom_policy_form sho
- Add teams
+
+ Add teams
+
- Add channels
+
+ Add channels
+
-
- Filters
+
+
+
+
+ Filters
+
- Apply
+
+ Apply
+
@@ -598,21 +639,27 @@ exports[`components/admin_console/data_retention_settings/custom_policy_form sho
class="admin-console-save"
>
-
+
Save
- Cancel
+
+ Cancel
+
@@ -814,9 +861,14 @@ exports[`components/admin_console/data_retention_settings/custom_policy_form sho
- Add teams
+
+ Add teams
+
- Add channels
+
+ Add channels
+
-
- Filters
+
+
+
+
+ Filters
+
- Apply
+
+ Apply
+
@@ -1236,21 +1324,27 @@ exports[`components/admin_console/data_retention_settings/custom_policy_form sho
class="admin-console-save"
>
-
+
Save
- Cancel
+
+ Cancel
+
diff --git a/webapp/channels/src/components/admin_console/data_retention_settings/custom_policy_form/custom_policy_form.tsx b/webapp/channels/src/components/admin_console/data_retention_settings/custom_policy_form/custom_policy_form.tsx
index 06e6911c3e9..f5b194242cc 100644
--- a/webapp/channels/src/components/admin_console/data_retention_settings/custom_policy_form/custom_policy_form.tsx
+++ b/webapp/channels/src/components/admin_console/data_retention_settings/custom_policy_form/custom_policy_form.tsx
@@ -5,7 +5,7 @@ import React, {type JSX} from 'react';
import {defineMessages, FormattedMessage, injectIntl} from 'react-intl';
import type {WrappedComponentProps} from 'react-intl';
-import {buttonClassNames} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import type {ChannelWithTeamData} from '@mattermost/types/channels';
import type {
DataRetentionCustomPolicy,
@@ -536,15 +536,17 @@ class CustomPolicyForm extends React.PureComponent {
/>
)}
/>
-
-
-
+
+
+
+
{serverError &&
diff --git a/webapp/channels/src/components/admin_console/data_retention_settings/global_policy_form/__snapshots__/global_policy_form.test.tsx.snap b/webapp/channels/src/components/admin_console/data_retention_settings/global_policy_form/__snapshots__/global_policy_form.test.tsx.snap
index 461d78ee141..beb4b31d9dc 100644
--- a/webapp/channels/src/components/admin_console/data_retention_settings/global_policy_form/__snapshots__/global_policy_form.test.tsx.snap
+++ b/webapp/channels/src/components/admin_console/data_retention_settings/global_policy_form/__snapshots__/global_policy_form.test.tsx.snap
@@ -239,21 +239,27 @@ exports[`components/PluginManagement should match snapshot 1`] = `
class="admin-console-save"
>
-
+
Save
- Cancel
+
+ Cancel
+
diff --git a/webapp/channels/src/components/admin_console/data_retention_settings/global_policy_form/global_policy_form.tsx b/webapp/channels/src/components/admin_console/data_retention_settings/global_policy_form/global_policy_form.tsx
index e6a7606401b..6cce8b7c540 100644
--- a/webapp/channels/src/components/admin_console/data_retention_settings/global_policy_form/global_policy_form.tsx
+++ b/webapp/channels/src/components/admin_console/data_retention_settings/global_policy_form/global_policy_form.tsx
@@ -4,7 +4,7 @@
import React, {type JSX} from 'react';
import {defineMessages, FormattedMessage} from 'react-intl';
-import {buttonClassNames} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import type {AdminConfig, EnvironmentConfig} from '@mattermost/types/config';
import type {DeepPartial} from '@mattermost/types/utilities';
@@ -273,15 +273,17 @@ export default class GlobalPolicyForm extends React.PureComponent
/>
)}
/>
-
-
-
+
+
+
+
{this.state.serverError &&
diff --git a/webapp/channels/src/components/admin_console/file_upload_setting.tsx b/webapp/channels/src/components/admin_console/file_upload_setting.tsx
index 5b3fbebf00d..37d865b7971 100644
--- a/webapp/channels/src/components/admin_console/file_upload_setting.tsx
+++ b/webapp/channels/src/components/admin_console/file_upload_setting.tsx
@@ -4,7 +4,7 @@
import React, {memo, useCallback, useEffect, useRef, useState} from 'react';
import {FormattedMessage} from 'react-intl';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import * as Utils from 'utils/utils';
diff --git a/webapp/channels/src/components/admin_console/filter/filter.scss b/webapp/channels/src/components/admin_console/filter/filter.scss
index c3aac90eb1f..623aaf5b619 100644
--- a/webapp/channels/src/components/admin_console/filter/filter.scss
+++ b/webapp/channels/src/components/admin_console/filter/filter.scss
@@ -3,29 +3,14 @@
display: inline-block;
padding-left: 8px;
- .Filter_button {
- width: auto;
- height: 32px;
- padding: 0 10px;
- border: 0;
- border-radius: 4px;
- background: var(--sys-center-channel-bg);
- color: var(--sys-button-bg);
- font-size: 12px;
-
- &.Filter__active,
- &:focus {
- background: rgba(var(--sys-button-bg-rgb), 0.12);
- }
-
- &:hover {
- background: rgba(var(--sys-button-bg-rgb), 0.06);
- }
- }
-
- .Icon {
- margin-right: 2px;
- font-size: 14px;
+ // Held-open state. Compass's :active is momentary, so drive this off
+ // aria-expanded, which is already the source of truth for the popover.
+ // The :hover variant is spelled out because Compass's own hover rule has
+ // the same specificity as the bare one and would otherwise win on order,
+ // and the tint has to clear the 8% resting tertiary to read as a state.
+ .Filter_button[aria-expanded='true'],
+ .Filter_button[aria-expanded='true']:hover {
+ background-color: rgba(var(--link-color-rgb), 0.24);
}
.Filter_content {
diff --git a/webapp/channels/src/components/admin_console/filter/filter.tsx b/webapp/channels/src/components/admin_console/filter/filter.tsx
index 30c6ca4c86c..09bb2b2bf82 100644
--- a/webapp/channels/src/components/admin_console/filter/filter.tsx
+++ b/webapp/channels/src/components/admin_console/filter/filter.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 {FilterVariantIcon} from '@mattermost/compass-icons/components';
+import {Button} from '@mattermost/compass-ui/components/button';
+import {Icon} from '@mattermost/compass-ui/components/icon';
import FilterList from './filter_list';
@@ -190,20 +192,22 @@ class Filter extends React.PureComponent {
className='Filter'
ref={this.filterRef}
>
- }/>}
>
-
-
{filterCount > 0 && ` (${filterCount})`}
-
+
{
- onChannelResourceChange({...DEFAULT_CHANNEL_RESOURCE_CONFIG})}
disabled={disabled}
data-testid='appliesToAddResource'
+ leadingIcon={}/>}
>
-
-
+
)}
diff --git a/webapp/channels/src/components/admin_console/global_attributes/applies_to/channels/channels_resource_row.scss b/webapp/channels/src/components/admin_console/global_attributes/applies_to/channels/channels_resource_row.scss
index 6d1195040e1..998212a138c 100644
--- a/webapp/channels/src/components/admin_console/global_attributes/applies_to/channels/channels_resource_row.scss
+++ b/webapp/channels/src/components/admin_console/global_attributes/applies_to/channels/channels_resource_row.scss
@@ -54,7 +54,7 @@
}
}
-.btn.btn-sm.ChannelsResourceRow__remove {
+.ChannelsResourceRow__remove {
height: 32px;
flex-shrink: 0;
align-self: center;
diff --git a/webapp/channels/src/components/admin_console/global_attributes/applies_to/channels/channels_resource_row.tsx b/webapp/channels/src/components/admin_console/global_attributes/applies_to/channels/channels_resource_row.tsx
index b855a679a80..2640f23d061 100644
--- a/webapp/channels/src/components/admin_console/global_attributes/applies_to/channels/channels_resource_row.tsx
+++ b/webapp/channels/src/components/admin_console/global_attributes/applies_to/channels/channels_resource_row.tsx
@@ -6,7 +6,7 @@ import React, {useMemo, useState} from 'react';
import {defineMessages, FormattedMessage, useIntl} from 'react-intl';
import {ChevronDownIcon, ChevronRightIcon} from '@mattermost/compass-icons/components';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import ChannelsResourceSettings from './channels_resource_settings';
import {summarizeChannelResource} from './summary';
@@ -79,8 +79,8 @@ const ChannelsResourceRow = ({value, onChange, onRemove, ordered, disabled}: Pro
}
/>
-
-
-
+
+
+
+
{errorKind && (
((props, ref) => {
+ const {children, ...rest} = props;
+ return (
+ }/>}
+ trailingIcon={}/>}
+ >
+ {children}
+
+ );
+});
+ExternalSourceMenuTrigger.displayName = 'ExternalSourceMenuTrigger';
+
const LINK_MODAL_IDS: Record = {
ldap: ModalIdentifiers.ATTRIBUTE_MODAL_LDAP,
saml: ModalIdentifiers.ATTRIBUTE_MODAL_SAML,
@@ -231,15 +249,11 @@ function AttributeExternalSource({links, fieldType, onLink, disabled = false, di
-
-
-
- >
+
),
dataTestId: 'attributeExternalSourceTrigger',
}}
diff --git a/webapp/channels/src/components/admin_console/global_attributes/attribute_details/attribute_remove_applies_to_warning_modal.tsx b/webapp/channels/src/components/admin_console/global_attributes/attribute_details/attribute_remove_applies_to_warning_modal.tsx
index 92f60ac815a..83a1bbc38bf 100644
--- a/webapp/channels/src/components/admin_console/global_attributes/attribute_details/attribute_remove_applies_to_warning_modal.tsx
+++ b/webapp/channels/src/components/admin_console/global_attributes/attribute_details/attribute_remove_applies_to_warning_modal.tsx
@@ -79,7 +79,7 @@ function ConfirmRemoveAppliesToModal({resourceTypes, onConfirm, onCancel, onExit
return (
{
const confirm = screen.getByRole('button', {name: 'Delete'});
expect(confirm).toHaveClass('delete');
- expect(confirm).toHaveClass('btn-danger');
});
it('uses the singular surviving-child lead for the diamond fixture', () => {
diff --git a/webapp/channels/src/components/admin_console/global_attributes/attribute_details/graph/delete_modal.tsx b/webapp/channels/src/components/admin_console/global_attributes/attribute_details/graph/delete_modal.tsx
index b5f3d248e3b..211828b2250 100644
--- a/webapp/channels/src/components/admin_console/global_attributes/attribute_details/graph/delete_modal.tsx
+++ b/webapp/channels/src/components/admin_console/global_attributes/attribute_details/graph/delete_modal.tsx
@@ -177,7 +177,7 @@ function AttributeGraphDeleteModal({optionName, options, onConfirm, onExited}: P
compassDesign={true}
modalHeaderText={formatMessage(messages.safeTitle, {name: model.optionName})}
confirmButtonText={formatMessage(messages.deleteValue)}
- confirmButtonVariant='destructive'
+ destructive={true}
handleCancel={noop}
handleConfirm={onConfirm}
onExited={onExited}
diff --git a/webapp/channels/src/components/admin_console/global_attributes/attribute_details/graph/draft_forms.tsx b/webapp/channels/src/components/admin_console/global_attributes/attribute_details/graph/draft_forms.tsx
index ff8a677c261..f9a253cb301 100644
--- a/webapp/channels/src/components/admin_console/global_attributes/attribute_details/graph/draft_forms.tsx
+++ b/webapp/channels/src/components/admin_console/global_attributes/attribute_details/graph/draft_forms.tsx
@@ -5,7 +5,7 @@ import React from 'react';
import {defineMessages, FormattedMessage, useIntl} from 'react-intl';
import {PlusIcon} from '@mattermost/compass-icons/components';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import Input from 'components/widgets/inputs/input/input';
@@ -87,7 +87,7 @@ export const AddTopLevelForm = ({
diff --git a/webapp/channels/src/components/admin_console/global_attributes/attribute_details/graph/graph_values.scss b/webapp/channels/src/components/admin_console/global_attributes/attribute_details/graph/graph_values.scss
index 0e7e2119c2c..e6e7218d475 100644
--- a/webapp/channels/src/components/admin_console/global_attributes/attribute_details/graph/graph_values.scss
+++ b/webapp/channels/src/components/admin_console/global_attributes/attribute_details/graph/graph_values.scss
@@ -356,9 +356,6 @@
margin: 0;
}
- .btn + .btn {
- margin-left: 0;
- }
}
.attribute-options-graph-values__add-top {
@@ -374,7 +371,7 @@
flex: 1 1 auto;
}
- .btn {
+ button {
flex-shrink: 0;
}
}
diff --git a/webapp/channels/src/components/admin_console/global_attributes/attribute_details/graph/graph_values.test.tsx b/webapp/channels/src/components/admin_console/global_attributes/attribute_details/graph/graph_values.test.tsx
index 3131f843b42..f10e96562f9 100644
--- a/webapp/channels/src/components/admin_console/global_attributes/attribute_details/graph/graph_values.test.tsx
+++ b/webapp/channels/src/components/admin_console/global_attributes/attribute_details/graph/graph_values.test.tsx
@@ -70,7 +70,7 @@ describe('AttributeOptionsGraphValues', () => {
expect(screen.getByText('Start with a top-level value. You can add parents and children from its row.')).toBeInTheDocument();
expect(screen.getByText('Up to 100 parents per value, 100 levels deep.')).toBeInTheDocument();
expect(screen.getByTestId('attributeOptionsGraphEmpty__addButton')).toBeDisabled();
- expect(screen.getByTestId('attributeOptionsGraphEmpty__addButton')).toHaveClass('btn-primary');
+ expect(screen.getByTestId('attributeOptionsGraphEmpty__addButton').className).toMatch(/button--emphasis-primary/);
expect(screen.getByTestId('attributeOptionsGraphEmpty__nameInput')).toHaveAttribute('placeholder', 'Value name');
expect(screen.queryByTestId('attributeOptionsGraphList')).not.toBeInTheDocument();
});
@@ -163,7 +163,7 @@ describe('AttributeOptionsGraphValues', () => {
expect(screen.queryByTestId('attributeOptionsGraphEmpty')).not.toBeInTheDocument();
expect(screen.getByTestId('attributeOptionsGraphList')).toBeInTheDocument();
expect(screen.getByTestId('attributeOptionsGraphAddTop__nameInput')).toHaveAttribute('placeholder', 'Add a top-level value');
- expect(screen.getByTestId('attributeOptionsGraphAddTop__addButton')).toHaveClass('btn-secondary');
+ expect(screen.getByTestId('attributeOptionsGraphAddTop__addButton').className).toMatch(/button--emphasis-secondary/);
expect(screen.getByTestId('attributeOptionsGraphAddTop__addButton')).toBeDisabled();
const row = getRow('Root');
@@ -186,8 +186,8 @@ describe('AttributeOptionsGraphValues', () => {
await userEvent.type(screen.getByTestId('attributeOptionsGraphAddTop__nameInput'), 'Trunk');
expect(screen.getByTestId('attributeOptionsGraphAddTop__addButton')).not.toBeDisabled();
- expect(screen.getByTestId('attributeOptionsGraphAddTop__addButton')).toHaveClass('btn-secondary');
- expect(screen.getByTestId('attributeOptionsGraphAddTop__addButton')).not.toHaveClass('btn-primary');
+ expect(screen.getByTestId('attributeOptionsGraphAddTop__addButton').className).toMatch(/button--emphasis-secondary/);
+ expect(screen.getByTestId('attributeOptionsGraphAddTop__addButton').className).not.toMatch(/button--emphasis-primary/);
});
it('adds a trimmed child from the overflow menu as an indented sibling row', async () => {
diff --git a/webapp/channels/src/components/admin_console/global_attributes/classification_attribute/classification_attribute.tsx b/webapp/channels/src/components/admin_console/global_attributes/classification_attribute/classification_attribute.tsx
index a4996e031e2..9bc615cfccc 100644
--- a/webapp/channels/src/components/admin_console/global_attributes/classification_attribute/classification_attribute.tsx
+++ b/webapp/channels/src/components/admin_console/global_attributes/classification_attribute/classification_attribute.tsx
@@ -8,7 +8,7 @@ import {Link} from 'react-router-dom';
import type {ClientError} from '@mattermost/client';
import {ChevronLeftIcon, OpenInNewIcon, SortAscendingIcon} from '@mattermost/compass-icons/components';
-import {buttonClassNames} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import type {PropertyField, PropertyFieldOption} from '@mattermost/types/properties';
import {Client4} from 'mattermost-redux/client';
@@ -483,17 +483,23 @@ export default function ClassificationAttribute({disabled = false}: Props): JSX.
@@ -520,13 +526,15 @@ export default function ClassificationAttribute({disabled = false}: Props): JSX.
onClick={handleSave}
defaultMessage={ }
/>
-
-
-
+
+
+
+
{saveFailed && (
{
getHistory().push(ATTRIBUTE_DETAILS_ROUTE);
}}
data-testid='newAttributeButton'
+ leadingIcon={}/>}
>
-
-
-
-
+
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
+
+
@@ -766,24 +788,32 @@ exports[`components/admin_console/group_settings/group_details/GroupDetails shou
1 - 20 of 20
-
+
+
+
-
+
+
+
@@ -794,22 +824,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
+
+
@@ -1174,24 +1214,32 @@ exports[`components/admin_console/group_settings/group_details/GroupDetails shou
1 - 20 of 20
-
+
+
+
-
+
+
+
@@ -1202,22 +1250,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
+
+
@@ -1580,24 +1638,32 @@ exports[`components/admin_console/group_settings/group_details/GroupDetails shou
1 - 20 of 20
-
+
+
+
-
+
+
+
@@ -1608,22 +1674,28 @@ exports[`components/admin_console/group_settings/group_details/GroupDetails shou
class="admin-console-save"
>
-
+
Save
- Cancel
+
+ Cancel
+
- Remove
+
+ Remove
+
@@ -113,11 +117,15 @@ exports[`components/admin_console/group_settings/group_details/GroupTeamsAndChan
class="text-right"
>
- Remove
+
+ Remove
+
@@ -144,11 +152,15 @@ exports[`components/admin_console/group_settings/group_details/GroupTeamsAndChan
class="text-right"
>
- Remove
+
+ Remove
+
@@ -175,11 +187,15 @@ exports[`components/admin_console/group_settings/group_details/GroupTeamsAndChan
class="text-right"
>
- Remove
+
+ Remove
+
@@ -210,11 +226,15 @@ exports[`components/admin_console/group_settings/group_details/GroupTeamsAndChan
class="text-right"
>
- Remove
+
+ Remove
+
@@ -285,11 +305,15 @@ exports[`components/admin_console/group_settings/group_details/GroupTeamsAndChan
class="text-right"
>
- Remove
+
+ Remove
+
@@ -360,11 +384,15 @@ exports[`components/admin_console/group_settings/group_details/GroupTeamsAndChan
class="text-right"
>
- Remove
+
+ Remove
+
diff --git a/webapp/channels/src/components/admin_console/group_settings/group_details/__snapshots__/group_teams_and_channels_row.test.tsx.snap b/webapp/channels/src/components/admin_console/group_settings/group_details/__snapshots__/group_teams_and_channels_row.test.tsx.snap
index 2a7d0d36b25..5043cb77b8f 100644
--- a/webapp/channels/src/components/admin_console/group_settings/group_details/__snapshots__/group_teams_and_channels_row.test.tsx.snap
+++ b/webapp/channels/src/components/admin_console/group_settings/group_details/__snapshots__/group_teams_and_channels_row.test.tsx.snap
@@ -71,11 +71,15 @@ exports[`components/admin_console/group_settings/group_details/GroupTeamsAndChan
class="text-right"
>
- Remove
+
+ Remove
+
@@ -111,11 +115,15 @@ exports[`components/admin_console/group_settings/group_details/GroupTeamsAndChan
class="text-right"
>
- Remove
+
+ Remove
+
@@ -170,11 +178,15 @@ exports[`components/admin_console/group_settings/group_details/GroupTeamsAndChan
class="text-right"
>
- Remove
+
+ Remove
+
@@ -210,11 +222,15 @@ exports[`components/admin_console/group_settings/group_details/GroupTeamsAndChan
class="text-right"
>
- Remove
+
+ Remove
+
@@ -254,11 +270,15 @@ exports[`components/admin_console/group_settings/group_details/GroupTeamsAndChan
class="text-right"
>
- Remove
+
+ Remove
+
@@ -298,11 +318,15 @@ exports[`components/admin_console/group_settings/group_details/GroupTeamsAndChan
class="text-right"
>
- Remove
+
+ Remove
+
diff --git a/webapp/channels/src/components/admin_console/group_settings/group_details/__snapshots__/group_users.test.tsx.snap b/webapp/channels/src/components/admin_console/group_settings/group_details/__snapshots__/group_users.test.tsx.snap
index ef9981811a8..b722f08f2ec 100644
--- a/webapp/channels/src/components/admin_console/group_settings/group_details/__snapshots__/group_users.test.tsx.snap
+++ b/webapp/channels/src/components/admin_console/group_settings/group_details/__snapshots__/group_users.test.tsx.snap
@@ -855,24 +855,32 @@ exports[`components/admin_console/group_settings/group_details/GroupUsers should
1 - 20 of 20
-
+
+
+
-
+
+
+
@@ -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
- Restart Server
+
+ Restart Server
+
@@ -566,9 +575,14 @@ exports[`components/admin_console/license_settings/LicenseSettings load screen w
class="purchase-card"
>
- Contact Sales
+
+ Contact Sales
+
@@ -940,18 +954,24 @@ exports[`components/admin_console/license_settings/LicenseSettings load screen w
+
+
Upgrading 42%
@@ -1068,9 +1088,14 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
class="purchase-card"
>
- Contact Sales
+
+ Contact Sales
+
@@ -1103,10 +1128,15 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
- View plans
+
+ View plans
+
- + Add seats
+
+ + Add seats
+
- Add a new license
+
+ Add a new license
+
- Remove license and downgrade to Mattermost Free
+
+ Remove license and downgrade to Mattermost Free
+
@@ -1611,15 +1655,16 @@ See ENTERPRISE-EDITION-LICENSE.txt in your root install directory for details. S
@@ -1731,9 +1776,14 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
class="purchase-card"
>
- Contact Sales
+
+ Contact Sales
+
@@ -1766,10 +1816,15 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
- View plans
+
+ View plans
+
- + Add seats
+
+ + Add seats
+
- Add a new license
+
+ Add a new license
+
- Remove license and downgrade to Mattermost Free
+
+ Remove license and downgrade to Mattermost Free
+
@@ -2274,15 +2343,16 @@ See ENTERPRISE-EDITION-LICENSE.txt in your root install directory for details. S
@@ -2380,9 +2450,14 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
class="purchase-card"
>
- Contact Sales
+
+ Contact Sales
+
@@ -2415,10 +2490,15 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
- View plans
+
+ View plans
+
- + Add seats
+
+ + Add seats
+
- Add a new license
+
+ Add a new license
+
- Remove license and downgrade to Mattermost Free
+
+ Remove license and downgrade to Mattermost Free
+
@@ -2939,15 +3033,16 @@ See ENTERPRISE-EDITION-LICENSE.txt in your root install directory for details. S
@@ -3045,9 +3140,14 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
class="purchase-card"
>
- Contact Sales
+
+ Contact Sales
+
@@ -3080,10 +3180,15 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
- View plans
+
+ View plans
+
- + Add seats
+
+ + Add seats
+
- Add a new license
+
+ Add a new license
+
- Remove license and downgrade to Mattermost Free
+
+ Remove license and downgrade to Mattermost Free
+
@@ -3588,15 +3707,16 @@ See ENTERPRISE-EDITION-LICENSE.txt in your root install directory for details. S
@@ -3694,9 +3814,14 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
class="purchase-card"
>
- Contact Sales
+
+ Contact Sales
+
@@ -3729,10 +3854,15 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
- View plans
+
+ View plans
+
- + Add seats
+
+ + Add seats
+
- Add a new license
+
+ Add a new license
+
- Remove license and downgrade to Mattermost Free
+
+ Remove license and downgrade to Mattermost Free
+
@@ -4238,15 +4382,16 @@ See ENTERPRISE-EDITION-LICENSE.txt in your root install directory for details. S
@@ -4344,9 +4489,14 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
class="purchase-card"
>
- Contact Sales
+
+ Contact Sales
+
@@ -4379,10 +4529,15 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
- View plans
+
+ View plans
+
- + Add seats
+
+ + Add seats
+
- Add a new license
+
+ Add a new license
+
- Remove license and downgrade to Mattermost Free
+
+ Remove license and downgrade to Mattermost Free
+
@@ -4893,15 +5062,16 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
@@ -5026,10 +5196,15 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
- View plans
+
+ View plans
+
- + Add seats
+
+ + Add seats
+
- Add a new license
+
+ Add a new license
+
- Remove license and downgrade to Mattermost Free
+
+ Remove license and downgrade to Mattermost Free
+
@@ -5461,15 +5650,16 @@ See ENTERPRISE-EDITION-LICENSE.txt in your root install directory for details. S
@@ -5580,10 +5770,14 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
class="trial"
>
- Start trial
+
+ Start trial
+
@@ -5604,10 +5798,15 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
class="StarterLeftPanel"
>
- View plans
+
+ View plans
+
- Upload File
+
+ Upload File
+
- Contact Sales
+
+ Contact Sales
+
@@ -6121,10 +6330,14 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
class="trial"
>
- Start trial
+
+ Start trial
+
@@ -6145,10 +6358,15 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
class="StarterLeftPanel"
>
- View plans
+
+ View plans
+
- Upload File
+
+ Upload File
+
- Contact Sales
+
+ Contact Sales
+
@@ -6669,9 +6897,14 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
class="purchase-card"
>
- Contact Sales
+
+ Contact Sales
+
@@ -7043,10 +7276,14 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
- Upgrade to Enterprise Edition
+
+ Upgrade to Enterprise Edition
+
- Upgrade Server And Start trial
+
+ Upgrade Server And Start trial
+
- Upgrade to Enterprise Edition
+
+ Upgrade to Enterprise Edition
+
- View plans
+
+ View plans
+
- Upload File
+
+ Upload File
+
- Contact Sales
+
+ Contact Sales
+
@@ -8100,10 +8360,15 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
- View plans
+
+ View plans
+
- + Add seats
+
+ + Add seats
+
- Add a new license
+
+ Add a new license
+
- Remove license and downgrade to Mattermost Free
+
+ Remove license and downgrade to Mattermost Free
+
@@ -8608,15 +8887,16 @@ See ENTERPRISE-EDITION-LICENSE.txt in your root install directory for details. S
@@ -8714,9 +8994,14 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
class="purchase-card"
>
- Contact Sales
+
+ Contact Sales
+
@@ -8749,10 +9034,15 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
- View plans
+
+ View plans
+
- + Add seats
+
+ + Add seats
+
- Add a new license
+
+ Add a new license
+
- Remove license and downgrade to Mattermost Free
+
+ Remove license and downgrade to Mattermost Free
+
@@ -9257,15 +9561,16 @@ See ENTERPRISE-EDITION-LICENSE.txt in your root install directory for details. S
diff --git a/webapp/channels/src/components/admin_console/license_settings/enterprise_edition/enterprise_edition.scss b/webapp/channels/src/components/admin_console/license_settings/enterprise_edition/enterprise_edition.scss
index bd3fa16b169..5001ca8f47f 100644
--- a/webapp/channels/src/components/admin_console/license_settings/enterprise_edition/enterprise_edition.scss
+++ b/webapp/channels/src/components/admin_console/license_settings/enterprise_edition/enterprise_edition.scss
@@ -37,14 +37,14 @@
}
.purchase_buttons {
+ display: flex;
+ flex-direction: column;
margin-top: 20px;
- .btn-primary {
- margin-bottom: 8px;
- }
+ gap: 8px;
.trial-btn {
width: 100%;
- margin-left: 0px;
+ margin-left: 0;
}
}
@@ -173,21 +173,7 @@
}
#remove-button {
- padding: 0;
- border: none !important;
margin: 10px 0;
- background: none !important;
- color: var(--error-text);
- font-weight: 700;
-
- &:hover {
- text-decoration: underline;
- }
-
- &:focus,
- &:focus-visible {
- outline: none !important;
- }
}
}
diff --git a/webapp/channels/src/components/admin_console/license_settings/enterprise_edition/enterprise_edition_left_panel.tsx b/webapp/channels/src/components/admin_console/license_settings/enterprise_edition/enterprise_edition_left_panel.tsx
index edcf00330de..9a8f890d6a2 100644
--- a/webapp/channels/src/components/admin_console/license_settings/enterprise_edition/enterprise_edition_left_panel.tsx
+++ b/webapp/channels/src/components/admin_console/license_settings/enterprise_edition/enterprise_edition_left_panel.tsx
@@ -7,8 +7,10 @@ import type {JSX, RefObject} from 'react';
import {FormattedDate, FormattedMessage, FormattedNumber, FormattedTime, defineMessage, defineMessages, useIntl} from 'react-intl';
import {useSelector} from 'react-redux';
+import {UploadOutlineIcon} from '@mattermost/compass-icons/components';
import AlertOutlineIcon from '@mattermost/compass-icons/components/alert-outline';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
+import {Icon} from '@mattermost/compass-ui/components/icon';
import {WithTooltip} from '@mattermost/shared/components/tooltip';
import type {ClientLicense} from '@mattermost/types/config';
@@ -98,7 +100,7 @@ const EnterpriseEditionLeftPanel = ({
id='enterprise_edition_view_plans'
onClick={openPricingModal}
emphasis='tertiary'
- size='sm'
+ size='small'
className='PlanDetails__viewPlansButton'
>
{formatMessage({
@@ -167,8 +169,8 @@ const EnterpriseEditionLeftPanel = ({
emphasis='primary'
onClick={() => fileInputRef.current?.click()}
disabled={isLicenseSetByEnvVar}
+ leadingIcon={}/>}
>
-
{'License details'}
-
-
+
+
+
);
const title = () => {
diff --git a/webapp/channels/src/components/admin_console/license_settings/modals/confirm_license_removal_modal.tsx b/webapp/channels/src/components/admin_console/license_settings/modals/confirm_license_removal_modal.tsx
index 6a205a49928..0a04bf009cd 100644
--- a/webapp/channels/src/components/admin_console/license_settings/modals/confirm_license_removal_modal.tsx
+++ b/webapp/channels/src/components/admin_console/license_settings/modals/confirm_license_removal_modal.tsx
@@ -5,8 +5,8 @@ import React, {type JSX} from 'react';
import {FormattedMessage} from 'react-intl';
import {useSelector, useDispatch} from 'react-redux';
+import {Button} from '@mattermost/compass-ui/components/button';
import {GenericModal} from '@mattermost/components';
-import {Button} from '@mattermost/shared/components/button';
import {closeModal} from 'actions/views/modals';
import {isModalOpen} from 'selectors/views/modals';
diff --git a/webapp/channels/src/components/admin_console/license_settings/modals/ee_license_modal.tsx b/webapp/channels/src/components/admin_console/license_settings/modals/ee_license_modal.tsx
index c6ca0cb9e4b..eb5b9ffce43 100644
--- a/webapp/channels/src/components/admin_console/license_settings/modals/ee_license_modal.tsx
+++ b/webapp/channels/src/components/admin_console/license_settings/modals/ee_license_modal.tsx
@@ -4,8 +4,8 @@
import React, {type JSX} from 'react';
import {useSelector, useDispatch} from 'react-redux';
+import {Button} from '@mattermost/compass-ui/components/button';
import {GenericModal} from '@mattermost/components';
-import {Button} from '@mattermost/shared/components/button';
import {closeModal} from 'actions/views/modals';
import {isModalOpen} from 'selectors/views/modals';
diff --git a/webapp/channels/src/components/admin_console/license_settings/modals/upload_license_modal.scss b/webapp/channels/src/components/admin_console/license_settings/modals/upload_license_modal.scss
index 9e84166f266..d416e21a1e8 100644
--- a/webapp/channels/src/components/admin_console/license_settings/modals/upload_license_modal.scss
+++ b/webapp/channels/src/components/admin_console/license_settings/modals/upload_license_modal.scss
@@ -96,6 +96,12 @@
&.preview-footer {
flex-direction: row;
+ // The 8px between Cancel and Apply used to come from the global
+ // `.btn + .btn` rule in _buttons.scss, which the Compass buttons
+ // no longer match. This footer is not a .modal-footer, so it does
+ // not pick up that gap either.
+ gap: 8px;
+
button {
margin-top: 0 !important;
}
diff --git a/webapp/channels/src/components/admin_console/license_settings/modals/upload_license_modal.tsx b/webapp/channels/src/components/admin_console/license_settings/modals/upload_license_modal.tsx
index 9a19d6dbf45..cc8e6281833 100644
--- a/webapp/channels/src/components/admin_console/license_settings/modals/upload_license_modal.tsx
+++ b/webapp/channels/src/components/admin_console/license_settings/modals/upload_license_modal.tsx
@@ -5,8 +5,8 @@ import React, {useEffect, useCallback, type JSX} from 'react';
import {defineMessage, FormattedDate, FormattedMessage, useIntl} from 'react-intl';
import {useSelector, useDispatch} from 'react-redux';
+import {Button} from '@mattermost/compass-ui/components/button';
import {GenericModal} from '@mattermost/components';
-import {Button} from '@mattermost/shared/components/button';
import type {ClientLicense, License} from '@mattermost/types/config';
import {previewLicense, uploadLicense} from 'mattermost-redux/actions/admin';
@@ -248,18 +248,20 @@ const UploadLicenseModal = (props: Props): JSX.Element | null => {
emphasis='primary'
onClick={handleConfirmUpload}
disabled={isLoading}
+ loading={Boolean(isLoading)}
id='confirm-button'
>
-
+ {isLoading ? (
+
+ ) : (
-
+ )}
>
diff --git a/webapp/channels/src/components/admin_console/license_settings/starter_edition/starter_left_panel.tsx b/webapp/channels/src/components/admin_console/license_settings/starter_edition/starter_left_panel.tsx
index e418ae4e191..52cb4f1c9ea 100644
--- a/webapp/channels/src/components/admin_console/license_settings/starter_edition/starter_left_panel.tsx
+++ b/webapp/channels/src/components/admin_console/license_settings/starter_edition/starter_left_panel.tsx
@@ -5,7 +5,7 @@ import React from 'react';
import type {JSX, RefObject} from 'react';
import {FormattedMessage, defineMessages, useIntl} from 'react-intl';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import useOpenPricingModal from 'components/common/hooks/useOpenPricingModal';
@@ -39,7 +39,7 @@ const StarterLeftPanel: React.FC = ({
id='starter_edition_view_plans'
onClick={openPricingModal}
emphasis='tertiary'
- size='sm'
+ size='small'
className='PlanDetails__viewPlansButton'
>
{intl.formatMessage({
diff --git a/webapp/channels/src/components/admin_console/license_settings/team_edition/team_edition.scss b/webapp/channels/src/components/admin_console/license_settings/team_edition/team_edition.scss
index d200a9a07ca..5a1106a4c40 100644
--- a/webapp/channels/src/components/admin_console/license_settings/team_edition/team_edition.scss
+++ b/webapp/channels/src/components/admin_console/license_settings/team_edition/team_edition.scss
@@ -34,7 +34,8 @@
}
}
- button, a.btn {
+ button,
+ p:not(.upgrade-legal-terms) a {
width: 100%;
border-radius: 4px;
margin: 5px auto;
diff --git a/webapp/channels/src/components/admin_console/license_settings/team_edition/team_edition_right_panel.tsx b/webapp/channels/src/components/admin_console/license_settings/team_edition/team_edition_right_panel.tsx
index f92359a18b1..9946a657708 100644
--- a/webapp/channels/src/components/admin_console/license_settings/team_edition/team_edition_right_panel.tsx
+++ b/webapp/channels/src/components/admin_console/license_settings/team_edition/team_edition_right_panel.tsx
@@ -4,11 +4,10 @@
import React from 'react';
import {FormattedMessage, useIntl} from 'react-intl';
-import {Button, buttonClassNames} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import SetupSystemSvg from 'components/common/svg_images_components/setup_system_svg';
import ExternalLink from 'components/external_link';
-import LoadingWrapper from 'components/widgets/loading/loading_wrapper';
import {LicenseLinks} from 'utils/constants';
import {format} from 'utils/markdown';
@@ -61,17 +60,21 @@ const TeamEditionRightPanel: React.FC = ({
upgradeButton = (
);
@@ -83,23 +86,20 @@ const TeamEditionRightPanel: React.FC = ({
type='button'
onClick={onHandleUpgrade}
emphasis='primary'
+ loading={upgradingPercentage > 0}
>
- 0}
- text={
-
- }
- >
+ {upgradingPercentage > 0 ? (
+
+ ) : (
-
+ )}
@@ -152,20 +152,19 @@ const TeamEditionRightPanel: React.FC = ({
type='button'
onClick={handleRestart}
emphasis='primary'
+ loading={restarting}
>
-
+ })
+ ) : (
-
+ )}
{restartError && (
diff --git a/webapp/channels/src/components/admin_console/license_settings/trial_banner/trial_banner.tsx b/webapp/channels/src/components/admin_console/license_settings/trial_banner/trial_banner.tsx
index 425ccf8ba04..c744bdc76a8 100644
--- a/webapp/channels/src/components/admin_console/license_settings/trial_banner/trial_banner.tsx
+++ b/webapp/channels/src/components/admin_console/license_settings/trial_banner/trial_banner.tsx
@@ -5,7 +5,7 @@ import React, {useEffect, useState} from 'react';
import {FormattedMessage, 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 {savePreferences} from 'mattermost-redux/actions/preferences';
import {getBool as getBoolPreference} from 'mattermost-redux/selectors/entities/preferences';
@@ -14,7 +14,6 @@ import {getCurrentUserId} from 'mattermost-redux/selectors/entities/users';
import AlertBanner from 'components/alert_banner';
import withOpenStartTrialFormModal from 'components/common/hocs/cloud/with_open_start_trial_form_modal';
import ExternalLink from 'components/external_link';
-import LoadingWrapper from 'components/widgets/loading/loading_wrapper';
import {AboutLinks, LicenseLinks, Preferences, Unique} from 'utils/constants';
import {format} from 'utils/markdown';
@@ -301,32 +300,38 @@ const TrialBanner = ({
);
} else {
gettingTrialErrorMsg = null;
+
+ let trialButtonLabel = (
+
+ );
+ if (upgradingPercentage === 100 && restarting) {
+ trialButtonLabel = (
+
+ );
+ } else if (upgradingPercentage > 0) {
+ trialButtonLabel = (
+
+ );
+ }
+
trialButton = (
0}
>
- 0}
- text={upgradingPercentage === 100 && restarting ? (
-
- ) : (
- )}
- >
-
-
+ {trialButtonLabel}
);
diff --git a/webapp/channels/src/components/admin_console/manage_roles_modal/manage_roles_modal.tsx b/webapp/channels/src/components/admin_console/manage_roles_modal/manage_roles_modal.tsx
index de0671a823d..a15efc11c2b 100644
--- a/webapp/channels/src/components/admin_console/manage_roles_modal/manage_roles_modal.tsx
+++ b/webapp/channels/src/components/admin_console/manage_roles_modal/manage_roles_modal.tsx
@@ -6,7 +6,7 @@ import {Modal} from 'react-bootstrap';
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 type {Role} from '@mattermost/types/roles';
import type {UserProfile} from '@mattermost/types/users';
diff --git a/webapp/channels/src/components/admin_console/manage_teams_modal/__snapshots__/remove_from_team_button.test.tsx.snap b/webapp/channels/src/components/admin_console/manage_teams_modal/__snapshots__/remove_from_team_button.test.tsx.snap
index 367736b3763..6dd1ce7ec8d 100644
--- a/webapp/channels/src/components/admin_console/manage_teams_modal/__snapshots__/remove_from_team_button.test.tsx.snap
+++ b/webapp/channels/src/components/admin_console/manage_teams_modal/__snapshots__/remove_from_team_button.test.tsx.snap
@@ -3,10 +3,14 @@
exports[`RemoveFromTeamButton should match snapshot init 1`] = `
- Remove from Team
+
+ Remove from Team
+
`;
diff --git a/webapp/channels/src/components/admin_console/manage_teams_modal/remove_from_team_button.tsx b/webapp/channels/src/components/admin_console/manage_teams_modal/remove_from_team_button.tsx
index 4b25c46a647..b38403ab081 100644
--- a/webapp/channels/src/components/admin_console/manage_teams_modal/remove_from_team_button.tsx
+++ b/webapp/channels/src/components/admin_console/manage_teams_modal/remove_from_team_button.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';
type Props = {
teamId: string;
@@ -20,7 +20,7 @@ const RemoveFromTeamButton = ({teamId, handleRemoveUserFromTeam}: Props) => {
return (
- Delete
+
+ Delete
+
@@ -317,10 +321,14 @@ exports[`components/admin_console/manage_tokens_modal/manage_tokens_modal.tsx sh
class="manage-teams__team-actions"
>
- Delete
+
+ Delete
+
diff --git a/webapp/channels/src/components/admin_console/openid_convert/__snapshots__/openid_convert.test.tsx.snap b/webapp/channels/src/components/admin_console/openid_convert/__snapshots__/openid_convert.test.tsx.snap
index b23f7b9e4e4..af247b0baf4 100644
--- a/webapp/channels/src/components/admin_console/openid_convert/__snapshots__/openid_convert.test.tsx.snap
+++ b/webapp/channels/src/components/admin_console/openid_convert/__snapshots__/openid_convert.test.tsx.snap
@@ -24,20 +24,29 @@ exports[`components/OpenIdConvert should match snapshot 1`] = `
class="OpenIdConvert_actionWrapper"
>
- Convert to OpenID Connect
+
+ Convert to OpenID Connect
+
- Learn more
+
+ Learn more
+
-
-
-
+
-
-
+
+
+
+
((props, ref) => {
+ const {children, ...rest} = props;
+ return (
+
}/>}
+ >
+ {children}
+
+ );
+});
+AddPermissionMenuTrigger.displayName = 'AddPermissionMenuTrigger';
+
const roleMessages = defineMessages({
guestLabel: {id: 'admin.permission_policies.role.system_guest.label', defaultMessage: 'Guest users'},
guestDescription: {id: 'admin.permission_policies.role.system_guest.description', defaultMessage: 'Applies only to guest users'},
@@ -455,6 +475,7 @@ function PermissionPolicyDetails({
{/* "Who this policy applies to" */}
@@ -528,6 +549,7 @@ function PermissionPolicyDetails({
{/* Attribute-based access rules */}
@@ -664,6 +686,7 @@ function PermissionPolicyDetails({
{/* "What permissions are modified" */}
@@ -728,15 +751,12 @@ function PermissionPolicyDetails({
-
-
- >
+
),
}}
menu={{
@@ -769,6 +789,7 @@ function PermissionPolicyDetails({
{policyId && (
@@ -791,6 +812,7 @@ function PermissionPolicyDetails({
defaultMessage='Delete'
/>
}
+ destructive={true}
onClick={() => setShowDeleteConfirmationModal(true)}
/>
@@ -816,7 +838,7 @@ function PermissionPolicyDetails({
defaultMessage='Delete Policy'
/>
}
- confirmButtonVariant='destructive'
+ destructive={true}
compassDesign={true}
>
}
/>
-
-
-
+
+
+
+
{serverError && (
diff --git a/webapp/channels/src/components/admin_console/permission_schemes_settings/__snapshots__/permission_schemes_settings.test.tsx.snap b/webapp/channels/src/components/admin_console/permission_schemes_settings/__snapshots__/permission_schemes_settings.test.tsx.snap
index 1a51f86d033..92268038635 100644
--- a/webapp/channels/src/components/admin_console/permission_schemes_settings/__snapshots__/permission_schemes_settings.test.tsx.snap
+++ b/webapp/channels/src/components/admin_console/permission_schemes_settings/__snapshots__/permission_schemes_settings.test.tsx.snap
@@ -95,11 +95,15 @@ exports[`components/admin_console/permission_schemes_settings/permission_schemes
class="button"
>
- Edit Scheme
+
+ Edit Scheme
+
@@ -134,11 +138,15 @@ exports[`components/admin_console/permission_schemes_settings/permission_schemes
class="button"
>
- New Team Override Scheme
+
+ New Team Override Scheme
+
@@ -333,11 +341,15 @@ exports[`components/admin_console/permission_schemes_settings/permission_schemes
class="button"
>
- Edit Scheme
+
+ Edit Scheme
+
@@ -372,11 +384,15 @@ exports[`components/admin_console/permission_schemes_settings/permission_schemes
class="button"
>
- New Team Override Scheme
+
+ New Team Override Scheme
+
@@ -459,11 +475,16 @@ exports[`components/admin_console/permission_schemes_settings/permission_schemes
class="button"
>
- Edit Scheme
+
+ Edit Scheme
+
@@ -498,11 +519,16 @@ exports[`components/admin_console/permission_schemes_settings/permission_schemes
class="button"
>
- New Team Override Scheme
+
+ New Team Override Scheme
+
@@ -715,11 +741,16 @@ exports[`components/admin_console/permission_schemes_settings/permission_schemes
class="button"
>
- Edit Scheme
+
+ Edit Scheme
+
@@ -754,11 +785,16 @@ exports[`components/admin_console/permission_schemes_settings/permission_schemes
class="button"
>
- New Team Override Scheme
+
+ New Team Override Scheme
+
@@ -971,11 +1007,15 @@ exports[`components/admin_console/permission_schemes_settings/permission_schemes
class="button"
>
- Edit Scheme
+
+ Edit Scheme
+
@@ -1010,11 +1050,15 @@ exports[`components/admin_console/permission_schemes_settings/permission_schemes
class="button"
>
- New Team Override Scheme
+
+ New Team Override Scheme
+
diff --git a/webapp/channels/src/components/admin_console/permission_schemes_settings/edit_post_time_limit_modal/edit_post_time_limit_modal.tsx b/webapp/channels/src/components/admin_console/permission_schemes_settings/edit_post_time_limit_modal/edit_post_time_limit_modal.tsx
index 1a5a6841aa0..7a10287133a 100644
--- a/webapp/channels/src/components/admin_console/permission_schemes_settings/edit_post_time_limit_modal/edit_post_time_limit_modal.tsx
+++ b/webapp/channels/src/components/admin_console/permission_schemes_settings/edit_post_time_limit_modal/edit_post_time_limit_modal.tsx
@@ -5,7 +5,7 @@ import React, {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 {AdminConfig} from '@mattermost/types/config';
import type {DeepPartial} from '@mattermost/types/utilities';
diff --git a/webapp/channels/src/components/admin_console/permission_schemes_settings/permission_system_scheme_settings/__snapshots__/permission_system_scheme_settings.test.tsx.snap b/webapp/channels/src/components/admin_console/permission_schemes_settings/permission_system_scheme_settings/__snapshots__/permission_system_scheme_settings.test.tsx.snap
index 7bc60e4d5ff..56e63b00c5f 100644
--- a/webapp/channels/src/components/admin_console/permission_schemes_settings/permission_system_scheme_settings/__snapshots__/permission_system_scheme_settings.test.tsx.snap
+++ b/webapp/channels/src/components/admin_console/permission_schemes_settings/permission_system_scheme_settings/__snapshots__/permission_system_scheme_settings.test.tsx.snap
@@ -4206,28 +4206,39 @@ exports[`components/admin_console/permission_schemes_settings/permission_system_
class="admin-console-save"
>
-
+
Save
- Cancel
+
+ Cancel
+
- Reset to Defaults
+
+ Reset to Defaults
+
-
+
Save
- Cancel
+
+ Cancel
+
- Reset to Defaults
+
+ Reset to Defaults
+
-
+
Save
- Cancel
+
+ Cancel
+
- Reset to Defaults
+
+ Reset to Defaults
+
-
+
Save
- Cancel
+
+ Cancel
+
- Reset to Defaults
+
+ Reset to Defaults
+
,
);
expect(ref.current!.state.showResetDefaultModal).toBe(false);
- const resetButton = container.querySelector('.btn-quaternary');
+ const resetButton = container.querySelector('[data-testid="resetPermissionsToDefault"]');
expect(resetButton).not.toBeNull();
act(() => {
(resetButton as HTMLElement).click();
diff --git a/webapp/channels/src/components/admin_console/permission_schemes_settings/permission_system_scheme_settings/permission_system_scheme_settings.tsx b/webapp/channels/src/components/admin_console/permission_schemes_settings/permission_system_scheme_settings/permission_system_scheme_settings.tsx
index 77021deb24a..668142721af 100644
--- a/webapp/channels/src/components/admin_console/permission_schemes_settings/permission_system_scheme_settings/permission_system_scheme_settings.tsx
+++ b/webapp/channels/src/components/admin_console/permission_schemes_settings/permission_system_scheme_settings/permission_system_scheme_settings.tsx
@@ -5,7 +5,7 @@ import React from 'react';
import type {WrappedComponentProps} from 'react-intl';
import {FormattedMessage, defineMessage, injectIntl} from 'react-intl';
-import {Button, buttonClassNames} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import type {ClientConfig, ClientLicense} from '@mattermost/types/config';
import type {Role} from '@mattermost/types/roles';
@@ -543,16 +543,18 @@ export class PermissionSystemSchemeSettings extends React.PureComponent
-
-
-
+
+
+
+
this.setState({showResetDefaultModal: true})}
diff --git a/webapp/channels/src/components/admin_console/permission_schemes_settings/permission_team_scheme_settings/permission_team_scheme_settings.tsx b/webapp/channels/src/components/admin_console/permission_schemes_settings/permission_team_scheme_settings/permission_team_scheme_settings.tsx
index 135d11a9d65..7455a4cfb03 100644
--- a/webapp/channels/src/components/admin_console/permission_schemes_settings/permission_team_scheme_settings/permission_team_scheme_settings.tsx
+++ b/webapp/channels/src/components/admin_console/permission_schemes_settings/permission_team_scheme_settings/permission_team_scheme_settings.tsx
@@ -6,7 +6,7 @@ import {defineMessage, FormattedMessage} from 'react-intl';
import type {WrappedComponentProps} from 'react-intl';
import type {RouteComponentProps} from 'react-router-dom';
-import {buttonClassNames} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import type {ClientConfig, ClientLicense} from '@mattermost/types/config';
import type {Role} from '@mattermost/types/roles';
import type {Scheme, SchemePatch} from '@mattermost/types/schemes';
@@ -817,16 +817,18 @@ export default class PermissionTeamSchemeSettings extends React.PureComponent
}
/>
-
-
-
+
+
+
+
diff --git a/webapp/channels/src/components/admin_console/plugin_management/__snapshots__/plugin_management.test.tsx.snap b/webapp/channels/src/components/admin_console/plugin_management/__snapshots__/plugin_management.test.tsx.snap
index 616b4c86bb5..54f59a01302 100644
--- a/webapp/channels/src/components/admin_console/plugin_management/__snapshots__/plugin_management.test.tsx.snap
+++ b/webapp/channels/src/components/admin_console/plugin_management/__snapshots__/plugin_management.test.tsx.snap
@@ -554,13 +554,15 @@ exports[`components/PluginManagement should match snapshot 1`] = `
class="admin-console-save"
>
-
+
Save
@@ -1130,13 +1132,15 @@ exports[`components/PluginManagement should match snapshot when \`Enable Marketp
class="admin-console-save"
>
-
+
Save
@@ -1203,13 +1207,15 @@ exports[`components/PluginManagement should match snapshot when \`Enable Plugins
class="admin-console-save"
>
-
+
Save
@@ -1777,13 +1783,15 @@ exports[`components/PluginManagement should match snapshot when \`Enable Remote
class="admin-console-save"
>
-
+
Save
@@ -2359,13 +2367,15 @@ exports[`components/PluginManagement should match snapshot when \`Require Signat
class="admin-console-save"
>
-
+
Save
@@ -2933,13 +2943,15 @@ exports[`components/PluginManagement should match snapshot, No installed plugins
class="admin-console-save"
>
-
+
Save
@@ -3506,13 +3518,15 @@ exports[`components/PluginManagement should match snapshot, allow insecure URL e
class="admin-console-save"
>
-
+
Save
@@ -4082,13 +4096,15 @@ exports[`components/PluginManagement should match snapshot, disabled 1`] = `
class="admin-console-save"
>
-
+
Save
@@ -4655,13 +4671,15 @@ exports[`components/PluginManagement should match snapshot, text entered into th
class="admin-console-save"
>
-
+
Save
@@ -5249,13 +5267,15 @@ exports[`components/PluginManagement should match snapshot, upload disabled 1`]
class="admin-console-save"
>
-
+
Save
@@ -6105,13 +6125,15 @@ exports[`components/PluginManagement should match snapshot, with installed plugi
class="admin-console-save"
>
-
+
Save
@@ -6759,13 +6781,15 @@ exports[`components/PluginManagement should match snapshot, with installed plugi
class="admin-console-save"
>
-
+
Save
@@ -7413,13 +7437,15 @@ exports[`components/PluginManagement should match snapshot, with installed plugi
class="admin-console-save"
>
-
+
Save
@@ -8067,13 +8093,15 @@ exports[`components/PluginManagement should match snapshot, with installed plugi
class="admin-console-save"
>
-
+
Save
@@ -8907,13 +8935,15 @@ exports[`components/PluginManagement should match snapshot, with installed plugi
class="admin-console-save"
>
-
+
Save
diff --git a/webapp/channels/src/components/admin_console/plugin_management/plugin_management.tsx b/webapp/channels/src/components/admin_console/plugin_management/plugin_management.tsx
index 2b3f4a99c22..ad6c575c0e7 100644
--- a/webapp/channels/src/components/admin_console/plugin_management/plugin_management.tsx
+++ b/webapp/channels/src/components/admin_console/plugin_management/plugin_management.tsx
@@ -1020,7 +1020,7 @@ export class PluginManagement extends OLDAdminSettings
{
show={show}
title={title}
message={message}
- confirmButtonVariant='destructive'
+ destructive={true}
confirmButtonText={removeButton}
onConfirm={onConfirm}
onCancel={onCancel}
diff --git a/webapp/channels/src/components/admin_console/plugin_management/plugin_upload_overwrite_review_modal.tsx b/webapp/channels/src/components/admin_console/plugin_management/plugin_upload_overwrite_review_modal.tsx
index f0b4e8a610d..0fd27ff35db 100644
--- a/webapp/channels/src/components/admin_console/plugin_management/plugin_upload_overwrite_review_modal.tsx
+++ b/webapp/channels/src/components/admin_console/plugin_management/plugin_upload_overwrite_review_modal.tsx
@@ -143,7 +143,7 @@ export default function PluginUploadOverwriteReviewModal({show, conflict, onConf
show={show}
title={title}
message={renderReviewMessage(conflict)}
- confirmButtonVariant={direction === 'downgrade' ? 'destructive' : undefined}
+ destructive={direction === 'downgrade'}
confirmButtonText={overwriteButton}
onConfirm={onConfirm}
onCancel={onCancel}
diff --git a/webapp/channels/src/components/admin_console/remove_file_setting.tsx b/webapp/channels/src/components/admin_console/remove_file_setting.tsx
index a18be557625..18a788ae5ea 100644
--- a/webapp/channels/src/components/admin_console/remove_file_setting.tsx
+++ b/webapp/channels/src/components/admin_console/remove_file_setting.tsx
@@ -4,7 +4,7 @@
import React, {memo, useCallback, useState} from 'react';
import type {FC, MouseEvent} from 'react';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import Setting from './setting';
import type {Props as SettingsProps} from './setting';
@@ -53,7 +53,7 @@ const RemoveFileSetting: FC = ({
diff --git a/webapp/channels/src/components/admin_console/request_button/__snapshots__/request_button.test.tsx.snap b/webapp/channels/src/components/admin_console/request_button/__snapshots__/request_button.test.tsx.snap
index a653de117fc..c8368e675c6 100644
--- a/webapp/channels/src/components/admin_console/request_button/__snapshots__/request_button.test.tsx.snap
+++ b/webapp/channels/src/components/admin_console/request_button/__snapshots__/request_button.test.tsx.snap
@@ -10,10 +10,14 @@ exports[`components/admin_console/request_button/request_button.jsx should match
>
- Button Text
+
+ Button Text
+
- Button Text
+
+ Button Text
+
- Button Text
+
+ Button Text
+
- Button Text
+
+ Button Text
+
- Button Text
+
+ Button Text
+
{
emphasis={this.props.buttonEmphasis || 'tertiary'}
onClick={this.handleRequest}
disabled={this.props.disabled}
+ loading={this.state.busy}
>
-
- )
- }
- >
- {this.props.buttonText}
-
+ {this.state.busy ? (
+ this.props.loadingText ||
+ (
+
+ )
+ ) : this.props.buttonText}
{this.props.alternativeActionElement}
{message}
diff --git a/webapp/channels/src/components/admin_console/revoke_non_compliant_tokens_button/revoke_non_compliant_tokens_button.tsx b/webapp/channels/src/components/admin_console/revoke_non_compliant_tokens_button/revoke_non_compliant_tokens_button.tsx
index 261f162f1a6..233d69b636a 100644
--- a/webapp/channels/src/components/admin_console/revoke_non_compliant_tokens_button/revoke_non_compliant_tokens_button.tsx
+++ b/webapp/channels/src/components/admin_console/revoke_non_compliant_tokens_button/revoke_non_compliant_tokens_button.tsx
@@ -4,6 +4,8 @@
import React, {useCallback, useEffect, useState} from 'react';
import {FormattedMessage} from 'react-intl';
+import {Button} from '@mattermost/compass-ui/components/button';
+
import {Client4} from 'mattermost-redux/client';
import AlertBanner from 'components/alert_banner';
@@ -96,9 +98,9 @@ const RevokeNonCompliantTokensButton = ({disabled, registerSaveAction, unRegiste
className='RevokeNonCompliantTokensButton'
style={{display: 'flex', flexDirection: 'column', alignItems: 'flex-start', gap: '8px'}}
>
-
@@ -106,7 +108,7 @@ const RevokeNonCompliantTokensButton = ({disabled, registerSaveAction, unRegiste
id='admin.service.revokeNonCompliantTokens.button'
defaultMessage='Revoke non-compliant tokens'
/>
-
+
{error && (
)}
- confirmButtonVariant='destructive'
+ destructive={true}
confirmButtonText={(
{
return (
({
+ getHistory: jest.fn(),
+}));
+
+describe('components/admin_console/SaveChangesPanel', () => {
+ const baseProps = {
+ saving: false,
+ saveNeeded: true,
+ onClick: jest.fn(),
+ };
+
+ const push = jest.fn();
+
+ beforeEach(() => {
+ push.mockReset();
+ (getHistory as jest.Mock).mockReturnValue({push});
+ });
+
+ function renderPanel(
+ props: Partial> & {cancelLink?: string; onCancel?: () => void} = {},
+ options: {navigationBlocked?: boolean; history?: ReturnType} = {},
+ ) {
+ const initialState: DeepPartial = {
+ views: {
+ admin: {
+ navigationBlock: {
+ blocked: options.navigationBlocked ?? false,
+ onNavigationConfirmed: undefined,
+ showNavigationPrompt: false,
+ },
+ },
+ },
+ };
+
+ return renderWithContext(
+ ,
+ initialState,
+ {history: options.history},
+ );
+ }
+
+ test('renders Cancel as a tertiary compass-ui link when cancelLink is provided', () => {
+ renderPanel({cancelLink: '/admin_console/user_management/teams'});
+
+ const cancel = screen.getByRole('link', {name: 'Cancel'});
+ expect(cancel).toBeInTheDocument();
+ expect(cancel).toHaveAttribute('id', 'cancelButtonSettings');
+ expect(cancel).toHaveAttribute('href', '/admin_console/user_management/teams');
+ expect(cancel.tagName).toBe('A');
+ expect(cancel.className).toMatch(/button--emphasis-tertiary/);
+ expect(cancel.className).not.toMatch(/\bbtn-tertiary\b/);
+ expect(cancel.className).not.toMatch(/\bbtn-quaternary\b/);
+ });
+
+ test('navigates immediately on Cancel when navigation is not blocked', async () => {
+ const history = createBrowserHistory();
+ const historyPush = jest.spyOn(history, 'push');
+ renderPanel(
+ {cancelLink: '/admin_console/user_management/teams'},
+ {history},
+ );
+
+ await userEvent.click(screen.getByRole('link', {name: 'Cancel'}));
+
+ expect(historyPush).toHaveBeenCalledWith(
+ expect.objectContaining({pathname: '/admin_console/user_management/teams'}),
+ );
+ });
+
+ test('defers Cancel navigation when navigation is blocked', async () => {
+ const {store} = renderPanel(
+ {cancelLink: '/admin_console/user_management/teams'},
+ {navigationBlocked: true},
+ );
+
+ await userEvent.click(screen.getByRole('link', {name: 'Cancel'}));
+
+ expect(push).not.toHaveBeenCalled();
+ expect(store.getState().views.admin.navigationBlock.showNavigationPrompt).toBe(true);
+
+ store.getState().views.admin.navigationBlock.onNavigationConfirmed?.();
+ expect(push).toHaveBeenCalledWith('/admin_console/user_management/teams');
+ });
+
+ test('calls onCancel when provided instead of cancelLink', async () => {
+ const onCancel = jest.fn();
+ renderPanel({onCancel});
+
+ const cancel = screen.getByRole('button', {name: 'Cancel'});
+ expect(cancel.className).toMatch(/button--emphasis-tertiary/);
+
+ await userEvent.click(cancel);
+ expect(onCancel).toHaveBeenCalled();
+ expect(push).not.toHaveBeenCalled();
+ });
+});
diff --git a/webapp/channels/src/components/admin_console/save_changes_panel.tsx b/webapp/channels/src/components/admin_console/save_changes_panel.tsx
index dce7b17eb9a..732426996dd 100644
--- a/webapp/channels/src/components/admin_console/save_changes_panel.tsx
+++ b/webapp/channels/src/components/admin_console/save_changes_panel.tsx
@@ -4,7 +4,7 @@
import React, {type JSX} from 'react';
import {FormattedMessage, useIntl} from 'react-intl';
-import {Button, buttonClassNames} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import BlockableLink from 'components/admin_console/blockable_link';
import SaveButton from 'components/save_button';
@@ -24,6 +24,16 @@ type Props = {
const SaveChangesPanel = ({saveNeeded, onClick, saving, serverError, cancelLink, onCancel, isDisabled, savingMessage}: Props) => {
const {formatMessage} = useIntl();
+
+ const showCancel = Boolean(cancelLink) || Boolean(onCancel);
+
+ const cancelLabel = (
+
+ );
+
return (
- {cancelLink ? (
-
-
-
- ) : onCancel && (
-
-
-
+ {showCancel && (
+ cancelLink ? (
+
+
+ {cancelLabel}
+
+
+ ) : (
+
onCancel?.()}
+ >
+ {cancelLabel}
+
+ )
)}
;
-export const LinkButton = styled.button.attrs({className: 'btn btn-link'})<{$destructive?: boolean}>`
- font-weight: normal;
- ${({$destructive}) => $destructive && css`
- && {
- color: #D24B4E;
- }
- `};
-`;
+export const Button = ({style, ...props}: CompassButtonProps) => (
+
+);
+
+export const LinkButton = ({
+ $destructive,
+ style,
+ ...props
+}: CompassButtonProps & {$destructive?: boolean}) => (
+
+);
export const ConnectionStatusLabel = ({rc}: {rc: RemoteCluster}) => {
if (!isConfirmed(rc)) {
diff --git a/webapp/channels/src/components/admin_console/secure_connections/modals/secure_connection_create_invite_modal.tsx b/webapp/channels/src/components/admin_console/secure_connections/modals/secure_connection_create_invite_modal.tsx
index 5228ead19fb..def58fcfa95 100644
--- a/webapp/channels/src/components/admin_console/secure_connections/modals/secure_connection_create_invite_modal.tsx
+++ b/webapp/channels/src/components/admin_console/secure_connections/modals/secure_connection_create_invite_modal.tsx
@@ -5,6 +5,7 @@ import React, {useEffect, useState} from 'react';
import {FormattedMessage, useIntl} from 'react-intl';
import {CheckIcon, ContentCopyIcon} from '@mattermost/compass-icons/components';
+import {Icon} from '@mattermost/compass-ui/components/icon';
import {SectionNotice} from '@mattermost/compass-ui/components/section-notice';
import {GenericModal} from '@mattermost/components';
import type {RemoteCluster} from '@mattermost/types/remote_clusters';
@@ -146,8 +147,13 @@ function SecureConnectionCreateInviteModal({
data-testid='invite-code'
readOnly={true}
addon={(
-
- {inviteCopied ? copied : copy}
+
+ {inviteCopied ? copiedLabel : copyLabel}
)}
/>
@@ -165,8 +171,13 @@ function SecureConnectionCreateInviteModal({
data-testid='password'
readOnly={done}
addon={done ? (
-
- {passwordCopied ? copied : copy}
+
+ {passwordCopied ? copiedLabel : copyLabel}
) : undefined}
@@ -178,18 +189,10 @@ function SecureConnectionCreateInviteModal({
);
}
-const copy = (
- <>
-
-
- >
-);
+const copyIcon = }/>;
+const copiedIcon = }/>;
-const copied = (
- <>
-
-
- >
-);
+const copyLabel = ;
+const copiedLabel = ;
export default SecureConnectionCreateInviteModal;
diff --git a/webapp/channels/src/components/admin_console/secure_connections/modals/secure_connection_delete_modal.tsx b/webapp/channels/src/components/admin_console/secure_connections/modals/secure_connection_delete_modal.tsx
index 51d6b9f5cf7..101b329d9c2 100644
--- a/webapp/channels/src/components/admin_console/secure_connections/modals/secure_connection_delete_modal.tsx
+++ b/webapp/channels/src/components/admin_console/secure_connections/modals/secure_connection_delete_modal.tsx
@@ -47,7 +47,7 @@ function SecureConnectionDeleteModal({
return (
)}
- confirmButtonVariant='destructive'
+ destructive={true}
onExited={onExited}
compassDesign={true}
bodyPadding={false}
diff --git a/webapp/channels/src/components/admin_console/secure_connections/secure_connection_detail.tsx b/webapp/channels/src/components/admin_console/secure_connections/secure_connection_detail.tsx
index bef1df812c5..8074804b646 100644
--- a/webapp/channels/src/components/admin_console/secure_connections/secure_connection_detail.tsx
+++ b/webapp/channels/src/components/admin_console/secure_connections/secure_connection_detail.tsx
@@ -11,7 +11,8 @@ import {useHistory, useParams, useLocation} from 'react-router-dom';
import styled from 'styled-components';
import {PlusIcon} from '@mattermost/compass-icons/components';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
+import {Icon} from '@mattermost/compass-ui/components/icon';
import {isRemoteClusterPatch, type RemoteCluster} from '@mattermost/types/remote_clusters';
import {getChannel} from 'mattermost-redux/selectors/entities/channels';
@@ -291,13 +292,15 @@ function SharedChannelRemotes(props: {remoteId: string; rc: RemoteCluster | unde
defaultMessage="A list of all the channels shared with your organization and channels you're sharing externally."
/>
-
-
+ }/>}
+ >
-
+
{showTabs && (
@@ -366,10 +369,6 @@ const Placeholder = (props: {filter: 'home' | 'remote'; rc: RemoteCluster}) => {
);
};
-const AddChannelsButton = styled(Button)`
- padding-left: 15px;
-`;
-
const TabsWrapper = styled.div`
.tabs {
display: flex;
diff --git a/webapp/channels/src/components/admin_console/secure_connections/secure_connection_row.tsx b/webapp/channels/src/components/admin_console/secure_connections/secure_connection_row.tsx
index 69c4263c4bb..10c0db9a8f0 100644
--- a/webapp/channels/src/components/admin_console/secure_connections/secure_connection_row.tsx
+++ b/webapp/channels/src/components/admin_console/secure_connections/secure_connection_row.tsx
@@ -1,16 +1,18 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
-import React from 'react';
+import React, {forwardRef} from 'react';
import {FormattedMessage, useIntl} from 'react-intl';
import {Link, useHistory} from 'react-router-dom';
import styled from 'styled-components';
import {DotsHorizontalIcon, CodeTagsIcon, PencilOutlineIcon, TrashCanOutlineIcon} from '@mattermost/compass-icons/components';
-import {buttonClassNames} from '@mattermost/shared/components/button';
+import {Icon} from '@mattermost/compass-ui/components/icon';
+import {IconButton} from '@mattermost/compass-ui/components/icon-button';
import type {RemoteCluster} from '@mattermost/types/remote_clusters';
import * as Menu from 'components/menu';
+import type {MenuButtonComponentProps} from 'components/menu';
import {ConnectionStatusLabel} from './controls';
import {useRemoteClusterCreateInvite, useRemoteClusterDelete} from './modals/modal_utils';
@@ -43,6 +45,17 @@ export default function SecureConnectionRow(props: Props) {
const menuId = 'secure_connection_row_menu';
+const RowMenuTrigger = forwardRef((props, ref) => (
+ }/>}
+ />
+));
+RowMenuTrigger.displayName = 'RowMenuTrigger';
+
const RowMenu = ({remoteCluster: rc, onDeleteSuccess, disabled}: Props) => {
const {formatMessage} = useIntl();
const history = useHistory();
@@ -65,9 +78,8 @@ const RowMenu = ({remoteCluster: rc, onDeleteSuccess, disabled}: Props) => {
,
'aria-label': formatMessage({id: 'admin.secure_connection_row.menu-button.aria_label', defaultMessage: 'Connection options for {connection}'}, {connection: rc.display_name}),
}}
menu={{
@@ -131,10 +143,6 @@ const RowLink = styled(Link).attrs({className: 'secure-connection
&:last-child {
border-bottom: 0;
}
-
- .connection-row-menu-button {
- padding: 0px 8px;
- }
`;
const Title = styled.strong`
diff --git a/webapp/channels/src/components/admin_console/secure_connections/secure_connections.tsx b/webapp/channels/src/components/admin_console/secure_connections/secure_connections.tsx
index ab8e49c5c29..a574720c224 100644
--- a/webapp/channels/src/components/admin_console/secure_connections/secure_connections.tsx
+++ b/webapp/channels/src/components/admin_console/secure_connections/secure_connections.tsx
@@ -2,16 +2,18 @@
// See LICENSE.txt for license information.
import type {ReactNode} from 'react';
-import React from 'react';
+import React, {forwardRef} from 'react';
import {useIntl, FormattedMessage, defineMessages} from 'react-intl';
import {useHistory} from 'react-router-dom';
+import {ChevronDownIcon} from '@mattermost/compass-icons/components';
+import {Button, type ButtonEmphasis} from '@mattermost/compass-ui/components/button';
+import {Icon} from '@mattermost/compass-ui/components/icon';
import {SectionNotice} from '@mattermost/compass-ui/components/section-notice';
-import type {ButtonEmphasis} from '@mattermost/shared/components/button';
-import {buttonClassNames} from '@mattermost/shared/components/button';
import LoadingScreen from 'components/loading_screen';
import * as Menu from 'components/menu';
+import type {MenuButtonComponentProps} from 'components/menu';
import AdminHeader from 'components/widgets/admin_console/admin_header';
import BuildingSvg from './building.svg';
@@ -115,6 +117,28 @@ const Placeholder = ({disabled, serviceNotRunning}: {disabled: boolean; serviceN
const menuId = 'secure_connections_add_menu';
+const makeAddConnectionMenuTrigger = (emphasis: ButtonEmphasis) => {
+ const Trigger = forwardRef((props, ref) => {
+ const {children, disabled, ...rest} = props;
+ return (
+ }/>}
+ >
+ {children}
+
+ );
+ });
+ Trigger.displayName = 'AddConnectionMenuTrigger';
+ return Trigger;
+};
+
+const AddConnectionPrimaryMenuTrigger = makeAddConnectionMenuTrigger('primary');
+const AddConnectionTertiaryMenuTrigger = makeAddConnectionMenuTrigger('tertiary');
+
const AddMenu = ({buttonEmphasis = 'primary', disabled}: {buttonEmphasis?: ButtonEmphasis; disabled: boolean}) => {
const {formatMessage} = useIntl();
const history = useHistory();
@@ -135,19 +159,9 @@ const AddMenu = ({buttonEmphasis = 'primary', disabled}: {buttonEmphasis?: Butto
-
- {!disabled && (
-
- )}
- >
- ),
+ children: ,
}}
menu={{
id: menuId,
diff --git a/webapp/channels/src/components/admin_console/server_logs/log_list.tsx b/webapp/channels/src/components/admin_console/server_logs/log_list.tsx
index 97a006f21b6..10f920c9990 100644
--- a/webapp/channels/src/components/admin_console/server_logs/log_list.tsx
+++ b/webapp/channels/src/components/admin_console/server_logs/log_list.tsx
@@ -6,6 +6,9 @@ import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react';
import type {MessageDescriptor} from 'react-intl';
import {FormattedMessage, defineMessages, useIntl} from 'react-intl';
+import {DownloadOutlineIcon, RefreshIcon} from '@mattermost/compass-icons/components';
+import {Button} from '@mattermost/compass-ui/components/button';
+import {Icon} from '@mattermost/compass-ui/components/icon';
import {WithTooltip} from '@mattermost/shared/components/tooltip';
import {LogNodeKey} from '@mattermost/types/admin';
@@ -661,34 +664,33 @@ export default function LogList({
- }/>}
>
-
-
-
+ }/>}
>
-
-
-
+
+
+
+
);
@@ -861,9 +863,9 @@ export default function LogList({
-
setWrapText(!wrapText)}
aria-pressed={wrapText}
>
@@ -871,7 +873,7 @@ export default function LogList({
id='admin.logs.wrap'
defaultMessage='Wrap text'
/>
-
+
diff --git a/webapp/channels/src/components/admin_console/server_logs/log_row.tsx b/webapp/channels/src/components/admin_console/server_logs/log_row.tsx
index 1a212f6fd48..74ada0e86a3 100644
--- a/webapp/channels/src/components/admin_console/server_logs/log_row.tsx
+++ b/webapp/channels/src/components/admin_console/server_logs/log_row.tsx
@@ -7,6 +7,9 @@ import {FormattedMessage, defineMessage, useIntl} from 'react-intl';
import {useSelector} from 'react-redux';
import {Link} from 'react-router-dom';
+import {CheckIcon, ContentCopyIcon} from '@mattermost/compass-icons/components';
+import {Button} from '@mattermost/compass-ui/components/button';
+import {Icon} from '@mattermost/compass-ui/components/icon';
import {LogNodeKey} from '@mattermost/types/admin';
import {useUser} from 'components/common/hooks/useUser';
@@ -362,12 +365,12 @@ function LogRow({log, isExpanded, isFocused, onToggleExpand, onFocus, searchTerm
)}
- : }/>}
>
-
{copyJsonSuccess ? (
)}
-
-
+ : }/>}
>
-
{copyLineSuccess ? (
)}
-
+
)}
diff --git a/webapp/channels/src/components/admin_console/server_logs/plain_log_list.tsx b/webapp/channels/src/components/admin_console/server_logs/plain_log_list.tsx
index 6fd83c107db..04922940490 100644
--- a/webapp/channels/src/components/admin_console/server_logs/plain_log_list.tsx
+++ b/webapp/channels/src/components/admin_console/server_logs/plain_log_list.tsx
@@ -4,6 +4,9 @@
import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react';
import {FormattedMessage, defineMessages, useIntl} from 'react-intl';
+import {DownloadOutlineIcon, RefreshIcon} from '@mattermost/compass-icons/components';
+import {Button} from '@mattermost/compass-ui/components/button';
+import {Icon} from '@mattermost/compass-ui/components/icon';
import {WithTooltip} from '@mattermost/shared/components/tooltip';
import ExternalLink from 'components/external_link';
@@ -317,28 +320,33 @@ export default function PlainLogList({
-
}/>}
>
-
-
-
+ }/>}
>
-
-
-
+
+
+
+
-
setWrapText(!wrapText)}
aria-pressed={wrapText}
>
@@ -473,7 +481,7 @@ export default function PlainLogList({
id='admin.logs.wrap'
defaultMessage='Wrap text'
/>
-
+
;
-export const LinkButton = styled.button.attrs({className: 'btn btn-link'})`
- font-weight: normal;
- padding: 8px 16px !important;
- font-size: 12px;
- font-style: normal;
- font-weight: 600;
- line-height: 16px;
- gap: 6px;
-`;
+export const FieldDeleteButton = ({className, style, ...props}: CompassButtonProps) => (
+
+);
+
+export const LinkButton = ({style, ...props}: CompassButtonProps) => (
+
+);
diff --git a/webapp/channels/src/components/admin_console/system_properties/user_properties_delete_modal.tsx b/webapp/channels/src/components/admin_console/system_properties/user_properties_delete_modal.tsx
index ada7f81f69f..1f376aed493 100644
--- a/webapp/channels/src/components/admin_console/system_properties/user_properties_delete_modal.tsx
+++ b/webapp/channels/src/components/admin_console/system_properties/user_properties_delete_modal.tsx
@@ -90,7 +90,7 @@ function RemoveUserPropertyFieldModal({
return (
-
+
Save
- Cancel
+
+ Cancel
+
-
+
Save
- Cancel
+
+ Cancel
+
-
+
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 (
}/>}
+ ref={floatingRefs.setReference}
+ {...getReferenceProps()}
>
-
{formatMessage({id: 'admin.system_users.filtersMenu', defaultMessage: 'Filters ({count})'}, {count: filtersCount})}
{isMounted && (
@@ -162,7 +165,7 @@ export function SystemUsersFilterPopover(props: Props) {
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
+
+
+
+
+ Archive Channel
+
@@ -124,13 +150,39 @@ exports[`admin_console/team_channel_settings/channel/ChannelProfile should match
class="AdminChannelDetails_archiveContainer"
>
-
- Archive Channel
+
+
+
+
+ Archive Channel
+
diff --git a/webapp/channels/src/components/admin_console/team_channel_settings/channel/details/channel_access_control_policy.scss b/webapp/channels/src/components/admin_console/team_channel_settings/channel/details/channel_access_control_policy.scss
index 54dff102c66..ff6b0d9fb53 100644
--- a/webapp/channels/src/components/admin_console/team_channel_settings/channel/details/channel_access_control_policy.scss
+++ b/webapp/channels/src/components/admin_console/team_channel_settings/channel/details/channel_access_control_policy.scss
@@ -86,17 +86,3 @@
}
}
-// Style for the Remove policy button
-#channel_access_control_with_policy,
-#team_access_control_with_policy {
- .btn.btn-primary {
- border-color: var(--dnd-indicator);
- background-color: var(--dnd-indicator);
- color: var(--button-color);
-
- &:hover, &:active, &:focus {
- border-color: rgba(var(--dnd-indicator-rgb), 0.88);
- background-color: rgba(var(--dnd-indicator-rgb), 0.88);
- }
- }
-}
diff --git a/webapp/channels/src/components/admin_console/team_channel_settings/channel/details/channel_access_control_policy.tsx b/webapp/channels/src/components/admin_console/team_channel_settings/channel/details/channel_access_control_policy.tsx
index 5875a3dfd0c..832547678ea 100644
--- a/webapp/channels/src/components/admin_console/team_channel_settings/channel/details/channel_access_control_policy.tsx
+++ b/webapp/channels/src/components/admin_console/team_channel_settings/channel/details/channel_access_control_policy.tsx
@@ -5,7 +5,6 @@ import React, {useState, type JSX} from 'react';
import {FormattedMessage, defineMessage, useIntl} from 'react-intl';
import {Link} from 'react-router-dom';
-import {Button} from '@mattermost/shared/components/button';
import type {AccessControlPolicy} from '@mattermost/types/access_control';
import type {ActionResult} from 'mattermost-redux/types/actions';
@@ -87,7 +86,8 @@ export const ChannelAccessControl: React.FC = (props: Props): JSX.Element
>
- = (props: Props): JSX.Element
}}
>
-
+
))}
@@ -138,6 +138,7 @@ export const ChannelAccessControl: React.FC = (props: Props): JSX.Element
title={defineMessage({id: 'admin.channel_settings.channel_detail.access_control_policy_title', defaultMessage: 'Membership policy'})}
subtitle={defineMessage({id: 'admin.channel_settings.channel_detail.policy_following', defaultMessage: 'This channel is currently using the following membership policy.'})}
buttonText={defineMessage({id: 'admin.channel_settings.channel_detail.remove_policy', defaultMessage: 'Remove all'})}
+ destructive={true}
onButtonClick={() => {
actions.onPolicyRemoveAll();
}}
diff --git a/webapp/channels/src/components/admin_console/team_channel_settings/channel/details/channel_groups.tsx b/webapp/channels/src/components/admin_console/team_channel_settings/channel/details/channel_groups.tsx
index 6a07da32c30..5e0d234b0e1 100644
--- a/webapp/channels/src/components/admin_console/team_channel_settings/channel/details/channel_groups.tsx
+++ b/webapp/channels/src/components/admin_console/team_channel_settings/channel/details/channel_groups.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 {Channel} from '@mattermost/types/channels';
import type {Group} from '@mattermost/types/groups';
@@ -44,7 +43,7 @@ export const ChannelGroups: React.FunctionComponent = (props
button={
- Add Members
+
+ Add Members
+
@@ -64,13 +69,40 @@ exports[`admin_console/team_channel_settings/channel/ChannelMembers should match
class="Filter"
>
-
- Filters
+
+
+
+
+ Filters
+
- Apply
+
+ Apply
+
@@ -329,10 +365,15 @@ exports[`admin_console/team_channel_settings/channel/ChannelMembers should match
class="button"
>
- Add Members
+
+ Add Members
+
@@ -370,13 +411,40 @@ exports[`admin_console/team_channel_settings/channel/ChannelMembers should match
class="Filter"
>
-
- Filters
+
+
+
+
+ Filters
+
- Apply
+
+ Apply
+
diff --git a/webapp/channels/src/components/admin_console/team_channel_settings/channel/details/channel_members/channel_members.tsx b/webapp/channels/src/components/admin_console/team_channel_settings/channel/details/channel_members/channel_members.tsx
index cc569573ca0..429ab66f6f1 100644
--- a/webapp/channels/src/components/admin_console/team_channel_settings/channel/details/channel_members/channel_members.tsx
+++ b/webapp/channels/src/components/admin_console/team_channel_settings/channel/details/channel_members/channel_members.tsx
@@ -4,7 +4,6 @@
import React from 'react';
import {FormattedMessage, defineMessage} from 'react-intl';
-import {buttonClassNames} from '@mattermost/shared/components/button';
import type {Channel, ChannelMembership} from '@mattermost/types/channels';
import type {UserProfile, GetFilteredUsersStatsOpts} from '@mattermost/types/users';
@@ -240,7 +239,7 @@ export default class ChannelMembers extends React.PureComponent {
button={
{
: }
+ />
+ )}
>
- {isArchived ? : }
diff --git a/webapp/channels/src/components/admin_console/team_channel_settings/channel/list/__snapshots__/channel_list.test.tsx.snap b/webapp/channels/src/components/admin_console/team_channel_settings/channel/list/__snapshots__/channel_list.test.tsx.snap
index e21d7a1ada3..76ff3b2e036 100644
--- a/webapp/channels/src/components/admin_console/team_channel_settings/channel/list/__snapshots__/channel_list.test.tsx.snap
+++ b/webapp/channels/src/components/admin_console/team_channel_settings/channel/list/__snapshots__/channel_list.test.tsx.snap
@@ -39,13 +39,40 @@ exports[`admin_console/team_channel_settings/channel/ChannelList should match sn
class="Filter"
>
-
- Filters
+
+
+
+
+ Filters
+
- Apply
+
+ Apply
+
@@ -547,13 +578,40 @@ exports[`admin_console/team_channel_settings/channel/ChannelList should match sn
class="Filter"
>
-
- Filters
+
+
+
+
+ Filters
+
- Apply
+
+ Apply
+
@@ -1810,13 +1872,40 @@ exports[`admin_console/team_channel_settings/channel/ChannelList should match sn
class="Filter"
>
-
- Filters
+
+
+
+
+ Filters
+
- Apply
+
+ Apply
+
@@ -2322,13 +2415,40 @@ exports[`admin_console/team_channel_settings/channel/ChannelList should render c
class="Filter"
>
-
- Filters
+
+
+
+
+ Filters
+
- Apply
+
+ Apply
+
@@ -2822,13 +2946,40 @@ exports[`admin_console/team_channel_settings/channel/ChannelList should render c
class="Filter"
>
-
- Filters
+
+
+
+
+ Filters
+
- Apply
+
+ Apply
+
diff --git a/webapp/channels/src/components/admin_console/team_channel_settings/errors.tsx b/webapp/channels/src/components/admin_console/team_channel_settings/errors.tsx
index d9210d5ef65..c11701cabff 100644
--- a/webapp/channels/src/components/admin_console/team_channel_settings/errors.tsx
+++ b/webapp/channels/src/components/admin_console/team_channel_settings/errors.tsx
@@ -4,7 +4,6 @@
import React from 'react';
import {FormattedMessage} from 'react-intl';
-import {buttonClassNames} from '@mattermost/shared/components/button';
import type {UserProfile} from '@mattermost/types/users';
import FormError from 'components/form_error';
@@ -89,7 +88,7 @@ export const UsersWillBeRemovedError = ({users, total, scope, scopeId}: UsersWil
{error}
-
+
+
+
-
+
+
+
@@ -731,24 +739,32 @@ exports[`admin_console/team_channel_settings/group/GroupList should match snapsh
1 - 10 of 30
-
+
+
+
-
+
+
+
diff --git a/webapp/channels/src/components/admin_console/team_channel_settings/group/__snapshots__/group_members_modal.test.tsx.snap b/webapp/channels/src/components/admin_console/team_channel_settings/group/__snapshots__/group_members_modal.test.tsx.snap
index 920d64b6d18..33a616e3315 100644
--- a/webapp/channels/src/components/admin_console/team_channel_settings/group/__snapshots__/group_members_modal.test.tsx.snap
+++ b/webapp/channels/src/components/admin_console/team_channel_settings/group/__snapshots__/group_members_modal.test.tsx.snap
@@ -123,11 +123,15 @@ exports[`admin_console/team_channel_settings/group/GroupList should match snapsh
class="modal-footer"
>
- Close
+
+ Close
+
diff --git a/webapp/channels/src/components/admin_console/team_channel_settings/group/group_members_modal.tsx b/webapp/channels/src/components/admin_console/team_channel_settings/group/group_members_modal.tsx
index cf603c6b24a..e0395224b30 100644
--- a/webapp/channels/src/components/admin_console/team_channel_settings/group/group_members_modal.tsx
+++ b/webapp/channels/src/components/admin_console/team_channel_settings/group/group_members_modal.tsx
@@ -5,7 +5,7 @@ import React, {useState, useEffect, useCallback} 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 {Group} from '@mattermost/types/groups';
import MemberListGroup from 'components/admin_console/member_list_group';
diff --git a/webapp/channels/src/components/admin_console/team_channel_settings/group/group_users/__snapshots__/users_to_remove.test.tsx.snap b/webapp/channels/src/components/admin_console/team_channel_settings/group/group_users/__snapshots__/users_to_remove.test.tsx.snap
index 3ca24ee1026..e63ee320cad 100644
--- a/webapp/channels/src/components/admin_console/team_channel_settings/group/group_users/__snapshots__/users_to_remove.test.tsx.snap
+++ b/webapp/channels/src/components/admin_console/team_channel_settings/group/group_users/__snapshots__/users_to_remove.test.tsx.snap
@@ -39,13 +39,40 @@ exports[`components/admin_console/team_channel_settings/group/UsersToRemove shou
class="Filter"
>
-
- Filters
+
+
+
+
+ Filters
+
- Apply
+
+ Apply
+
@@ -306,13 +337,40 @@ exports[`components/admin_console/team_channel_settings/group/UsersToRemove shou
class="Filter"
>
-
- Filters
+
+
+
+
+ Filters
+
- Apply
+
+ Apply
+
@@ -707,13 +769,40 @@ exports[`components/admin_console/team_channel_settings/group/UsersToRemove shou
class="Filter"
>
-
- Filters
+
+
+
+
+ Filters
+
- Apply
+
+ Apply
+
diff --git a/webapp/channels/src/components/admin_console/team_channel_settings/team/details/__snapshots__/team_details.test.tsx.snap b/webapp/channels/src/components/admin_console/team_channel_settings/team/details/__snapshots__/team_details.test.tsx.snap
index 17387f76f1d..da00e704d2e 100644
--- a/webapp/channels/src/components/admin_console/team_channel_settings/team/details/__snapshots__/team_details.test.tsx.snap
+++ b/webapp/channels/src/components/admin_console/team_channel_settings/team/details/__snapshots__/team_details.test.tsx.snap
@@ -171,22 +171,28 @@ exports[`admin_console/team_channel_settings/team/TeamDetails should match snaps
class="admin-console-save"
>
-
+
Save
- Cancel
+
+ Cancel
+
@@ -80,25 +85,33 @@ exports[`admin_console/team_channel_settings/team/TeamGroups should match snapsh
1 - 1 of 1
-
+
+
+
-
+
+
+
diff --git a/webapp/channels/src/components/admin_console/team_channel_settings/team/details/__snapshots__/team_profile.test.tsx.snap b/webapp/channels/src/components/admin_console/team_channel_settings/team/details/__snapshots__/team_profile.test.tsx.snap
index 9d7afd3a039..2b7eb1526bd 100644
--- a/webapp/channels/src/components/admin_console/team_channel_settings/team/details/__snapshots__/team_profile.test.tsx.snap
+++ b/webapp/channels/src/components/admin_console/team_channel_settings/team/details/__snapshots__/team_profile.test.tsx.snap
@@ -125,13 +125,39 @@ exports[`admin_console/team_channel_settings/team/TeamProfile should match snaps
class="AdminChannelDetails_archiveContainer"
>
-
- Archive Team
+
+
+
+
+ Archive Team
+
@@ -265,13 +291,39 @@ exports[`admin_console/team_channel_settings/team/TeamProfile should match snaps
class="AdminChannelDetails_archiveContainer"
>
-
- Unarchive Team
+
+
+
+
+ Unarchive Team
+
@@ -405,13 +457,39 @@ exports[`admin_console/team_channel_settings/team/TeamProfile__Cloud restore sho
class="AdminChannelDetails_archiveContainer"
>
-
- Unarchive Team
+
+
+
+
+ Unarchive Team
+
@@ -545,20 +623,50 @@ exports[`admin_console/team_channel_settings/team/TeamProfile__Cloud should matc
class="AdminChannelDetails_archiveContainer"
>
-
- Unarchive Team
+
+
+
+
+ Unarchive Team
+
- View upgrade options
+
+ View upgrade options
+
@@ -692,13 +800,39 @@ exports[`admin_console/team_channel_settings/team/TeamProfile__Cloud should matc
class="AdminChannelDetails_archiveContainer"
>
-
- Archive Team
+
+
+
+
+ Archive Team
+
diff --git a/webapp/channels/src/components/admin_console/team_channel_settings/team/details/team_access_control_policy.tsx b/webapp/channels/src/components/admin_console/team_channel_settings/team/details/team_access_control_policy.tsx
index f517b239926..28a1cf081d3 100644
--- a/webapp/channels/src/components/admin_console/team_channel_settings/team/details/team_access_control_policy.tsx
+++ b/webapp/channels/src/components/admin_console/team_channel_settings/team/details/team_access_control_policy.tsx
@@ -89,7 +89,7 @@ export const TeamAccessControl: React.FC = (props: Props): JSX.Element =>
defaultMessage='Remove policy'
/>
}
- confirmButtonVariant='destructive'
+ destructive={true}
cancelButtonText={
- Add Members
+
+ Add Members
+
@@ -64,13 +69,40 @@ exports[`admin_console/team_channel_settings/team/TeamMembers should match snaps
class="Filter"
>
-
- Filters
+
+
+
+
+ Filters
+
- Apply
+
+ Apply
+
@@ -329,10 +365,15 @@ exports[`admin_console/team_channel_settings/team/TeamMembers should match snaps
class="button"
>
- Add Members
+
+ Add Members
+
@@ -370,13 +411,40 @@ exports[`admin_console/team_channel_settings/team/TeamMembers should match snaps
class="Filter"
>
-
- Filters
+
+
+
+
+ Filters
+
- Apply
+
+ Apply
+
diff --git a/webapp/channels/src/components/admin_console/team_channel_settings/team/details/team_members/team_members.tsx b/webapp/channels/src/components/admin_console/team_channel_settings/team/details/team_members/team_members.tsx
index f4483e7f9f1..efdddd09126 100644
--- a/webapp/channels/src/components/admin_console/team_channel_settings/team/details/team_members/team_members.tsx
+++ b/webapp/channels/src/components/admin_console/team_channel_settings/team/details/team_members/team_members.tsx
@@ -4,7 +4,6 @@
import React from 'react';
import {FormattedMessage, defineMessage} from 'react-intl';
-import {buttonClassNames} from '@mattermost/shared/components/button';
import type {TeamMembership, Team} from '@mattermost/types/teams';
import type {UserProfile, GetFilteredUsersStatsOpts} from '@mattermost/types/users';
@@ -241,7 +240,7 @@ export default class TeamMembers extends React.PureComponent {
button={
- {isArchived ? (
-
- ) : (
-
+ destructive={true}
+ leadingIcon={(
+ : }
+ />
)}
+ >
@@ -91,14 +93,14 @@ export function TeamProfile({team, name, description, onNameChange, onDescriptio
type='button'
disabled={isDisabled}
emphasis='secondary'
- variant='destructive'
+ destructive={true}
onClick={toggleArchive}
- >
- {isArchived ? (
-
- ) : (
-
+ leadingIcon={(
+ : }
+ />
)}
+ >
);
diff --git a/webapp/channels/src/components/admin_console/team_channel_settings/users_to_be_removed_modal.tsx b/webapp/channels/src/components/admin_console/team_channel_settings/users_to_be_removed_modal.tsx
index 5c48dcba3ca..ea9c55d26f5 100644
--- a/webapp/channels/src/components/admin_console/team_channel_settings/users_to_be_removed_modal.tsx
+++ b/webapp/channels/src/components/admin_console/team_channel_settings/users_to_be_removed_modal.tsx
@@ -5,7 +5,7 @@ import React, {useCallback, useState} 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 {UserProfile} from '@mattermost/types/users';
import GroupsUsers from './group/group_users';
diff --git a/webapp/channels/src/components/admin_console/user_grid/__snapshots__/user_grid.test.tsx.snap b/webapp/channels/src/components/admin_console/user_grid/__snapshots__/user_grid.test.tsx.snap
index c601d617d33..7bcc4253231 100644
--- a/webapp/channels/src/components/admin_console/user_grid/__snapshots__/user_grid.test.tsx.snap
+++ b/webapp/channels/src/components/admin_console/user_grid/__snapshots__/user_grid.test.tsx.snap
@@ -36,13 +36,40 @@ exports[`components/admin_console/user_grid/UserGrid should match snapshot with
class="Filter"
>
-
- Filters
+
+
+
+
+ Filters
+
- Apply
+
+ Apply
+
@@ -304,13 +335,40 @@ exports[`components/admin_console/user_grid/UserGrid should match snapshot with
class="Filter"
>
-
- Filters
+
+
+
+
+ Filters
+
- Apply
+
+ Apply
+
@@ -647,13 +709,40 @@ exports[`components/admin_console/user_grid/UserGrid should match snapshot with
class="Filter"
>
-
- Filters
+
+
+
+
+ Filters
+
- Apply
+
+ Apply
+
diff --git a/webapp/channels/src/components/admin_console/workspace-optimization/__snapshots__/cta_buttons.test.tsx.snap b/webapp/channels/src/components/admin_console/workspace-optimization/__snapshots__/cta_buttons.test.tsx.snap
index a79ee7ab43a..3d382b24664 100644
--- a/webapp/channels/src/components/admin_console/workspace-optimization/__snapshots__/cta_buttons.test.tsx.snap
+++ b/webapp/channels/src/components/admin_console/workspace-optimization/__snapshots__/cta_buttons.test.tsx.snap
@@ -6,14 +6,24 @@ exports[`components/admin_console/workspace-optimization/cta_buttons should matc
class="ctaButtons"
>
- Action Text
+
+ Action Text
+
- Learn More
+
+ Learn More
+
diff --git a/webapp/channels/src/components/admin_console/workspace-optimization/cta_buttons.tsx b/webapp/channels/src/components/admin_console/workspace-optimization/cta_buttons.tsx
index 5827098cb30..b732ec749e5 100644
--- a/webapp/channels/src/components/admin_console/workspace-optimization/cta_buttons.tsx
+++ b/webapp/channels/src/components/admin_console/workspace-optimization/cta_buttons.tsx
@@ -4,7 +4,7 @@
import React, {type JSX} from 'react';
import {useHistory} from 'react-router-dom';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import './dashboard.scss';
@@ -40,7 +40,7 @@ const CtaButtons = ({
{(actionLink || actionButtonCallback) && actionText && (
@@ -50,7 +50,7 @@ const CtaButtons = ({
{learnMoreLink && learnMoreText && (
{learnMoreText}
diff --git a/webapp/channels/src/components/admin_console/workspace-optimization/dashboard.scss b/webapp/channels/src/components/admin_console/workspace-optimization/dashboard.scss
index 32e1733d655..9c20d35dca6 100644
--- a/webapp/channels/src/components/admin_console/workspace-optimization/dashboard.scss
+++ b/webapp/channels/src/components/admin_console/workspace-optimization/dashboard.scss
@@ -295,18 +295,10 @@
.ctaButtons {
display: flex;
+ flex-wrap: wrap;
justify-content: flex-start;
margin: 15px 0 0 0;
-
- a,
- button {
- max-height: 32px;
- padding: 5px 20px !important;
- border-radius: 4px !important;
- margin-top: 0;
- margin-right: 10px;
- font-weight: 600;
- }
+ gap: 8px;
}
}
}
diff --git a/webapp/channels/src/components/advanced_text_editor/rewrite_menu.tsx b/webapp/channels/src/components/advanced_text_editor/rewrite_menu.tsx
index 80aa570339a..2629e310c5b 100644
--- a/webapp/channels/src/components/advanced_text_editor/rewrite_menu.tsx
+++ b/webapp/channels/src/components/advanced_text_editor/rewrite_menu.tsx
@@ -17,7 +17,8 @@ import {
AutoFixIcon,
SpellcheckIcon,
} from '@mattermost/compass-icons/components';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
+import {Icon} from '@mattermost/compass-ui/components/icon';
import type {Agent} from '@mattermost/types/agents';
import {getDefaultAgent} from 'mattermost-redux/selectors/entities/agents';
@@ -164,11 +165,11 @@ export default function RewriteMenu({
/>
}/>}
>
-
}/>}
>
-
}/>}
>
-
}/>}
>
-
}/>}
>
-
}/>}
>
-
Enterprise license is expired and some features may be disabled.
- Contact sales
+
+ Contact sales
+
@@ -55,9 +60,14 @@ exports[`components/ConfigurationBar should match snapshot, expired, in grace pe
/>
Enterprise license is expired and some features may be disabled.
- Contact sales
+
+ Contact sales
+
@@ -112,9 +122,14 @@ exports[`components/ConfigurationBar should match snapshot, expiring, trial lice
/>
This is the last day of your free trial. Purchase a license now to continue using Mattermost Professional and Enterprise features.
- Purchase a License Now
+
+ Purchase a License Now
+
@@ -147,9 +162,14 @@ exports[`components/ConfigurationBar should match snapshot, expiring, trial lice
/>
This is the last day of your free trial.
- Purchase a License Now
+
+ Purchase a License Now
+
diff --git a/webapp/channels/src/components/announcement_bar/contact_sales/contact_us.tsx b/webapp/channels/src/components/announcement_bar/contact_sales/contact_us.tsx
index c41c7780a6c..18e9e5debdb 100644
--- a/webapp/channels/src/components/announcement_bar/contact_sales/contact_us.tsx
+++ b/webapp/channels/src/components/announcement_bar/contact_sales/contact_us.tsx
@@ -5,7 +5,7 @@ import classNames from 'classnames';
import React, {type JSX} from 'react';
import {FormattedMessage} from 'react-intl';
-import {Button, type ButtonEmphasis} from '@mattermost/shared/components/button';
+import {Button, type ButtonEmphasis} from '@mattermost/compass-ui/components/button';
import useOpenSalesLink from 'components/common/hooks/useOpenSalesLink';
diff --git a/webapp/channels/src/components/announcement_bar/default_announcement_bar/announcement_bar.tsx b/webapp/channels/src/components/announcement_bar/default_announcement_bar/announcement_bar.tsx
index bd236fe8908..bb41269ea13 100644
--- a/webapp/channels/src/components/announcement_bar/default_announcement_bar/announcement_bar.tsx
+++ b/webapp/channels/src/components/announcement_bar/default_announcement_bar/announcement_bar.tsx
@@ -6,7 +6,7 @@ import React 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 {WithTooltip} from '@mattermost/shared/components/tooltip';
import FormattedMarkdownMessage from 'components/formatted_markdown_message';
@@ -196,11 +196,12 @@ export default class AnnouncementBar extends React.PureComponent {
{
this.props.showLinkAsButton && this.props.showCTA && this.props.modalButtonText &&
{
{
this.props.showLinkAsButton && this.props.showCTA && this.props.ctaText &&
{this.props.ctaText}
diff --git a/webapp/channels/src/components/announcement_bar/notification_permission_bar/__snapshots__/index.test.tsx.snap b/webapp/channels/src/components/announcement_bar/notification_permission_bar/__snapshots__/index.test.tsx.snap
index b9f6346116f..e4f01118ae4 100644
--- a/webapp/channels/src/components/announcement_bar/notification_permission_bar/__snapshots__/index.test.tsx.snap
+++ b/webapp/channels/src/components/announcement_bar/notification_permission_bar/__snapshots__/index.test.tsx.snap
@@ -15,9 +15,14 @@ exports[`NotificationPermissionBar should render the NotificationPermissionNever
We need your permission to show notifications in the browser.
- Manage notification preferences
+
+ Manage notification preferences
+
- Update your browser
+
+ Update your browser
+
= (props: Props) => {
diff --git a/webapp/channels/src/components/announcement_bar/renewal_link/renewal_link.tsx b/webapp/channels/src/components/announcement_bar/renewal_link/renewal_link.tsx
index 8f8d34bc855..22a91ebdd74 100644
--- a/webapp/channels/src/components/announcement_bar/renewal_link/renewal_link.tsx
+++ b/webapp/channels/src/components/announcement_bar/renewal_link/renewal_link.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 useOpenSalesLink from 'components/common/hooks/useOpenSalesLink';
@@ -32,8 +32,8 @@ const RenewalLink = (props: RenewalLinkProps) => {
return (
handleLinkClick(e)}
diff --git a/webapp/channels/src/components/apps_form/__snapshots__/apps_form_container.test.tsx.snap b/webapp/channels/src/components/apps_form/__snapshots__/apps_form_container.test.tsx.snap
index 39659b47cc6..5fd1e638d85 100644
--- a/webapp/channels/src/components/apps_form/__snapshots__/apps_form_container.test.tsx.snap
+++ b/webapp/channels/src/components/apps_form/__snapshots__/apps_form_container.test.tsx.snap
@@ -229,21 +229,35 @@ exports[`components/apps_form/AppsFormContainer should match snapshot 1`] = `
diff --git a/webapp/channels/src/components/apps_form/apps_form_action_button.test.tsx b/webapp/channels/src/components/apps_form/apps_form_action_button.test.tsx
index 35ac5d55c32..79e2007ecc2 100644
--- a/webapp/channels/src/components/apps_form/apps_form_action_button.test.tsx
+++ b/webapp/channels/src/components/apps_form/apps_form_action_button.test.tsx
@@ -122,7 +122,10 @@ describe('AppsFormActionButton', () => {
);
expect(screen.getByRole('button', {name: label})).toBeVisible();
- expect(container.querySelector('span')).toBeNull();
+
+ // The Compass Button always wraps its label in a span, so assert on the
+ // description wrapper itself rather than on the absence of any span.
+ expect(container.querySelector('.apps-form-action-button__description')).toBeNull();
});
it('invokes executeDialogAction with (url, context, channelId) when clicked', async () => {
diff --git a/webapp/channels/src/components/apps_form/apps_form_action_button.tsx b/webapp/channels/src/components/apps_form/apps_form_action_button.tsx
index 1072d6d903b..dfa27f8034a 100644
--- a/webapp/channels/src/components/apps_form/apps_form_action_button.tsx
+++ b/webapp/channels/src/components/apps_form/apps_form_action_button.tsx
@@ -5,7 +5,7 @@ import React, {useCallback, useEffect, useRef, useState} from 'react';
import {useIntl} from 'react-intl';
import {useDispatch} from 'react-redux';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import {executeDialogAction} from 'actions/integration_actions';
diff --git a/webapp/channels/src/components/apps_form/apps_form_component.scss b/webapp/channels/src/components/apps_form/apps_form_component.scss
index 6c0bbb39886..e8ae7e132d1 100644
--- a/webapp/channels/src/components/apps_form/apps_form_component.scss
+++ b/webapp/channels/src/components/apps_form/apps_form_component.scss
@@ -276,3 +276,16 @@
flex-wrap: nowrap;
}
}
+
+.apps-form-footer {
+ display: flex;
+ width: 100%;
+ flex-direction: column;
+ gap: var(--spacing-xs, 8px);
+}
+
+.apps-form-footer__buttons {
+ display: flex;
+ justify-content: flex-end;
+ gap: var(--spacing-xs, 8px);
+}
diff --git a/webapp/channels/src/components/apps_form/apps_form_component.tsx b/webapp/channels/src/components/apps_form/apps_form_component.tsx
index 1957095a190..7981f6767c8 100644
--- a/webapp/channels/src/components/apps_form/apps_form_component.tsx
+++ b/webapp/channels/src/components/apps_form/apps_form_component.tsx
@@ -7,7 +7,7 @@ import {Modal, Fade} from 'react-bootstrap';
import {defineMessage, FormattedMessage, injectIntl} from 'react-intl';
import type {WrappedComponentProps} from 'react-intl';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import type {AppCallResponse, AppField, AppForm, AppFormValues, AppSelectOption, FormResponseData, AppLookupResponse, AppFormValue} from '@mattermost/types/apps';
import type {DialogElement} from '@mattermost/types/integrations';
@@ -1017,15 +1017,15 @@ export class AppsForm extends React.PureComponent {
}
return (
- <>
-
- {this.state.formError && (
-
-
-
-
+
+ {this.state.formError && (
+
+ )}
+
{
{submitButtons}
- >
+
);
}
diff --git a/webapp/channels/src/components/apps_form/apps_form_file_upload/apps_form_file_upload.tsx b/webapp/channels/src/components/apps_form/apps_form_file_upload/apps_form_file_upload.tsx
index dcd729967e0..dc62c317e4f 100644
--- a/webapp/channels/src/components/apps_form/apps_form_file_upload/apps_form_file_upload.tsx
+++ b/webapp/channels/src/components/apps_form/apps_form_file_upload/apps_form_file_upload.tsx
@@ -5,7 +5,7 @@ import React, {useCallback, useEffect, useRef, useState} from 'react';
import {FormattedMessage, 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 type {ServerError} from '@mattermost/types/errors';
import type {FileInfo} from '@mattermost/types/files';
import {MaxDialogFileIds} from '@mattermost/types/integrations';
diff --git a/webapp/channels/src/components/authorize/authorize.tsx b/webapp/channels/src/components/authorize/authorize.tsx
index a84aa3bf752..a5a0b358a17 100644
--- a/webapp/channels/src/components/authorize/authorize.tsx
+++ b/webapp/channels/src/components/authorize/authorize.tsx
@@ -5,7 +5,7 @@ import React from 'react';
import type {ReactNode} from 'react';
import {FormattedMessage} from 'react-intl';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import type {OAuthApp} from '@mattermost/types/integrations';
import type {ActionResult} from 'mattermost-redux/types/actions';
diff --git a/webapp/channels/src/components/backstage/components/backstage_list.tsx b/webapp/channels/src/components/backstage/components/backstage_list.tsx
index 64f29a9f235..49173b9944c 100644
--- a/webapp/channels/src/components/backstage/components/backstage_list.tsx
+++ b/webapp/channels/src/components/backstage/components/backstage_list.tsx
@@ -6,7 +6,7 @@ import type {ChangeEvent, JSX, ReactNode} from 'react';
import {FormattedMessage, useIntl} 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 LoadingScreen from 'components/loading_screen';
import NextIcon from 'components/widgets/icons/fa_next_icon';
@@ -114,22 +114,20 @@ const BackstageList = (remainingProps: Props) => {
let addLink = null;
- if (remainingProps.addLink && remainingProps.addText) {
+ const addLinkPath = remainingProps.addLink;
+ if (addLinkPath && remainingProps.addText) {
addLink = (
-
-
+
{remainingProps.addText}
-
-
+
+
);
}
diff --git a/webapp/channels/src/components/block_renderer/block_renderer.scss b/webapp/channels/src/components/block_renderer/block_renderer.scss
index 93d58a1dd83..2981b6a1c6b 100644
--- a/webapp/channels/src/components/block_renderer/block_renderer.scss
+++ b/webapp/channels/src/components/block_renderer/block_renderer.scss
@@ -53,18 +53,16 @@ $mm-blocks-container-max-heights: (
button {
align-self: flex-start;
- //override global .btn padding and font size:
- &.btn {
- height: 36px;
- padding: 8px 16px;
- font-size: 14px;
- }
-
.LoadingSpinner .spinner {
margin-right: 0px;
}
}
+ // Compass Button medium size with mm_blocks padding (overrides token padding).
+ .mm-blocks-button {
+ padding: 8px 16px !important;
+ }
+
.mm-blocks-container {
width: 100%;
min-width: 0;
@@ -220,20 +218,17 @@ $mm-blocks-container-max-heights: (
margin: 0;
}
- // Button styles automatically add a margin between button siblings.
- // We handle this with flex gap, so we remove this margin.
- .btn + .btn {
- margin-left: 0px;
- }
-
// Legacy attachment action colors (`ActionButton` STATUS_COLORS).
+ // Compass Button uses `--button-fg` for label/icon color.
.mm-blocks-button--good,
.mm-blocks-button--success {
+ --button-fg: rgb(var(--semantic-color-success));
background-color: rgba(var(--semantic-color-success), 0.08) !important;
color: rgb(var(--semantic-color-success)) !important;
&:hover:not(:disabled),
&:focus:not(:disabled) {
+ --button-fg: rgb(var(--semantic-color-success));
background-color: rgba(var(--semantic-color-success), 0.12) !important;
color: rgb(var(--semantic-color-success)) !important;
}
@@ -244,11 +239,13 @@ $mm-blocks-container-max-heights: (
}
.mm-blocks-button--warning {
+ --button-fg: rgb(var(--semantic-color-warning));
background-color: rgba(var(--semantic-color-warning), 0.08) !important;
color: rgb(var(--semantic-color-warning)) !important;
&:hover:not(:disabled),
&:focus:not(:disabled) {
+ --button-fg: rgb(var(--semantic-color-warning));
background-color: rgba(var(--semantic-color-warning), 0.12) !important;
color: rgb(var(--semantic-color-warning)) !important;
}
@@ -258,24 +255,6 @@ $mm-blocks-container-max-heights: (
}
}
- // Avoid global `.app__body .btn.btn-danger` (filled red + white text), which overrides
- // `.btn.btn-tertiary.btn-danger`. Matches legacy `ActionButton` danger styling.
- .mm-blocks-button--danger {
- background-color: rgba(var(--semantic-color-danger), 0.08) !important;
- color: rgb(var(--semantic-color-danger)) !important;
-
- &:hover:not(:disabled),
- &:focus:not(:disabled) {
- background-color: rgba(var(--semantic-color-danger), 0.12) !important;
- color: rgb(var(--semantic-color-danger)) !important;
- }
-
- &:active:not(:disabled) {
- background-color: rgba(var(--semantic-color-danger), 0.16) !important;
- color: rgb(var(--semantic-color-danger)) !important;
- }
- }
-
.mm-blocks-image {
&__frame {
display: block;
diff --git a/webapp/channels/src/components/block_renderer/button_element.test.tsx b/webapp/channels/src/components/block_renderer/button_element.test.tsx
index cecb5e143d9..5df14cc9a66 100644
--- a/webapp/channels/src/components/block_renderer/button_element.test.tsx
+++ b/webapp/channels/src/components/block_renderer/button_element.test.tsx
@@ -54,7 +54,9 @@ describe('ButtonElement', () => {
);
const button = screen.getByRole('button', {name: 'Approve'});
- expect(button).toHaveClass('btn-primary');
+ expect(button.className).toEqual(expect.stringContaining('_button--emphasis-primary'));
+ expect(button.className).toEqual(expect.stringContaining('_button--size-medium'));
+ expect(button).toHaveClass('mm-blocks-button');
expect(button).not.toBeDisabled();
await user.click(button);
@@ -77,6 +79,24 @@ describe('ButtonElement', () => {
expect(screen.getByRole('button', {name: 'Acknowledge'})).toHaveClass('mm-blocks-button--good');
});
+ it('renders danger style as destructive Button', () => {
+ renderWithContext(
+
,
+ );
+
+ const button = screen.getByRole('button', {name: 'Delete'});
+ expect(button.className).toEqual(expect.stringContaining('_button--destructive'));
+ expect(button).not.toHaveClass('mm-blocks-button--danger');
+ });
+
it('applies inline color for hex style', () => {
renderWithContext(
{
expect(button).toBeDisabled();
expect(button).toHaveAttribute('aria-busy', 'true');
- expect(screen.getByTestId('loadingSpinner')).toBeInTheDocument();
+
+ // Compass Spinner is nested under an aria-hidden icon slot, so query the DOM directly.
+ expect(button.querySelector('[role="status"][aria-label="Loading"]')).toBeInTheDocument();
expect(screen.getByText('Approve')).toBeInTheDocument();
resolveAction();
await waitFor(() => expect(button).not.toBeDisabled());
- expect(screen.queryByTestId('loadingSpinner')).not.toBeInTheDocument();
+ expect(button.querySelector('[role="status"][aria-label="Loading"]')).not.toBeInTheDocument();
});
it('renders emoticons in button text', () => {
diff --git a/webapp/channels/src/components/block_renderer/button_element.tsx b/webapp/channels/src/components/block_renderer/button_element.tsx
index e5cab81d9ea..6d4db339831 100644
--- a/webapp/channels/src/components/block_renderer/button_element.tsx
+++ b/webapp/channels/src/components/block_renderer/button_element.tsx
@@ -4,13 +4,13 @@
import React, {useCallback, useContext, useState} from 'react';
import {useSelector} from 'react-redux';
+import {Button} from '@mattermost/compass-ui/components/button';
import {WithTooltip} from '@mattermost/shared/components/tooltip';
import type {MmButtonBlock} from '@mattermost/types/mm_blocks';
import {getTheme} from 'mattermost-redux/selectors/entities/preferences';
import Markdown from 'components/markdown';
-import LoadingSpinner from 'components/widgets/loading/loading_spinner';
import {MmBlocksInteractionsDisabledContext} from './context';
import type {ActionHandler} from './types';
@@ -48,20 +48,23 @@ export const ButtonElement = ({element, onAction}: ButtonElementProps) => {
}
const button = (
-
- {isExecuting && }
-
+
);
if (!element.tooltip) {
diff --git a/webapp/channels/src/components/block_renderer/utils/button.test.ts b/webapp/channels/src/components/block_renderer/utils/button.test.ts
index 6458e959b4c..5abc8629920 100644
--- a/webapp/channels/src/components/block_renderer/utils/button.test.ts
+++ b/webapp/channels/src/components/block_renderer/utils/button.test.ts
@@ -58,29 +58,20 @@ describe('isMmButtonHexColor', () => {
});
describe('mmBlocksButtonClassName', () => {
- it('returns default tertiary classes when style is omitted', () => {
- expect(mmBlocksButtonClassName(undefined)).toBe('btn btn-tertiary');
- });
-
- it('returns primary classes for primary style', () => {
- expect(mmBlocksButtonClassName('primary')).toBe('btn btn-primary');
- });
-
- it('returns danger tertiary classes for danger style', () => {
- expect(mmBlocksButtonClassName('danger')).toBe('btn btn-tertiary mm-blocks-button--danger');
- });
-
- it('returns default tertiary classes for default style', () => {
- expect(mmBlocksButtonClassName('default')).toBe('btn btn-tertiary');
+ it('returns base class when style is omitted, primary, danger, or default', () => {
+ expect(mmBlocksButtonClassName(undefined)).toBe('mm-blocks-button');
+ expect(mmBlocksButtonClassName('primary')).toBe('mm-blocks-button');
+ expect(mmBlocksButtonClassName('danger')).toBe('mm-blocks-button');
+ expect(mmBlocksButtonClassName('default')).toBe('mm-blocks-button');
});
it('returns good classes for good and success styles', () => {
- expect(mmBlocksButtonClassName('good')).toBe('btn btn-tertiary mm-blocks-button--good');
- expect(mmBlocksButtonClassName('success')).toBe('btn btn-tertiary mm-blocks-button--success');
+ expect(mmBlocksButtonClassName('good')).toBe('mm-blocks-button mm-blocks-button--good');
+ expect(mmBlocksButtonClassName('success')).toBe('mm-blocks-button mm-blocks-button--success');
});
it('returns warning classes for warning style', () => {
- expect(mmBlocksButtonClassName('warning')).toBe('btn btn-tertiary mm-blocks-button--warning');
+ expect(mmBlocksButtonClassName('warning')).toBe('mm-blocks-button mm-blocks-button--warning');
});
});
@@ -93,12 +84,14 @@ describe('mmBlocksButtonInlineStyle', () => {
it('returns tinted background for hex colors', () => {
const style = mmBlocksButtonInlineStyle('#28a745', theme);
expect(style?.color).toBe('#28a745');
+ expect(style?.['--button-fg']).toBe('#28a745');
expect(style?.backgroundColor).toMatch(/^rgba\(40,? ?167,? ?69,? ?0\.08\)$/);
});
it('returns tinted background for theme color keys', () => {
const style = mmBlocksButtonInlineStyle('onlineIndicator', theme);
expect(style?.color).toBe(theme.onlineIndicator);
+ expect(style?.['--button-fg']).toBe(theme.onlineIndicator);
expect(style?.backgroundColor).toBeDefined();
});
});
diff --git a/webapp/channels/src/components/block_renderer/utils/button.ts b/webapp/channels/src/components/block_renderer/utils/button.ts
index 6879293251f..5f387f62e2e 100644
--- a/webapp/channels/src/components/block_renderer/utils/button.ts
+++ b/webapp/channels/src/components/block_renderer/utils/button.ts
@@ -3,7 +3,6 @@
import type {CSSProperties} from 'react';
-import {buttonClassNames} from '@mattermost/shared/components/button';
import type {MmButtonStyle} from '@mattermost/types/mm_blocks';
import type {Theme} from 'mattermost-redux/selectors/entities/preferences';
@@ -46,24 +45,17 @@ export function isMmButtonHexColor(style: string | undefined): boolean {
return Boolean(style && MM_BUTTON_HEX_COLOR.test(style));
}
+/** Base class plus extras for semantic colors Compass Button does not express (good/success/warning). */
export function mmBlocksButtonClassName(style: string | undefined): string {
- const base = buttonClassNames({emphasis: style === 'primary' ? 'primary' : 'tertiary'});
- if (!style || style === 'default') {
- return base;
- }
switch (style) {
- case 'primary':
- return base;
- case 'danger':
- return `${base} mm-blocks-button--danger`;
case 'good':
- return `${base} mm-blocks-button--good`;
+ return 'mm-blocks-button mm-blocks-button--good';
case 'success':
- return `${base} mm-blocks-button--success`;
+ return 'mm-blocks-button mm-blocks-button--success';
case 'warning':
- return `${base} mm-blocks-button--warning`;
+ return 'mm-blocks-button mm-blocks-button--warning';
default:
- return base;
+ return 'mm-blocks-button';
}
}
@@ -75,8 +67,12 @@ function resolveMmButtonThemeColor(style: string, theme: Theme): string | undefi
return undefined;
}
+export type MmBlocksButtonCSSProperties = CSSProperties & {
+ '--button-fg'?: string;
+};
+
/** Inline colors for hex values and theme keys (e.g. `onlineIndicator`), matching legacy `ActionButton`. */
-export function mmBlocksButtonInlineStyle(style: string | undefined, theme: Theme): CSSProperties | undefined {
+export function mmBlocksButtonInlineStyle(style: string | undefined, theme: Theme): MmBlocksButtonCSSProperties | undefined {
if (!style || isMmButtonSemanticStyle(style)) {
return undefined;
}
@@ -90,9 +86,11 @@ export function mmBlocksButtonInlineStyle(style: string | undefined, theme: Them
return mmBlocksButtonColorStyle(themeColor);
}
-function mmBlocksButtonColorStyle(color: string): CSSProperties {
+function mmBlocksButtonColorStyle(color: string): MmBlocksButtonCSSProperties {
+ // Compass Button paints label/icon via `--button-fg`, not inherited `color`.
return {
backgroundColor: changeOpacity(color, 0.08),
color,
+ '--button-fg': color,
};
}
diff --git a/webapp/channels/src/components/browse_channels/__snapshots__/browse_channels.test.tsx.snap b/webapp/channels/src/components/browse_channels/__snapshots__/browse_channels.test.tsx.snap
index ec9d994e330..b788be91c07 100644
--- a/webapp/channels/src/components/browse_channels/__snapshots__/browse_channels.test.tsx.snap
+++ b/webapp/channels/src/components/browse_channels/__snapshots__/browse_channels.test.tsx.snap
@@ -304,11 +304,16 @@ exports[`components/BrowseChannels should match snapshot and state 1`] = `
>
- Join
+
+ Join
+
@@ -390,11 +395,16 @@ exports[`components/BrowseChannels should match snapshot and state 1`] = `
>
- Join
+
+ Join
+
diff --git a/webapp/channels/src/components/browse_channels/browse_channels.scss b/webapp/channels/src/components/browse_channels/browse_channels.scss
index a9667280f43..33a2d637821 100644
--- a/webapp/channels/src/components/browse_channels/browse_channels.scss
+++ b/webapp/channels/src/components/browse_channels/browse_channels.scss
@@ -226,14 +226,25 @@
}
}
+ // Row actions are revealed on hover. They cannot use
+ // visibility: hidden -- that takes a control out of the tab order
+ // entirely, so the button can never be focused to reveal itself,
+ // and Withdraw request is the only affordance a pending row has.
+ // pointer-events stops an invisible button swallowing row clicks.
.more-modal__actions {
button {
min-width: 54px;
height: 32px;
font-size: 12px;
font-weight: 600;
- transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
- visibility: hidden;
+ opacity: 0;
+ pointer-events: none;
+ transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
+ }
+
+ button:focus-visible {
+ opacity: 1;
+ pointer-events: auto;
}
}
}
@@ -247,8 +258,9 @@
.more-modal__actions {
.primaryButton,
.outlineButton,
- .btn-tertiary {
- visibility: visible;
+ .withdrawButton {
+ opacity: 1;
+ pointer-events: auto;
}
}
}
diff --git a/webapp/channels/src/components/browse_channels/browse_channels.tsx b/webapp/channels/src/components/browse_channels/browse_channels.tsx
index da896e92dee..f39ed0d829d 100644
--- a/webapp/channels/src/components/browse_channels/browse_channels.tsx
+++ b/webapp/channels/src/components/browse_channels/browse_channels.tsx
@@ -1,11 +1,14 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
-import React, {type JSX} from 'react';
+import React from 'react';
import {FormattedMessage} from 'react-intl';
+import {PlusIcon} from '@mattermost/compass-icons/components';
+import {Button} from '@mattermost/compass-ui/components/button';
+import type {ButtonEmphasis, ButtonSize} from '@mattermost/compass-ui/components/button';
+import {Icon} from '@mattermost/compass-ui/components/icon';
import {GenericModal} from '@mattermost/components';
-import {Button, type ButtonEmphasis, type ButtonSize} from '@mattermost/shared/components/button';
import type {Channel, ChannelJoinRequest, ChannelMembership, ChannelSearchOpts, ChannelsWithTotalCount, GetChannelJoinRequestsOptions} from '@mattermost/types/channels';
import type {RelationOneToOne} from '@mattermost/types/utilities';
@@ -536,7 +539,7 @@ export default class BrowseChannels extends React.PureComponent {
{serverErrorState}
;
}
- const createNewChannelButton = (emphasis: ButtonEmphasis, size: ButtonSize, icon?: JSX.Element) => {
+ const createNewChannelButton = (emphasis: ButtonEmphasis, size: ButtonSize, withLeadingIcon = false) => {
return (
{
type='button'
id='createNewChannelButton'
emphasis={emphasis}
+ size={size}
onClick={this.handleNewChannel}
aria-label={localizeMessage({id: 'more_channels.create', defaultMessage: 'Create New Channel'})}
+ leadingIcon={withLeadingIcon ? }/> : undefined}
>
- {icon}
{
defaultMessage='Try searching different keywords, checking for typos or adjusting the filters.'
/>
- {createNewChannelButton('primary', 'md', )}
+ {createNewChannelButton('primary', 'medium', true)}
>
);
@@ -614,7 +618,7 @@ export default class BrowseChannels extends React.PureComponent {
onExited={this.handleExit}
compassDesign={true}
modalHeaderText={title}
- headerButton={createNewChannelButton('secondary', 'sm')}
+ headerButton={createNewChannelButton('tertiary', 'small')}
autoCloseOnConfirmButton={false}
aria-modal={true}
enforceFocus={false}
diff --git a/webapp/channels/src/components/burn_on_read_confirmation_modal/burn_on_read_confirmation_modal.tsx b/webapp/channels/src/components/burn_on_read_confirmation_modal/burn_on_read_confirmation_modal.tsx
index abea3cb2372..9e166ba4ced 100644
--- a/webapp/channels/src/components/burn_on_read_confirmation_modal/burn_on_read_confirmation_modal.tsx
+++ b/webapp/channels/src/components/burn_on_read_confirmation_modal/burn_on_read_confirmation_modal.tsx
@@ -71,7 +71,7 @@ const BurnOnReadConfirmationModal = ({show, onConfirm, onCancel, loading = false
show={show}
title={title}
message={message}
- confirmButtonVariant='destructive'
+ destructive={true}
confirmButtonText={confirmButtonText}
cancelButtonText={cancelButtonText}
onConfirm={handleConfirm}
diff --git a/webapp/channels/src/components/card/__snapshots__/card.test.tsx.snap b/webapp/channels/src/components/card/__snapshots__/card.test.tsx.snap
index 94dbe3cc91d..59daf86c4a4 100644
--- a/webapp/channels/src/components/card/__snapshots__/card.test.tsx.snap
+++ b/webapp/channels/src/components/card/__snapshots__/card.test.tsx.snap
@@ -63,9 +63,14 @@ exports[`components/card/card should match snapshot when using header content an
- Add policy
+
+ Add policy
+
void;
tooltipText?: string;
+ destructive?: boolean;
};
// This component can be used in the card header
@@ -21,6 +22,7 @@ const TitleAndButtonCardHeader: React.FC = (props: Props) => {
{props.buttonText}
diff --git a/webapp/channels/src/components/channel_bookmarks/bookmark_delete_modal.tsx b/webapp/channels/src/components/channel_bookmarks/bookmark_delete_modal.tsx
index ade2627a270..6a28a9b5453 100644
--- a/webapp/channels/src/components/channel_bookmarks/bookmark_delete_modal.tsx
+++ b/webapp/channels/src/components/channel_bookmarks/bookmark_delete_modal.tsx
@@ -47,7 +47,7 @@ function BookmarkDeleteModal({
return (
{
channel={channel}
closeMembersInviteModal={closeMembersInviteModal}
inviteAsGuest={false}
+ size='large'
term={term}
>
{chunks}
@@ -918,6 +920,10 @@ interface InviteModalLinkProps extends Pick {
id: string;
inviteAsGuest: boolean;
term: string;
+
+ // The Compass label takes its font size from the size class, so callers set
+ // it to match whatever copy the link sits in.
+ size?: ButtonSize;
}
const InviteModalLink = ({
@@ -927,11 +933,14 @@ const InviteModalLink = ({
closeMembersInviteModal,
id,
inviteAsGuest,
+ size,
term,
}: InviteModalLinkProps) => {
return (
- Add Members
+
+ Add Members
+
}
- confirmButtonVariant='destructive'
+ destructive={true}
onConfirm={handleDenyConfirm}
onCancel={() => setShowDenyConfirm(false)}
/>
diff --git a/webapp/channels/src/components/channel_notifications_modal/channel_notifications_modal.tsx b/webapp/channels/src/components/channel_notifications_modal/channel_notifications_modal.tsx
index 39d557e943f..bade8c7347f 100644
--- a/webapp/channels/src/components/channel_notifications_modal/channel_notifications_modal.tsx
+++ b/webapp/channels/src/components/channel_notifications_modal/channel_notifications_modal.tsx
@@ -6,8 +6,8 @@ import {FormattedMessage, useIntl} from 'react-intl';
import type {OnChangeValue} from 'react-select';
import {BellOffOutlineIcon} from '@mattermost/compass-icons/components';
+import {Button} from '@mattermost/compass-ui/components/button';
import {GenericModal} from '@mattermost/components';
-import {Button} from '@mattermost/shared/components/button';
import type {Channel, ChannelMembership, ChannelNotifyProps} from '@mattermost/types/channels';
import type {UserNotifyProps, UserProfile} from '@mattermost/types/users';
@@ -359,7 +359,7 @@ export default function ChannelNotificationsModal(props: Props) {
);
const footerContent = (
-
+ >
);
const headerText = (
diff --git a/webapp/channels/src/components/channel_settings_modal/channel_access_rules_confirm_modal.scss b/webapp/channels/src/components/channel_settings_modal/channel_access_rules_confirm_modal.scss
index 8160c930089..49bef2563a2 100644
--- a/webapp/channels/src/components/channel_settings_modal/channel_access_rules_confirm_modal.scss
+++ b/webapp/channels/src/components/channel_settings_modal/channel_access_rules_confirm_modal.scss
@@ -233,7 +233,7 @@
justify-content: center;
}
- .btn {
+ button {
min-width: 0;
flex: 1;
}
diff --git a/webapp/channels/src/components/channel_settings_modal/channel_access_rules_confirm_modal.tsx b/webapp/channels/src/components/channel_settings_modal/channel_access_rules_confirm_modal.tsx
index 8068af12435..10289aaa2d9 100644
--- a/webapp/channels/src/components/channel_settings_modal/channel_access_rules_confirm_modal.tsx
+++ b/webapp/channels/src/components/channel_settings_modal/channel_access_rules_confirm_modal.tsx
@@ -5,8 +5,8 @@ import React, {useState, useEffect, useCallback} from 'react';
import {FormattedMessage} from 'react-intl';
import {useDispatch} from 'react-redux';
+import {Button} from '@mattermost/compass-ui/components/button';
import {GenericModal} from '@mattermost/components';
-import {Button} from '@mattermost/shared/components/button';
import type {UserProfile} from '@mattermost/types/users';
import {getProfilesByIds} from 'mattermost-redux/actions/users';
@@ -172,9 +172,9 @@ function ChannelAccessRulesConfirmModal({
/>
{(() => {
if (isProcessing) {
diff --git a/webapp/channels/src/components/channel_settings_modal/channel_activity_warning_modal.tsx b/webapp/channels/src/components/channel_settings_modal/channel_activity_warning_modal.tsx
index 27c60ae03fd..85f43ded9cf 100644
--- a/webapp/channels/src/components/channel_settings_modal/channel_activity_warning_modal.tsx
+++ b/webapp/channels/src/components/channel_settings_modal/channel_activity_warning_modal.tsx
@@ -94,7 +94,7 @@ const ChannelActivityWarningModal: React.FC = ({
defaultMessage='Save and apply'
/>
}
- confirmButtonVariant='destructive'
+ destructive={true}
confirmDisabled={!acknowledgeRisk}
onConfirm={handleConfirm}
onCancel={handleCancel}
diff --git a/webapp/channels/src/components/channel_settings_modal/channel_settings_archive_tab.test.tsx b/webapp/channels/src/components/channel_settings_modal/channel_settings_archive_tab.test.tsx
index f5a268350dc..74c098f183f 100644
--- a/webapp/channels/src/components/channel_settings_modal/channel_settings_archive_tab.test.tsx
+++ b/webapp/channels/src/components/channel_settings_modal/channel_settings_archive_tab.test.tsx
@@ -60,9 +60,9 @@ describe('ChannelSettingsArchiveTab', () => {
renderWithContext( );
// Check that the archive button is rendered
- const archiveButton = screen.getByText('Archive this channel');
+ const archiveButton = screen.getByRole('button', {name: 'Archive channel Test Channel'});
expect(archiveButton).toBeInTheDocument();
- expect(archiveButton).toHaveAttribute('aria-label', 'Archive channel Test Channel');
+ expect(archiveButton).toHaveTextContent('Archive this channel');
});
it('should show confirmation modal when archive button is clicked', async () => {
diff --git a/webapp/channels/src/components/channel_settings_modal/channel_settings_archive_tab.tsx b/webapp/channels/src/components/channel_settings_modal/channel_settings_archive_tab.tsx
index 471c4b1ddc0..eb5eaa12cee 100644
--- a/webapp/channels/src/components/channel_settings_modal/channel_settings_archive_tab.tsx
+++ b/webapp/channels/src/components/channel_settings_modal/channel_settings_archive_tab.tsx
@@ -5,7 +5,7 @@ import React, {useState, useCallback} from 'react';
import {FormattedMessage, useIntl} from 'react-intl';
import {useDispatch} from 'react-redux';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import type {Channel} from '@mattermost/types/channels';
import {deleteChannel} from 'actions/views/channel';
@@ -46,7 +46,7 @@ function ChannelSettingsArchiveTab({
/>
setShowArchiveConfirmModal(false)}
- confirmButtonVariant='destructive'
+ destructive={true}
modalClass='archiveChannelConfirmModal'
focusOriginElement='channelSettingsArchiveChannelButton'
isStacked={true}
diff --git a/webapp/channels/src/components/channel_settings_modal/channel_settings_modal.scss b/webapp/channels/src/components/channel_settings_modal/channel_settings_modal.scss
index f6f00a95853..4e0f7abb7d5 100644
--- a/webapp/channels/src/components/channel_settings_modal/channel_settings_modal.scss
+++ b/webapp/channels/src/components/channel_settings_modal/channel_settings_modal.scss
@@ -217,7 +217,10 @@
flex-direction: column;
gap: 16px;
- .btn-danger {
+ // A flex item in a column stretches by default, so the button needs
+ // this to keep its own width. Was `.btn-danger`, which the Compass
+ // button does not carry -- it takes `destructive` as a prop.
+ #channelSettingsArchiveChannelButton {
align-self: flex-start;
}
}
diff --git a/webapp/channels/src/components/channel_settings_modal/channel_settings_permissions_policy_tab.scss b/webapp/channels/src/components/channel_settings_modal/channel_settings_permissions_policy_tab.scss
index 949ed7f35e1..75baf86f998 100644
--- a/webapp/channels/src/components/channel_settings_modal/channel_settings_permissions_policy_tab.scss
+++ b/webapp/channels/src/components/channel_settings_modal/channel_settings_permissions_policy_tab.scss
@@ -46,17 +46,6 @@
line-height: 24px;
}
- &__permissionsPolicyAddRule {
- display: inline-flex;
- align-items: center;
- padding: 8px 16px;
- gap: 4px;
-
- i {
- font-size: 16px;
- }
- }
-
&__permissionsPolicySearch {
position: relative;
display: flex;
@@ -175,7 +164,7 @@
font-size: 13px;
gap: 6px;
- .btn-tertiary {
+ .ChannelSettingsModal__permissionsPolicyPaginationButton {
display: inline-flex;
width: 32px;
height: 32px;
diff --git a/webapp/channels/src/components/channel_settings_modal/channel_settings_permissions_policy_tab.tsx b/webapp/channels/src/components/channel_settings_modal/channel_settings_permissions_policy_tab.tsx
index ea2d9304b2c..e92b1479201 100644
--- a/webapp/channels/src/components/channel_settings_modal/channel_settings_permissions_policy_tab.tsx
+++ b/webapp/channels/src/components/channel_settings_modal/channel_settings_permissions_policy_tab.tsx
@@ -6,7 +6,9 @@ import {defineMessages, FormattedMessage, useIntl} from 'react-intl';
import type {MessageDescriptor} from 'react-intl';
import {useSelector} from 'react-redux';
-import {Button} from '@mattermost/shared/components/button';
+import {PlusIcon} from '@mattermost/compass-icons/components';
+import {Button} from '@mattermost/compass-ui/components/button';
+import {Icon} from '@mattermost/compass-ui/components/icon';
import type {AccessControlPolicy, AccessControlPolicyRule} from '@mattermost/types/access_control';
import {
ACCESS_CONTROL_ACTION_DOWNLOAD_FILE,
@@ -713,12 +715,11 @@ function ChannelSettingsPermissionsPolicyTab({
/>
}/>}
>
-
- setPage(Math.max(0, safePage - 1))}
disabled={safePage === 0}
aria-label={formatMessage({
@@ -906,10 +908,11 @@ function ChannelSettingsPermissionsPolicyTab({
})}
>
-
-
+ setPage(Math.min(totalPages - 1, safePage + 1))}
disabled={safePage >= totalPages - 1}
aria-label={formatMessage({
@@ -918,7 +921,7 @@ function ChannelSettingsPermissionsPolicyTab({
})}
>
-
+
)}
diff --git a/webapp/channels/src/components/channel_view/__snapshots__/channel_view.test.tsx.snap b/webapp/channels/src/components/channel_view/__snapshots__/channel_view.test.tsx.snap
index cd870687670..ee2908782e4 100644
--- a/webapp/channels/src/components/channel_view/__snapshots__/channel_view.test.tsx.snap
+++ b/webapp/channels/src/components/channel_view/__snapshots__/channel_view.test.tsx.snap
@@ -47,9 +47,14 @@ exports[`components/channel_view Should match snapshot if channel is archived 1`
. New messages cannot be posted.
- Close Channel
+
+ Close Channel
+
@@ -103,9 +108,14 @@ exports[`components/channel_view Should match snapshot if channel is deactivated
. New messages cannot be posted.
- Close Channel
+
+ Close Channel
+
diff --git a/webapp/channels/src/components/channel_view/channel_view.tsx b/webapp/channels/src/components/channel_view/channel_view.tsx
index cd472126aea..a73302260bd 100644
--- a/webapp/channels/src/components/channel_view/channel_view.tsx
+++ b/webapp/channels/src/components/channel_view/channel_view.tsx
@@ -5,7 +5,7 @@ import React from 'react';
import {FormattedMessage} 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 AdvancedCreatePost from 'components/advanced_create_post';
import ChannelBanner from 'components/channel_banner/channel_banner';
diff --git a/webapp/channels/src/components/channel_view/input_loading.tsx b/webapp/channels/src/components/channel_view/input_loading.tsx
index 3823cf3406d..bc94cc53b38 100644
--- a/webapp/channels/src/components/channel_view/input_loading.tsx
+++ b/webapp/channels/src/components/channel_view/input_loading.tsx
@@ -4,7 +4,7 @@
import React, {useEffect, useState} from 'react';
import {FormattedMessage} from 'react-intl';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
const onClickRefresh = () => {
location.reload();
diff --git a/webapp/channels/src/components/claim/components/email_to_ldap.tsx b/webapp/channels/src/components/claim/components/email_to_ldap.tsx
index 8975621169d..ca449cdbc5d 100644
--- a/webapp/channels/src/components/claim/components/email_to_ldap.tsx
+++ b/webapp/channels/src/components/claim/components/email_to_ldap.tsx
@@ -5,7 +5,7 @@ import classNames from 'classnames';
import React, {useRef} from 'react';
import {FormattedMessage, useIntl} from 'react-intl';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import type {AuthChangeResponse} from '@mattermost/types/users';
import {emailToLdap} from 'actions/admin_actions';
diff --git a/webapp/channels/src/components/claim/components/email_to_oauth.tsx b/webapp/channels/src/components/claim/components/email_to_oauth.tsx
index 6b60855b5cd..8ddfd702282 100644
--- a/webapp/channels/src/components/claim/components/email_to_oauth.tsx
+++ b/webapp/channels/src/components/claim/components/email_to_oauth.tsx
@@ -5,7 +5,7 @@ import classNames from 'classnames';
import React, {useState, useRef} from 'react';
import {FormattedMessage, useIntl} from 'react-intl';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import type {AuthChangeResponse} from '@mattermost/types/users';
import {emailToOAuth} from 'actions/admin_actions';
diff --git a/webapp/channels/src/components/claim/components/ldap_to_email.tsx b/webapp/channels/src/components/claim/components/ldap_to_email.tsx
index 8665d017ac1..33e77e12995 100644
--- a/webapp/channels/src/components/claim/components/ldap_to_email.tsx
+++ b/webapp/channels/src/components/claim/components/ldap_to_email.tsx
@@ -5,7 +5,7 @@ import classNames from 'classnames';
import React, {useRef, useState, type JSX} from 'react';
import {FormattedMessage, useIntl} from 'react-intl';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import type {AuthChangeResponse} from '@mattermost/types/users';
import type {ActionResult} from 'mattermost-redux/types/actions';
diff --git a/webapp/channels/src/components/claim/components/oauth_to_email.tsx b/webapp/channels/src/components/claim/components/oauth_to_email.tsx
index ec4ce74880d..21dcd691834 100644
--- a/webapp/channels/src/components/claim/components/oauth_to_email.tsx
+++ b/webapp/channels/src/components/claim/components/oauth_to_email.tsx
@@ -5,7 +5,7 @@ import classNames from 'classnames';
import React, {useRef, useState, type JSX} from 'react';
import {FormattedMessage, useIntl} from 'react-intl';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import type {AuthChangeResponse} from '@mattermost/types/users';
import type {PasswordConfig} from 'mattermost-redux/selectors/entities/general';
diff --git a/webapp/channels/src/components/cloud_fetch_error/index.tsx b/webapp/channels/src/components/cloud_fetch_error/index.tsx
index 00b70a5afe5..e855f8c00f2 100644
--- a/webapp/channels/src/components/cloud_fetch_error/index.tsx
+++ b/webapp/channels/src/components/cloud_fetch_error/index.tsx
@@ -5,7 +5,7 @@ import React from 'react';
import {FormattedMessage} 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 {isCurrentLicenseCloud} from 'mattermost-redux/selectors/entities/cloud';
diff --git a/webapp/channels/src/components/cloud_preview_modal/preview_modal_content_controller.tsx b/webapp/channels/src/components/cloud_preview_modal/preview_modal_content_controller.tsx
index ecd1e4afa82..fbf21f542dc 100644
--- a/webapp/channels/src/components/cloud_preview_modal/preview_modal_content_controller.tsx
+++ b/webapp/channels/src/components/cloud_preview_modal/preview_modal_content_controller.tsx
@@ -5,8 +5,8 @@ import React, {useState, useCallback} from 'react';
import {useIntl} from 'react-intl';
import {ArrowLeftIcon, ArrowRightIcon} from '@mattermost/compass-icons/components';
+import {Button} from '@mattermost/compass-ui/components/button';
import {GenericModal} from '@mattermost/components';
-import {Button} from '@mattermost/shared/components/button';
import PreviewModalContent from './preview_modal_content';
import {modalContent} from './preview_modal_content_data';
diff --git a/webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.scss b/webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.scss
index 0411c6c7e78..aa980bdc94e 100644
--- a/webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.scss
+++ b/webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.scss
@@ -41,6 +41,10 @@
&__navigation-buttons {
display: flex;
+
+ // Was the global `.btn + .btn` margin in _buttons.scss, which the
+ // Compass buttons no longer match.
+ gap: 8px;
}
diff --git a/webapp/channels/src/components/cloud_subscribe_result_modal/__snapshots__/success.test.tsx.snap b/webapp/channels/src/components/cloud_subscribe_result_modal/__snapshots__/success.test.tsx.snap
index e3aaaeed380..d19f0a5ce33 100644
--- a/webapp/channels/src/components/cloud_subscribe_result_modal/__snapshots__/success.test.tsx.snap
+++ b/webapp/channels/src/components/cloud_subscribe_result_modal/__snapshots__/success.test.tsx.snap
@@ -140,9 +140,14 @@ exports[`components/pricing_modal/downgrade_team_removal_modal matches snapshot
class="IconMessage-button"
>
- Return to workspace
+
+ Return to workspace
+
diff --git a/webapp/channels/src/components/commercial_support_modal/__snapshots__/commercial_support_modal.test.tsx.snap b/webapp/channels/src/components/commercial_support_modal/__snapshots__/commercial_support_modal.test.tsx.snap
index 8f68221ef07..da47ca68f44 100644
--- a/webapp/channels/src/components/commercial_support_modal/__snapshots__/commercial_support_modal.test.tsx.snap
+++ b/webapp/channels/src/components/commercial_support_modal/__snapshots__/commercial_support_modal.test.tsx.snap
@@ -135,12 +135,39 @@ exports[`components/CommercialSupportModal should match snapshot 1`] = `
class="CommercialSupportModal__download"
>
-
- Download Support Packet
+
+
+
+
+ Download Support Packet
+
diff --git a/webapp/channels/src/components/commercial_support_modal/commercial_support_modal.tsx b/webapp/channels/src/components/commercial_support_modal/commercial_support_modal.tsx
index 8e66873d011..b06109da3b2 100644
--- a/webapp/channels/src/components/commercial_support_modal/commercial_support_modal.tsx
+++ b/webapp/channels/src/components/commercial_support_modal/commercial_support_modal.tsx
@@ -8,8 +8,10 @@ import {FormattedMessage} from 'react-intl';
import {Link} from 'react-router-dom';
import {extractFilenameFromContentDisposition} from '@mattermost/client';
+import {DownloadOutlineIcon} 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 {SupportPacketContent} from '@mattermost/types/admin';
import type {UserProfile} from '@mattermost/types/users';
@@ -17,7 +19,6 @@ import {Client4} from 'mattermost-redux/client';
import AlertBanner from 'components/alert_banner';
import ExternalLink from 'components/external_link';
-import LoadingSpinner from 'components/widgets/loading/loading_spinner';
import './commercial_support_modal.scss';
@@ -216,8 +217,9 @@ export default class CommercialSupportModal extends React.PureComponent}/>}
>
- { this.state.loading ? : }
{chunks}>;
}
return (
-
{chunks}
-
+
);
},
limit: '',
diff --git a/webapp/channels/src/components/component_library/button.cl.tsx b/webapp/channels/src/components/component_library/button.cl.tsx
index faedcbdc05a..7582e10efce 100644
--- a/webapp/channels/src/components/component_library/button.cl.tsx
+++ b/webapp/channels/src/components/component_library/button.cl.tsx
@@ -5,7 +5,10 @@ import classNames from 'classnames';
import React, {useMemo} from 'react';
import glyphMap from '@mattermost/compass-icons/components';
-import {Button} from '@mattermost/shared/components/button';
+import type {IconGlyphTypes} from '@mattermost/compass-icons/IconGlyphs';
+import {Button} from '@mattermost/compass-ui/components/button';
+import type {ButtonAppearance, ButtonSize} from '@mattermost/compass-ui/components/button';
+import {Icon} from '@mattermost/compass-ui/components/icon';
import {useBooleanProp, useDropdownProp, useStringProp} from './hooks';
import {buildComponent} from './utils';
@@ -15,32 +18,48 @@ const propPossibilities = {};
const iconValues = [''].concat(Object.keys(glyphMap));
const emphasisValues = ['primary', 'secondary', 'tertiary', 'quaternary'];
-const sizeValues = ['xs', 'sm', 'md', 'lg'];
-const variantValues = ['', 'destructive'];
+const sizeValues = ['x-small', 'small', 'medium', 'large'];
type Props = {
backgroundClass: string;
};
+function iconFromName(name: string | undefined) {
+ if (!name) {
+ return undefined;
+ }
+
+ const Glyph = glyphMap[name as IconGlyphTypes];
+ if (!Glyph) {
+ return undefined;
+ }
+
+ return }/>;
+}
+
export default function ButtonComponentLibrary({backgroundClass}: Props) {
const [label, labelSelector] = useStringProp('label', 'Label', false);
- const [leadingIcon, leadingIconPossibilities, leadingIconSelector] = useDropdownProp('leadingIcon', 'mattermost', iconValues, false);
- const [trailingIcon, trailingIconPossibilities, trailingIconSelector] = useDropdownProp('trailingIcon', '', iconValues, false);
+ const [leadingIcon, , leadingIconSelector] = useDropdownProp('leadingIcon', 'mattermost', iconValues, false);
+ const [trailingIcon, , trailingIconSelector] = useDropdownProp('trailingIcon', '', iconValues, false);
const [emphasis, emphasisPossibilities, emphasisSelector] = useDropdownProp('emphasis', 'primary', emphasisValues, true);
- const [size, sizePossibilities, sizeSelector] = useDropdownProp('size', 'md', sizeValues, true);
- const [variant, variantPossibilities, variantSelector] = useDropdownProp('variant', '', variantValues, true);
+ const [size, sizePossibilities, sizeSelector] = useDropdownProp('size', 'medium', sizeValues, true);
+ const [destructive, destructiveSelector] = useBooleanProp('destructive', false);
const [disabled, disabledSelector] = useBooleanProp('disabled', false);
- const children = useMemo(() => (
- <>
- {leadingIcon?.leadingIcon ? : null}
- {label.label}
- {trailingIcon?.trailingIcon ? : null}
- >
- ), [label, leadingIcon, trailingIcon]);
+ const leadingIconProp = useMemo(() => {
+ const icon = iconFromName(leadingIcon?.leadingIcon);
+ return icon ? {leadingIcon: icon} : undefined;
+ }, [leadingIcon]);
+
+ const trailingIconProp = useMemo(() => {
+ const icon = iconFromName(trailingIcon?.trailingIcon);
+ return icon ? {trailingIcon: icon} : undefined;
+ }, [trailingIcon]);
+
+ const children = useMemo(() => label.label, [label]);
const components = useMemo(
() => buildComponent(
@@ -48,29 +67,27 @@ export default function ButtonComponentLibrary({backgroundClass}: Props) {
propPossibilities,
[
emphasisPossibilities,
- leadingIconPossibilities,
sizePossibilities,
- trailingIconPossibilities,
- variantPossibilities,
], [
{children},
+ leadingIconProp,
+ trailingIconProp,
emphasis,
size,
- variant,
+ destructive,
disabled,
],
),
[
children,
+ destructive,
disabled,
emphasis,
emphasisPossibilities,
- leadingIconPossibilities,
+ leadingIconProp,
size,
sizePossibilities,
- trailingIconPossibilities,
- variant,
- variantPossibilities,
+ trailingIconProp,
],
);
@@ -82,7 +99,7 @@ export default function ButtonComponentLibrary({backgroundClass}: Props) {
{emphasisSelector}
{sizeSelector}
- {variantSelector}
+ {destructiveSelector}
{disabledSelector}
{components}
@@ -92,26 +109,29 @@ export default function ButtonComponentLibrary({backgroundClass}: Props) {
}
function ButtonGrid() {
- const sizes = ['md', 'xs', 'sm', 'lg'] as const;
- const variants = ['', 'destructive', 'inverted'] as const;
+ const sizes: ButtonSize[] = ['medium', 'x-small', 'small', 'large'];
+ const appearances: Array<{label: string; appearance?: ButtonAppearance; destructive?: boolean}> = [
+ {label: 'default'},
+ {label: 'destructive', destructive: true},
+ {label: 'inverted', appearance: 'inverted'},
+ ];
const states = ['default', 'hover', 'active', 'focus', 'disabled'] as const;
const emphasisLevels = ['primary', 'secondary', 'tertiary', 'quaternary'] as const;
const rows = [];
for (const size of sizes) {
- for (const variant of variants) {
+ for (const appearance of appearances) {
for (const state of states) {
const row = [];
- if (variant === '' && state === 'default') {
- const sizeLabels = {md: 'medium', xs: 'x-small', sm: 'small', lg: 'large'} as const;
+ if (appearance.label === 'default' && state === 'default') {
row.push(
- {sizeLabels[size]}
+ {size}
,
);
} else {
@@ -126,7 +146,7 @@ function ButtonGrid() {
key='variant'
scope='row'
>
- {variant}
+ {appearance.label}
,
);
} else {
@@ -153,12 +173,13 @@ function ButtonGrid() {
row.push(
@@ -169,7 +190,7 @@ function ButtonGrid() {
}
rows.push(
-
+
{row}
,
);
diff --git a/webapp/channels/src/components/component_library/mm_blocks_hierarchy_editor.tsx b/webapp/channels/src/components/component_library/mm_blocks_hierarchy_editor.tsx
index e00a7ec6de0..fd7298e0562 100644
--- a/webapp/channels/src/components/component_library/mm_blocks_hierarchy_editor.tsx
+++ b/webapp/channels/src/components/component_library/mm_blocks_hierarchy_editor.tsx
@@ -6,7 +6,7 @@
import classNames from 'classnames';
import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react';
-import {Button} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import type {MmBlock, MmColumnBlock} from '@mattermost/types/mm_blocks';
import {
@@ -391,7 +391,7 @@ const HierarchyNode = ({
{'No blocks yet.'}
setRootAddOpen((open) => !open)}
>
{'Add block'}
diff --git a/webapp/channels/src/components/confirm_modal.tsx b/webapp/channels/src/components/confirm_modal.tsx
index 024795a8304..30ca8cd4dbb 100644
--- a/webapp/channels/src/components/confirm_modal.tsx
+++ b/webapp/channels/src/components/confirm_modal.tsx
@@ -6,7 +6,6 @@ import {FormattedMessage} from 'react-intl';
import {Button} from '@mattermost/compass-ui/components/button';
import {GenericModal} from '@mattermost/components';
-import type {ButtonVariant} from '@mattermost/shared/components/button';
import {focusElement} from 'utils/a11y_utils';
@@ -31,9 +30,9 @@ type Props = {
message?: React.ReactNode;
/*
- * The variant to use for the confirm button
+ * Whether the confirm button uses destructive styling
*/
- confirmButtonVariant?: ButtonVariant;
+ destructive?: boolean;
/*
* The CSS class to apply to the modal
@@ -121,7 +120,7 @@ type Props = {
const ConfirmModal = ({
title = '',
message = '',
- confirmButtonVariant,
+ destructive,
confirmButtonText = '',
modalClass = '',
id,
@@ -236,7 +235,7 @@ const ConfirmModal = ({
{
);
} else {
modalProps.handleCancel = showLoader ? undefined : props.onExited;
- modalProps.confirmButtonVariant = 'destructive';
+ modalProps.destructive = true;
modalProps.cancelButtonText = formatMessage({id: 'channel_modal.cancel', defaultMessage: 'Cancel'});
modalProps.confirmButtonText = formatMessage({id: 'sidebar_left.sidebar_channel_modal.confirmation_text', defaultMessage: 'Convert to private channel'});
modalProps.isConfirmDisabled = !canCreate;
diff --git a/webapp/channels/src/components/create_recap_modal/create_recap_modal.scss b/webapp/channels/src/components/create_recap_modal/create_recap_modal.scss
index 17c21091ed2..5c96801a006 100644
--- a/webapp/channels/src/components/create_recap_modal/create_recap_modal.scss
+++ b/webapp/channels/src/components/create_recap_modal/create_recap_modal.scss
@@ -91,7 +91,7 @@
align-items: center;
gap: 8px;
- .btn {
+ button {
display: flex;
align-items: center;
gap: 6px;
diff --git a/webapp/channels/src/components/create_recap_modal/create_recap_modal.tsx b/webapp/channels/src/components/create_recap_modal/create_recap_modal.tsx
index 7b94d73b151..3e3b778cc41 100644
--- a/webapp/channels/src/components/create_recap_modal/create_recap_modal.tsx
+++ b/webapp/channels/src/components/create_recap_modal/create_recap_modal.tsx
@@ -7,8 +7,8 @@ import {useDispatch, useSelector} from 'react-redux';
import {useHistory} from 'react-router-dom';
import {ChevronLeftIcon, ChevronRightIcon} from '@mattermost/compass-icons/components';
+import {Button} from '@mattermost/compass-ui/components/button';
import {GenericModal} from '@mattermost/components';
-import {Button} from '@mattermost/shared/components/button';
import type {Channel} from '@mattermost/types/channels';
import type {ScheduledRecap, ScheduledRecapInput, ScheduledRecapTimePeriod} from '@mattermost/types/recaps';
import {ScheduledRecapChannelModes, ScheduledRecapTimePeriods} from '@mattermost/types/recaps';
@@ -241,9 +241,7 @@ const CreateRecapModal = ({onExited, editScheduledRecap}: Props) => {
};
try {
- const result = isEditMode && editScheduledRecap ?
- await dispatch(updateScheduledRecap(editScheduledRecap.id, input)) :
- await dispatch(createScheduledRecap(input));
+ const result = isEditMode && editScheduledRecap ? await dispatch(updateScheduledRecap(editScheduledRecap.id, input)) : await dispatch(createScheduledRecap(input));
if (result.error) {
setError(result.error.message || formatMessage({id: 'recaps.modal.error.scheduleFailed', defaultMessage: 'Failed to save scheduled recap. Please try again.'}));
@@ -408,9 +406,7 @@ const CreateRecapModal = ({onExited, editScheduledRecap}: Props) => {
const headerText = (
- {isEditMode ?
- formatMessage({id: 'recaps.modal.titleEdit', defaultMessage: 'Edit your recap'}) :
- formatMessage({id: 'recaps.modal.title', defaultMessage: 'Set up your recap'})
+ {isEditMode ? formatMessage({id: 'recaps.modal.titleEdit', defaultMessage: 'Edit your recap'}) : formatMessage({id: 'recaps.modal.title', defaultMessage: 'Set up your recap'})
}
diff --git a/webapp/channels/src/components/create_team/__snapshots__/create_team.test.tsx.snap b/webapp/channels/src/components/create_team/__snapshots__/create_team.test.tsx.snap
index 91f1217d077..af57f190940 100644
--- a/webapp/channels/src/components/create_team/__snapshots__/create_team.test.tsx.snap
+++ b/webapp/channels/src/components/create_team/__snapshots__/create_team.test.tsx.snap
@@ -97,15 +97,41 @@ exports[`component/create_team should match snapshot default 1`] = `
Name your team in any language. Your team name shows in menus and headings.
- Next
-
+
+ Next
+
+
+
+
diff --git a/webapp/channels/src/components/create_team/components/create_team_form/__snapshots__/create_team_form.test.tsx.snap b/webapp/channels/src/components/create_team/components/create_team_form/__snapshots__/create_team_form.test.tsx.snap
index 71a4bcba051..f7cc13997da 100644
--- a/webapp/channels/src/components/create_team/components/create_team_form/__snapshots__/create_team_form.test.tsx.snap
+++ b/webapp/channels/src/components/create_team/components/create_team_form/__snapshots__/create_team_form.test.tsx.snap
@@ -61,14 +61,40 @@ exports[`CreateTeamForm - display_name step should match snapshot 1`] = `
Name your team in any language. Your team name shows in menus and headings.
- Next
-
+
+ Next
+
+
+
+
@@ -142,11 +168,15 @@ exports[`CreateTeamForm - team_url step should match snapshot 1`] = `
class="mt-8"
>
- Finish
+
+ Finish
+
-
-
- >
+
);
if (UseAnonymousURLs) {
@@ -285,6 +284,16 @@ export default function CreateTeamForm({step, state: parentState, updateParent,
return nextMessage;
}, [UseAnonymousURLs, isLoading, step]);
+ // Only the Next step carries a chevron, and it belongs in the Button's
+ // trailing slot rather than in the label alongside the text.
+ const buttonTrailingIcon = useMemo(() => {
+ if (UseAnonymousURLs || isLoading || step === 'team_url') {
+ return undefined;
+ }
+
+ return }/>;
+ }, [UseAnonymousURLs, isLoading, step]);
+
if (step === 'team_url') {
return (
diff --git a/webapp/channels/src/components/create_team/components/create_team_form/display_name_step.tsx b/webapp/channels/src/components/create_team/components/create_team_form/display_name_step.tsx
index 6dd19e601cd..c6c715c8d65 100644
--- a/webapp/channels/src/components/create_team/components/create_team_form/display_name_step.tsx
+++ b/webapp/channels/src/components/create_team/components/create_team_form/display_name_step.tsx
@@ -5,7 +5,7 @@ import type {ReactNode, JSX} from 'react';
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 Input from 'components/widgets/inputs/input/input';
@@ -18,11 +18,15 @@ export type Props = {
onDisplayNameChange: (e: React.ChangeEvent) => void;
onSubmit: (e: React.MouseEvent) => void;
buttonText: ReactNode;
+
+ // Goes in the Button's trailing slot. An icon inside buttonText would land
+ // in the label span, where the Button's gap does not apply.
+ buttonTrailingIcon?: ReactNode;
isLoading?: boolean;
nameError: string | JSX.Element;
};
-export default function DisplayNameStep({teamDisplayName, isValidTeamName, onDisplayNameChange, onSubmit, buttonText, isLoading, nameError}: Props) {
+export default function DisplayNameStep({teamDisplayName, isValidTeamName, onDisplayNameChange, onSubmit, buttonText, buttonTrailingIcon, isLoading, nameError}: Props) {
let nameErrorLabel = null;
let nameDivClass = 'form-group';
if (nameError) {
@@ -86,6 +90,7 @@ export default function DisplayNameStep({teamDisplayName, isValidTeamName, onDis
className='mt-8'
onClick={onSubmit}
disabled={!isValidTeamName || isLoading}
+ trailingIcon={buttonTrailingIcon}
>
{buttonText}
diff --git a/webapp/channels/src/components/create_team/components/create_team_form/team_url_step.tsx b/webapp/channels/src/components/create_team/components/create_team_form/team_url_step.tsx
index 26b65c1aa21..3a73fcbedd3 100644
--- a/webapp/channels/src/components/create_team/components/create_team_form/team_url_step.tsx
+++ b/webapp/channels/src/components/create_team/components/create_team_form/team_url_step.tsx
@@ -5,7 +5,7 @@ import type {ReactNode, JSX} from 'react';
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 {WithTooltip} from '@mattermost/shared/components/tooltip';
import logoImage from 'images/logo.png';
diff --git a/webapp/channels/src/components/delete_category_modal/delete_category_modal.tsx b/webapp/channels/src/components/delete_category_modal/delete_category_modal.tsx
index a28f87b39b5..aea6f519a5b 100644
--- a/webapp/channels/src/components/delete_category_modal/delete_category_modal.tsx
+++ b/webapp/channels/src/components/delete_category_modal/delete_category_modal.tsx
@@ -43,7 +43,7 @@ export default function DeleteCategoryModal(props: Props) {
defaultMessage='Delete'
/>
)}
- confirmButtonVariant='destructive'
+ destructive={true}
>
diff --git a/webapp/channels/src/components/delete_channel_modal/delete_channel_modal.tsx b/webapp/channels/src/components/delete_channel_modal/delete_channel_modal.tsx
index 3740018584e..0669355cf58 100644
--- a/webapp/channels/src/components/delete_channel_modal/delete_channel_modal.tsx
+++ b/webapp/channels/src/components/delete_channel_modal/delete_channel_modal.tsx
@@ -5,7 +5,7 @@ import React 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 Constants from 'utils/constants';
@@ -95,11 +95,11 @@ export default class DeleteChannelModal extends React.PureComponent
{
renderWithContext( );
expect(screen.getByTestId('emoji-list')).toBeInTheDocument();
expect(screen.getByTestId('permission-gate')).toBeInTheDocument();
- expect(screen.getByRole('link')).toHaveAttribute('href', '/team/emoji/add');
+ expect(screen.getByRole('link', {name: 'Add Custom Emoji'})).toHaveAttribute('href', '/team/emoji/add');
});
it('should not render the add button if permission is not granted', () => {
@@ -56,7 +56,7 @@ describe('EmojiPage', () => {
/>,
);
expect(screen.getByTestId('permission-gate')).toBeInTheDocument();
- expect(screen.getByRole('link')).toBeInTheDocument();
+ expect(screen.getByRole('link', {name: 'Add Custom Emoji'})).toBeInTheDocument();
});
it('should render EmojiList component', () => {
diff --git a/webapp/channels/src/components/emoji/emoji_page.tsx b/webapp/channels/src/components/emoji/emoji_page.tsx
index eac97a2b144..111540d74fd 100644
--- a/webapp/channels/src/components/emoji/emoji_page.tsx
+++ b/webapp/channels/src/components/emoji/emoji_page.tsx
@@ -5,7 +5,7 @@ import React, {useEffect} from 'react';
import {FormattedMessage, useIntl} 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 Permissions from 'mattermost-redux/constants/permissions';
@@ -58,20 +58,17 @@ export default function EmojiPage({
/>
-
-
+
-
-
+
+
diff --git a/webapp/channels/src/components/emoji_picker/components/emoji_picker_custom_emoji_button.tsx b/webapp/channels/src/components/emoji_picker/components/emoji_picker_custom_emoji_button.tsx
index 69c86fb0276..c415056b51d 100644
--- a/webapp/channels/src/components/emoji_picker/components/emoji_picker_custom_emoji_button.tsx
+++ b/webapp/channels/src/components/emoji_picker/components/emoji_picker_custom_emoji_button.tsx
@@ -5,7 +5,7 @@ import React, {memo} from 'react';
import {FormattedMessage} from 'react-intl';
import {Link} from 'react-router-dom';
-import {buttonClassNames} from '@mattermost/shared/components/button';
+import {Button} from '@mattermost/compass-ui/components/button';
import Permissions from 'mattermost-redux/constants/permissions';
@@ -29,16 +29,21 @@ function EmojiPickerCustomEmojiButton({customEmojisEnabled, currentTeamName, onC
return (
-
-
-
+
+
+
+
);
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 && (
@@ -886,17 +910,25 @@ exports[`components/integrations/AbstractIncomingWebhook should match snapshot,
- Cancel
+
+ Cancel
+
- Footer
+
+ Footer
+
@@ -1084,17 +1116,25 @@ exports[`components/integrations/AbstractIncomingWebhook should match snapshot,
class="backstage-form__footer"
>
- Cancel
+
+ Cancel
+
- Footer
+
+ Footer
+
@@ -1282,17 +1322,25 @@ exports[`components/integrations/AbstractIncomingWebhook should match snapshot,
class="backstage-form__footer"
>
- Cancel
+
+ Cancel
+
- Footer
+
+ Footer
+
@@ -1515,17 +1563,25 @@ exports[`components/integrations/AbstractIncomingWebhook should match snapshot,
- Cancel
+
+ Cancel
+
- Footer
+
+ Footer
+
diff --git a/webapp/channels/src/components/integrations/__snapshots__/abstract_oauth_app.test.tsx.snap b/webapp/channels/src/components/integrations/__snapshots__/abstract_oauth_app.test.tsx.snap
index 431fdc9c4c9..207b4259349 100644
--- a/webapp/channels/src/components/integrations/__snapshots__/abstract_oauth_app.test.tsx.snap
+++ b/webapp/channels/src/components/integrations/__snapshots__/abstract_oauth_app.test.tsx.snap
@@ -325,17 +325,25 @@ https://test.com/callback2
class="backstage-form__footer"
>
- Cancel
+
+ Cancel
+
- Footer
+
+ Footer
+
renderExtra
@@ -678,17 +686,25 @@ exports[`components/integrations/AbstractOAuthApp should match snapshot, display
- Cancel
+
+ Cancel
+
- Footer
+
+ Footer
+
renderExtra
diff --git a/webapp/channels/src/components/integrations/__snapshots__/abstract_outgoing_webhook.test.tsx.snap b/webapp/channels/src/components/integrations/__snapshots__/abstract_outgoing_webhook.test.tsx.snap
index 45ca1b54f6f..db9926c79d0 100644
--- a/webapp/channels/src/components/integrations/__snapshots__/abstract_outgoing_webhook.test.tsx.snap
+++ b/webapp/channels/src/components/integrations/__snapshots__/abstract_outgoing_webhook.test.tsx.snap
@@ -266,17 +266,25 @@ callbackUrl2.com
class="backstage-form__footer"
>
- Cancel
+
+ Cancel
+
- Footer
+
+ Footer
+
diff --git a/webapp/channels/src/components/integrations/abstract_command.tsx b/webapp/channels/src/components/integrations/abstract_command.tsx
index 8549d0e5044..3cb4dc4ab3e 100644
--- a/webapp/channels/src/components/integrations/abstract_command.tsx
+++ b/webapp/channels/src/components/integrations/abstract_command.tsx
@@ -6,8 +6,8 @@ import type {ChangeEvent, JSX} from 'react';
import {defineMessage, FormattedMessage, type MessageDescriptor} from 'react-intl';
import {Link} from 'react-router-dom';
+import {Button} from '@mattermost/compass-ui/components/button';
import {Checkbox} from '@mattermost/compass-ui/components/checkbox';
-import {buttonClassNames} from '@mattermost/shared/components/button';
import type {Command} from '@mattermost/types/integrations';
import type {Team} from '@mattermost/types/teams';
@@ -679,15 +679,17 @@ export default class AbstractCommand extends React.PureComponent {
type='backstage'
errors={[this.props.serverError, this.state.clientError]}
/>
-
-
-
+
+
+
+
type='backstage'
errors={[this.props.serverError, this.state.clientError]}
/>
-
-
-
+
+
+
+
type='backstage'
errors={[this.props.serverError, this.state.clientError]}
/>
-
-
-
+
+
+
+
-
-
-
+
+
+
+