[MM-62074] Move tooltips with withTooltip to new Tooltip component (#29528)
* replace inside of comp/withtooltip * remove overlay trigger eslint rl * update location of prev migrated new tooltips * copy button * shared_channel_indicator, shared_user_indicator.tsx, size_aware_image * actions_menu, old_admin_settings, schema_admin_settings, admin_settings * billing_summary, brand_image_setting, edit_section_edit_table_row, elapsed_duration_cell * permissions_scheme_summary,secure_connections/controls,system_users_column_toggler_menu,system_users_export,group/group_users/users_to_remove_groups * team_profile,user_grid_role_dropdown,priority_labels,toggle_formatting_bar,use_emoji_picker,formatting_icon * show_formatting,alert_banner others * more * snap fix * add disabled prop to menu * test fix for avatar feat: Add id to WithTooltip in Avatars component to fix test failures * combine refs in withtooltip * channel header title favorite test fix * priority label comp changes * types check for children * Update avatar.tsx * e2e fixes * fix E2E tests * Remove memo from WithTooltip I found that the web app leaks a fair bit less memory when this is removed. See https://community.mattermost.com/core/pl/gwyyoww9gtbg8fddoic9meq84y for more information * e2e lint fixes * e2e fixes * Fix test style issue --------- Co-authored-by: yasserfaraazkhan <attitude3cena.yf@gmail.com> Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com> Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
371e1b9bad
Коммит
fd6a662d76
@@ -99,21 +99,21 @@ describe('Channel Info RHS', () => {
|
|||||||
cy.get('#channel-info-btn').click();
|
cy.get('#channel-info-btn').click();
|
||||||
|
|
||||||
// * Verify tooltips appear with correct text
|
// * Verify tooltips appear with correct text
|
||||||
cy.uiGetRHS().findByText('Favorite').trigger('mouseover');
|
cy.uiGetRHS().findByText('Favorite').trigger('mouseenter');
|
||||||
cy.get('#favorite-tooltip').should('be.visible').and('have.text', 'Add this channel to favorites');
|
cy.findByText('Add this channel to favorites').should('be.visible');
|
||||||
cy.uiGetRHS().findByText('Favorite').trigger('mouseout');
|
cy.uiGetRHS().findByText('Favorite').trigger('mouseleave');
|
||||||
|
|
||||||
cy.uiGetRHS().findByText('Mute').trigger('mouseover');
|
cy.uiGetRHS().findByText('Mute').trigger('mouseenter');
|
||||||
cy.get('#mute-tooltip').should('be.visible').and('have.text', 'Mute notifications for this channel');
|
cy.findByText('Mute notifications for this channel').should('be.visible');
|
||||||
cy.uiGetRHS().findByText('Mute').trigger('mouseout');
|
cy.uiGetRHS().findByText('Mute').trigger('mouseleave');
|
||||||
|
|
||||||
cy.uiGetRHS().findByText('Add People').trigger('mouseover');
|
cy.uiGetRHS().findByText('Add People').trigger('mouseenter');
|
||||||
cy.get('#add-people-tooltip').should('be.visible').and('have.text', 'Add team members to this channel');
|
cy.findByText('Add team members to this channel').should('be.visible');
|
||||||
cy.uiGetRHS().findByText('Add People').trigger('mouseout');
|
cy.uiGetRHS().findByText('Add People').trigger('mouseleave');
|
||||||
|
|
||||||
cy.uiGetRHS().findByText('Copy Link').trigger('mouseover');
|
cy.uiGetRHS().findByText('Copy Link').trigger('mouseenter');
|
||||||
cy.get('#copy-link-tooltip').should('be.visible').and('have.text', 'Copy link to this channel');
|
cy.findByText('Copy link to this channel').should('be.visible');
|
||||||
cy.uiGetRHS().findByText('Copy Link').trigger('mouseout');
|
cy.uiGetRHS().findByText('Copy Link').trigger('mouseleave');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should be able to toggle favorite on a channel', () => {
|
it('should be able to toggle favorite on a channel', () => {
|
||||||
|
|||||||
@@ -235,6 +235,8 @@ describe('Channel members RHS', () => {
|
|||||||
// # Click on the Manage button
|
// # Click on the Manage button
|
||||||
cy.uiGetRHS().findByText('Manage').should('be.visible').click();
|
cy.uiGetRHS().findByText('Manage').should('be.visible').click();
|
||||||
|
|
||||||
|
cy.wait(500);
|
||||||
|
|
||||||
// * Can see user with their roles, and change it
|
// * Can see user with their roles, and change it
|
||||||
cy.uiGetRHS().findByTestId(`memberline-${user.id}`).should('be.visible').within(() => {
|
cy.uiGetRHS().findByTestId(`memberline-${user.id}`).should('be.visible').within(() => {
|
||||||
cy.contains(`${user.username}`).should('be.visible');
|
cy.contains(`${user.username}`).should('be.visible');
|
||||||
|
|||||||
@@ -17,26 +17,6 @@ import * as TIMEOUTS from '../../../fixtures/timeouts';
|
|||||||
|
|
||||||
const timestamp = Date.now();
|
const timestamp = Date.now();
|
||||||
|
|
||||||
function verifyChannel(channel: Channel, verifyExistence = true) {
|
|
||||||
// # Wait for Channel to be created
|
|
||||||
cy.wait(TIMEOUTS.HALF_SEC);
|
|
||||||
|
|
||||||
// # Hover on the channel name
|
|
||||||
cy.get(`#sidebarItem_${channel.name}`).should('be.visible').trigger('mouseover');
|
|
||||||
|
|
||||||
// * Verify that the tooltip is displayed
|
|
||||||
if (verifyExistence) {
|
|
||||||
cy.get('div.tooltip-inner').
|
|
||||||
should('be.visible').
|
|
||||||
and('contain', channel.display_name);
|
|
||||||
} else {
|
|
||||||
cy.get('div.tooltip-inner').should('not.exist');
|
|
||||||
}
|
|
||||||
|
|
||||||
// # Move cursor away from channel
|
|
||||||
cy.get(`#sidebarItem_${channel.name}`).should('be.visible').trigger('mouseout');
|
|
||||||
}
|
|
||||||
|
|
||||||
describe('channel name tooltips', () => {
|
describe('channel name tooltips', () => {
|
||||||
let loggedUser: UserProfile;
|
let loggedUser: UserProfile;
|
||||||
let longUser: UserProfile;
|
let longUser: UserProfile;
|
||||||
@@ -122,12 +102,30 @@ describe('channel name tooltips', () => {
|
|||||||
cy.uiGetButton('Go').click();
|
cy.uiGetButton('Go').click();
|
||||||
|
|
||||||
// # Hover on the channel name
|
// # Hover on the channel name
|
||||||
cy.get(`#sidebarItem_${Cypress._.sortBy([loggedUser.id, longUser.id]).join('__')}`).scrollIntoView().should('be.visible').trigger('mouseover');
|
cy.get(`#sidebarItem_${Cypress._.sortBy([loggedUser.id, longUser.id]).join('__')}`).scrollIntoView().should('be.visible').trigger('mouseenter');
|
||||||
|
|
||||||
// * Verify that the tooltip is displayed
|
// * Verify that the tooltip is displayed
|
||||||
cy.get('div.tooltip-inner').should('be.visible');
|
cy.findByRole('tooltip').should('be.visible');
|
||||||
|
|
||||||
// # Move cursor away from channel
|
// # Move cursor away from channel
|
||||||
cy.get(`#sidebarItem_${Cypress._.sortBy([loggedUser.id, longUser.id]).join('__')}`).scrollIntoView().should('be.visible').trigger('mouseout');
|
cy.get(`#sidebarItem_${Cypress._.sortBy([loggedUser.id, longUser.id]).join('__')}`).scrollIntoView().should('be.visible').trigger('mouseleave');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function verifyChannel(channel: Channel, verifyExistence = true) {
|
||||||
|
// # Wait for Channel to be created
|
||||||
|
cy.wait(TIMEOUTS.HALF_SEC);
|
||||||
|
|
||||||
|
// # Hover on the channel name
|
||||||
|
cy.get(`#sidebarItem_${channel.name}`).should('be.visible').trigger('mouseenter');
|
||||||
|
|
||||||
|
// * Verify that the tooltip is displayed
|
||||||
|
if (verifyExistence) {
|
||||||
|
cy.findByRole('tooltip').should('be.visible').and('have.text', channel.display_name);
|
||||||
|
} else {
|
||||||
|
cy.findByRole('tooltip').should('not.exist');
|
||||||
|
}
|
||||||
|
|
||||||
|
// # Move cursor away from channel
|
||||||
|
cy.get(`#sidebarItem_${channel.name}`).should('be.visible').trigger('mouseleave');
|
||||||
|
}
|
||||||
|
|||||||
@@ -104,14 +104,16 @@ describe('MM-T4064 Status expiry visibility', () => {
|
|||||||
// # Post a message in the channel
|
// # Post a message in the channel
|
||||||
cy.postMessage('Hello World!');
|
cy.postMessage('Hello World!');
|
||||||
|
|
||||||
// # Hover on the custom status emoji present in the post header
|
// # Get the last post
|
||||||
cy.get('.post.current--user .post__header span.emoticon').trigger('mouseover');
|
cy.getLastPostId().then((postId) => {
|
||||||
|
// # Hover on the custom status emoji present in the post header
|
||||||
|
cy.get(`#post_${postId}`).find('.emoticon').should('exist').trigger('mouseenter');
|
||||||
|
|
||||||
// * Custom status tooltip should be visible
|
// * Custom status tooltip should be visible and contain the correct custom status expiry time
|
||||||
cy.get('#custom-status-tooltip').should('exist');
|
cy.findByRole('tooltip').should('exist').and('contain.text', expiresAt.format(expiryTimeFormat));
|
||||||
|
|
||||||
// * Tooltip should contain the correct custom status expiry time
|
cy.get(`#post_${postId}`).find('.emoticon').trigger('mouseleave');
|
||||||
cy.get('#custom-status-tooltip .custom-status-expiry time').should('have.text', expiresAt.format(expiryTimeFormat));
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('MM-T4064_7 should show custom status expiry time in the user popover', () => {
|
it('MM-T4064_7 should show custom status expiry time in the user popover', () => {
|
||||||
|
|||||||
@@ -126,14 +126,16 @@ function testAudioFile(properties) {
|
|||||||
cy.get('@filePreviewModal').get('video').should('exist');
|
cy.get('@filePreviewModal').get('video').should('exist');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cy.get('.file-preview-modal__file-name').should('have.text', fileName);
|
||||||
|
|
||||||
// * Download button should exist
|
// * Download button should exist
|
||||||
cy.get('@filePreviewModal').uiGetDownloadFilePreviewModal().then((downloadLink) => {
|
cy.get('@filePreviewModal').uiGetDownloadFilePreviewModal().then((downloadLink) => {
|
||||||
expect(downloadLink.attr('download')).to.equal(fileName);
|
cy.wrap(downloadLink).parent().should('have.attr', 'download', fileName).then((link) => {
|
||||||
|
const fileAttachmentURL = link.attr('href');
|
||||||
|
|
||||||
const fileAttachmentURL = downloadLink.attr('href');
|
// * Verify that download link has correct name
|
||||||
|
downloadAttachmentAndVerifyItsProperties(fileAttachmentURL, fileName, 'attachment');
|
||||||
// * Verify that download link has correct name
|
});
|
||||||
downloadAttachmentAndVerifyItsProperties(fileAttachmentURL, fileName, 'attachment');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// # Close modal
|
// # Close modal
|
||||||
|
|||||||
@@ -114,12 +114,12 @@ function testGenericFile(properties) {
|
|||||||
|
|
||||||
// * Download button should exist
|
// * Download button should exist
|
||||||
cy.get('@filePreviewModal').uiGetDownloadFilePreviewModal().then((downloadLink) => {
|
cy.get('@filePreviewModal').uiGetDownloadFilePreviewModal().then((downloadLink) => {
|
||||||
expect(downloadLink.attr('download')).to.equal(fileName);
|
cy.wrap(downloadLink).parent().should('have.attr', 'download', fileName).then((link) => {
|
||||||
|
const fileAttachmentURL = link.attr('href');
|
||||||
|
|
||||||
const fileAttachmentURL = downloadLink.attr('href');
|
// * Verify that download link has correct name
|
||||||
|
downloadAttachmentAndVerifyItsProperties(fileAttachmentURL, fileName, 'attachment');
|
||||||
// * Verify that download link has correct name
|
});
|
||||||
downloadAttachmentAndVerifyItsProperties(fileAttachmentURL, fileName, 'attachment');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// # Close modal
|
// # Close modal
|
||||||
|
|||||||
@@ -145,12 +145,12 @@ function testImage(properties) {
|
|||||||
|
|
||||||
// * Download button should exist
|
// * Download button should exist
|
||||||
cy.get('@filePreviewModal').uiGetDownloadFilePreviewModal().then((downloadLink) => {
|
cy.get('@filePreviewModal').uiGetDownloadFilePreviewModal().then((downloadLink) => {
|
||||||
expect(downloadLink.attr('download')).to.equal(fileName);
|
cy.wrap(downloadLink).parent().should('have.attr', 'download', fileName).then((link) => {
|
||||||
|
const fileAttachmentURL = link.attr('href');
|
||||||
|
|
||||||
const fileAttachmentURL = downloadLink.attr('href');
|
// * Verify that download link has correct name
|
||||||
|
downloadAttachmentAndVerifyItsProperties(fileAttachmentURL, fileName, 'attachment');
|
||||||
// * Verify that download link has correct name
|
});
|
||||||
downloadAttachmentAndVerifyItsProperties(fileAttachmentURL, fileName, 'attachment');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// # Close modal
|
// # Close modal
|
||||||
|
|||||||
@@ -126,12 +126,12 @@ export function testVideoFile(properties) {
|
|||||||
|
|
||||||
// * Download button should exist
|
// * Download button should exist
|
||||||
cy.get('@filePreviewModal').uiGetDownloadFilePreviewModal().then((downloadLink) => {
|
cy.get('@filePreviewModal').uiGetDownloadFilePreviewModal().then((downloadLink) => {
|
||||||
expect(downloadLink.attr('download')).to.equal(fileName);
|
cy.wrap(downloadLink).parent().should('have.attr', 'download', fileName).then((link) => {
|
||||||
|
const fileAttachmentURL = link.attr('href');
|
||||||
|
|
||||||
const fileAttachmentURL = downloadLink.attr('href');
|
// * Verify that download link has correct name
|
||||||
|
downloadAttachmentAndVerifyItsProperties(fileAttachmentURL, fileName, 'attachment');
|
||||||
// * Verify that download link has correct name
|
});
|
||||||
downloadAttachmentAndVerifyItsProperties(fileAttachmentURL, fileName, 'attachment');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// # Close modal
|
// # Close modal
|
||||||
|
|||||||
@@ -71,8 +71,8 @@ describe('Upload Files', () => {
|
|||||||
cy.uiGetFilePreviewModal();
|
cy.uiGetFilePreviewModal();
|
||||||
|
|
||||||
// # Hover over the downlink button and verify that tooltip is shown
|
// # Hover over the downlink button and verify that tooltip is shown
|
||||||
cy.uiGetDownloadLinkFilePreviewModal().trigger('mouseover');
|
cy.uiGetDownloadLinkFilePreviewModal().trigger('mouseenter');
|
||||||
cy.uiGetToolTip('Get a public link');
|
cy.findByText('Get a public link').should('exist');
|
||||||
|
|
||||||
// # Copy download link
|
// # Copy download link
|
||||||
cy.uiGetDownloadLinkFilePreviewModal().click();
|
cy.uiGetDownloadLinkFilePreviewModal().click();
|
||||||
@@ -178,8 +178,8 @@ describe('Upload Files', () => {
|
|||||||
cy.uiGetFilePreviewModal();
|
cy.uiGetFilePreviewModal();
|
||||||
|
|
||||||
// # Hover over the downlink button and verify that tooltip is shown
|
// # Hover over the downlink button and verify that tooltip is shown
|
||||||
cy.uiGetDownloadLinkFilePreviewModal().trigger('mouseover');
|
cy.uiGetDownloadLinkFilePreviewModal().trigger('mouseenter');
|
||||||
cy.uiGetToolTip('Get a public link');
|
cy.findByText('Get a public link').should('exist');
|
||||||
|
|
||||||
// # Click to copy download link
|
// # Click to copy download link
|
||||||
cy.uiGetDownloadLinkFilePreviewModal().click({force: true});
|
cy.uiGetDownloadLinkFilePreviewModal().click({force: true});
|
||||||
|
|||||||
@@ -140,12 +140,12 @@ describe('Upload Files', () => {
|
|||||||
|
|
||||||
// * Download button should exist
|
// * Download button should exist
|
||||||
cy.get('@filePreviewModal').uiGetDownloadFilePreviewModal().then((downloadLink) => {
|
cy.get('@filePreviewModal').uiGetDownloadFilePreviewModal().then((downloadLink) => {
|
||||||
expect(downloadLink.attr('download')).to.equal(file.filename);
|
cy.wrap(downloadLink).parent().should('have.attr', 'download', file.filename).then((link) => {
|
||||||
|
const fileAttachmentURL = link.attr('href');
|
||||||
|
|
||||||
const fileAttachmentURL = downloadLink.attr('href');
|
// * Verify that download link has correct name
|
||||||
|
downloadAttachmentAndVerifyItsProperties(fileAttachmentURL, file.filename, 'attachment');
|
||||||
// * Verify that download link has correct name
|
});
|
||||||
downloadAttachmentAndVerifyItsProperties(fileAttachmentURL, file.filename, 'attachment');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// # Close the modal
|
// # Close the modal
|
||||||
@@ -174,12 +174,12 @@ describe('Upload Files', () => {
|
|||||||
|
|
||||||
// * Download button should exist
|
// * Download button should exist
|
||||||
cy.get('@filePreviewModal').uiGetDownloadFilePreviewModal().then((downloadLink) => {
|
cy.get('@filePreviewModal').uiGetDownloadFilePreviewModal().then((downloadLink) => {
|
||||||
expect(downloadLink.attr('download')).to.equal(filename);
|
cy.wrap(downloadLink).parent().should('have.attr', 'download', filename).then((link) => {
|
||||||
|
const fileAttachmentURL = link.attr('href');
|
||||||
|
|
||||||
const fileAttachmentURL = downloadLink.attr('href');
|
// * Verify that download link has correct name
|
||||||
|
downloadAttachmentAndVerifyItsProperties(fileAttachmentURL, filename, 'attachment');
|
||||||
// * Verify that download link has correct name
|
});
|
||||||
downloadAttachmentAndVerifyItsProperties(fileAttachmentURL, filename, 'attachment');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// # Close the modal
|
// # Close the modal
|
||||||
@@ -405,12 +405,12 @@ describe('Upload Files', () => {
|
|||||||
|
|
||||||
// * Download button should exist
|
// * Download button should exist
|
||||||
cy.get('@filePreviewModal').uiGetDownloadFilePreviewModal().then((downloadLink) => {
|
cy.get('@filePreviewModal').uiGetDownloadFilePreviewModal().then((downloadLink) => {
|
||||||
expect(downloadLink.attr('download')).to.equal(filename);
|
cy.wrap(downloadLink).parent().should('have.attr', 'download', filename).then((link) => {
|
||||||
|
const fileAttachmentURL = link.attr('href');
|
||||||
|
|
||||||
const fileAttachmentURL = downloadLink.attr('href');
|
// * Verify that download link has correct name
|
||||||
|
downloadAttachmentAndVerifyItsProperties(fileAttachmentURL, filename, 'attachment');
|
||||||
// * Verify that download link has correct name
|
});
|
||||||
downloadAttachmentAndVerifyItsProperties(fileAttachmentURL, filename, 'attachment');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// # Close modal
|
// # Close modal
|
||||||
|
|||||||
@@ -60,10 +60,10 @@ describe('channels > App Bar', {testIsolation: true}, () => {
|
|||||||
cy.visit(`/${testTeam.name}/channels/town-square`);
|
cy.visit(`/${testTeam.name}/channels/town-square`);
|
||||||
|
|
||||||
// # Hover over the channel header icon
|
// # Hover over the channel header icon
|
||||||
cy.getPlaybooksAppBarIcon().trigger('mouseover');
|
cy.getPlaybooksAppBarIcon().trigger('mouseenter');
|
||||||
|
|
||||||
// * Verify tooltip text
|
// * Verify tooltip text
|
||||||
cy.findByRole('tooltip', {name: 'Playbooks'}).should('be.visible');
|
cy.findByRole('tooltip').should('be.visible').and('contain', 'Playbooks');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -51,17 +51,17 @@ Cypress.Commands.add('uiGetContentFilePreviewModal', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
Cypress.Commands.add('uiGetDownloadLinkFilePreviewModal', () => {
|
Cypress.Commands.add('uiGetDownloadLinkFilePreviewModal', () => {
|
||||||
return cy.uiGetFilePreviewModal().find('.icon-link-variant').parent();
|
return cy.uiGetFilePreviewModal().find('.icon-link-variant');
|
||||||
});
|
});
|
||||||
|
|
||||||
Cypress.Commands.add('uiGetDownloadFilePreviewModal', () => {
|
Cypress.Commands.add('uiGetDownloadFilePreviewModal', () => {
|
||||||
return cy.uiGetFilePreviewModal().find('.icon-download-outline').parent();
|
return cy.uiGetFilePreviewModal().find('.icon-download-outline');
|
||||||
});
|
});
|
||||||
|
|
||||||
Cypress.Commands.add('uiGetArrowLeftFilePreviewModal', () => {
|
Cypress.Commands.add('uiGetArrowLeftFilePreviewModal', () => {
|
||||||
return cy.uiGetFilePreviewModal().find('.icon-chevron-left').parent();
|
return cy.uiGetFilePreviewModal().find('.icon-chevron-left');
|
||||||
});
|
});
|
||||||
|
|
||||||
Cypress.Commands.add('uiGetArrowRightFilePreviewModal', () => {
|
Cypress.Commands.add('uiGetArrowRightFilePreviewModal', () => {
|
||||||
return cy.uiGetFilePreviewModal().find('.icon-chevron-right').parent();
|
return cy.uiGetFilePreviewModal().find('.icon-chevron-right');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,5 +2,5 @@
|
|||||||
// See LICENSE.txt for license information.
|
// See LICENSE.txt for license information.
|
||||||
|
|
||||||
Cypress.Commands.add('uiGetToolTip', (text) => {
|
Cypress.Commands.add('uiGetToolTip', (text) => {
|
||||||
cy.findByRole('tooltip').should('contain', text);
|
cy.findByRole('tooltip').should('exist').and('contain', text);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -763,8 +763,6 @@ exports[`components/SettingItemMin should match snapshot, team icon on source 1`
|
|||||||
</div>
|
</div>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
disabled={false}
|
disabled={false}
|
||||||
id="removeIcon"
|
|
||||||
placement="right"
|
|
||||||
title={
|
title={
|
||||||
<Memo(MemoizedFormattedMessage)
|
<Memo(MemoizedFormattedMessage)
|
||||||
defaultMessage="Remove This Icon"
|
defaultMessage="Remove This Icon"
|
||||||
@@ -922,8 +920,6 @@ exports[`components/SettingItemMin should match snapshot, user icon on source 1`
|
|||||||
</div>
|
</div>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
disabled={false}
|
disabled={false}
|
||||||
id="removeIcon"
|
|
||||||
placement="right"
|
|
||||||
title={
|
title={
|
||||||
<Memo(MemoizedFormattedMessage)
|
<Memo(MemoizedFormattedMessage)
|
||||||
defaultMessage="Remove Profile Picture"
|
defaultMessage="Remove Profile Picture"
|
||||||
|
|||||||
@@ -47,8 +47,6 @@ exports[`components/SizeAwareImage should load download and copy link buttons wh
|
|||||||
className="image-preview-utility-buttons-container image-preview-utility-buttons-container--small-image"
|
className="image-preview-utility-buttons-container image-preview-utility-buttons-container--small-image"
|
||||||
>
|
>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="single_image_view.copy_link_tooltip.text"
|
|
||||||
placement="top"
|
|
||||||
title={
|
title={
|
||||||
<Memo(MemoizedFormattedMessage)
|
<Memo(MemoizedFormattedMessage)
|
||||||
defaultMessage="Copy link"
|
defaultMessage="Copy link"
|
||||||
@@ -68,8 +66,6 @@ exports[`components/SizeAwareImage should load download and copy link buttons wh
|
|||||||
</button>
|
</button>
|
||||||
</WithTooltip>
|
</WithTooltip>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="single_image_view.download_tooltip.text"
|
|
||||||
placement="top"
|
|
||||||
title={
|
title={
|
||||||
<Memo(MemoizedFormattedMessage)
|
<Memo(MemoizedFormattedMessage)
|
||||||
defaultMessage="Download"
|
defaultMessage="Download"
|
||||||
@@ -145,8 +141,6 @@ exports[`components/SizeAwareImage should match snapshot when handleSmallImageCo
|
|||||||
className="image-preview-utility-buttons-container image-preview-utility-buttons-container--small-image"
|
className="image-preview-utility-buttons-container image-preview-utility-buttons-container--small-image"
|
||||||
>
|
>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="single_image_view.copy_link_tooltip.text"
|
|
||||||
placement="top"
|
|
||||||
title={
|
title={
|
||||||
<Memo(MemoizedFormattedMessage)
|
<Memo(MemoizedFormattedMessage)
|
||||||
defaultMessage="Copy link"
|
defaultMessage="Copy link"
|
||||||
@@ -166,8 +160,6 @@ exports[`components/SizeAwareImage should match snapshot when handleSmallImageCo
|
|||||||
</button>
|
</button>
|
||||||
</WithTooltip>
|
</WithTooltip>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="single_image_view.download_tooltip.text"
|
|
||||||
placement="top"
|
|
||||||
title={
|
title={
|
||||||
<Memo(MemoizedFormattedMessage)
|
<Memo(MemoizedFormattedMessage)
|
||||||
defaultMessage="Download"
|
defaultMessage="Download"
|
||||||
@@ -256,8 +248,6 @@ exports[`components/SizeAwareImage should render a placeholder and has loader wh
|
|||||||
className="image-preview-utility-buttons-container image-preview-utility-buttons-container--small-image"
|
className="image-preview-utility-buttons-container image-preview-utility-buttons-container--small-image"
|
||||||
>
|
>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="single_image_view.copy_link_tooltip.text"
|
|
||||||
placement="top"
|
|
||||||
title={
|
title={
|
||||||
<Memo(MemoizedFormattedMessage)
|
<Memo(MemoizedFormattedMessage)
|
||||||
defaultMessage="Copy link"
|
defaultMessage="Copy link"
|
||||||
@@ -277,8 +267,6 @@ exports[`components/SizeAwareImage should render a placeholder and has loader wh
|
|||||||
</button>
|
</button>
|
||||||
</WithTooltip>
|
</WithTooltip>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="single_image_view.download_tooltip.text"
|
|
||||||
placement="top"
|
|
||||||
title={
|
title={
|
||||||
<Memo(MemoizedFormattedMessage)
|
<Memo(MemoizedFormattedMessage)
|
||||||
defaultMessage="Download"
|
defaultMessage="Download"
|
||||||
|
|||||||
@@ -8,8 +8,6 @@ exports[`components/actions_menu/ActionsMenu has actions - marketplace disabled
|
|||||||
open={true}
|
open={true}
|
||||||
>
|
>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="center_post_id_1_tooltip"
|
|
||||||
placement="top"
|
|
||||||
title={
|
title={
|
||||||
<Memo(MemoizedFormattedMessage)
|
<Memo(MemoizedFormattedMessage)
|
||||||
defaultMessage="Message actions"
|
defaultMessage="Message actions"
|
||||||
@@ -59,8 +57,6 @@ exports[`components/actions_menu/ActionsMenu has actions - marketplace enabled a
|
|||||||
open={true}
|
open={true}
|
||||||
>
|
>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="center_post_id_1_tooltip"
|
|
||||||
placement="top"
|
|
||||||
title={
|
title={
|
||||||
<Memo(MemoizedFormattedMessage)
|
<Memo(MemoizedFormattedMessage)
|
||||||
defaultMessage="Message actions"
|
defaultMessage="Message actions"
|
||||||
@@ -129,8 +125,6 @@ exports[`components/actions_menu/ActionsMenu no actions - sysadmin - menu should
|
|||||||
open={true}
|
open={true}
|
||||||
>
|
>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="center_post_id_1_tooltip"
|
|
||||||
placement="top"
|
|
||||||
title={
|
title={
|
||||||
<Memo(MemoizedFormattedMessage)
|
<Memo(MemoizedFormattedMessage)
|
||||||
defaultMessage="Message actions"
|
defaultMessage="Message actions"
|
||||||
|
|||||||
@@ -381,14 +381,12 @@ export class ActionMenuClass extends React.PureComponent<Props, State> {
|
|||||||
onToggle={this.handleDropdownOpened}
|
onToggle={this.handleDropdownOpened}
|
||||||
>
|
>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id={`${this.props.location}_${this.props.post.id}_tooltip`}
|
|
||||||
title={
|
title={
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='post_info.tooltip.actions'
|
id='post_info.tooltip.actions'
|
||||||
defaultMessage='Message actions'
|
defaultMessage='Message actions'
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
placement='top'
|
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
key='more-actions-button'
|
key='more-actions-button'
|
||||||
|
|||||||
@@ -179,8 +179,6 @@ exports[`components/BleveSettings should match snapshot, disabled 1`] = `
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -373,8 +371,6 @@ exports[`components/BleveSettings should match snapshot, enabled 1`] = `
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -190,8 +190,6 @@ exports[`components/ClusterSettings should match snapshot, compression disabled
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -397,8 +395,6 @@ exports[`components/ClusterSettings should match snapshot, compression enabled 1
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -604,8 +600,6 @@ exports[`components/ClusterSettings should match snapshot, encryption disabled 1
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -811,8 +805,6 @@ exports[`components/ClusterSettings should match snapshot, encryption enabled 1`
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -409,8 +409,6 @@ exports[`components/DatabaseSettings should match snapshot 1`] = `
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -478,8 +478,6 @@ exports[`components/ElasticSearchSettings should match snapshot, disabled 1`] =
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -972,8 +970,6 @@ exports[`components/ElasticSearchSettings should match snapshot, enabled 1`] = `
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -147,8 +147,6 @@ exports[`components/MessageExportSettings should match snapshot, disabled, actia
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -425,8 +423,6 @@ exports[`components/MessageExportSettings should match snapshot, disabled, globa
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -589,8 +585,6 @@ exports[`components/MessageExportSettings should match snapshot, enabled, actian
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -867,8 +861,6 @@ exports[`components/MessageExportSettings should match snapshot, enabled, global
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -172,8 +172,6 @@ exports[`components/PushSettings should match snapshot, licensed 1`] = `
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -305,8 +303,6 @@ exports[`components/PushSettings should match snapshot, unlicensed 1`] = `
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -675,8 +675,6 @@ exports[`components/admin_console/SchemaAdminSettings should match snapshot with
|
|||||||
savingMessage="Saving Config..."
|
savingMessage="Saving Config..."
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -60,8 +60,6 @@ const AdminSettings = ({
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id='error-tooltip'
|
|
||||||
placement='top'
|
|
||||||
title={serverError ?? ''}
|
title={serverError ?? ''}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -273,10 +273,8 @@ export const InvoiceInfo = ({invoice, product, fullCharges, partialCharges, hasM
|
|||||||
defaultMessage='Partial charges'
|
defaultMessage='Partial charges'
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id='BillingSubscriptions__seatOverageTooltip'
|
|
||||||
title={messages.partialChargesTooltipTitle}
|
title={messages.partialChargesTooltipTitle}
|
||||||
hint={messages.partialChargesTooltipText}
|
hint={messages.partialChargesTooltipText}
|
||||||
placement='bottom'
|
|
||||||
>
|
>
|
||||||
<i className='icon-information-outline'/>
|
<i className='icon-information-outline'/>
|
||||||
</WithTooltip>
|
</WithTooltip>
|
||||||
|
|||||||
@@ -198,13 +198,13 @@ export default class BrandImageSetting extends React.PureComponent<Props, State>
|
|||||||
if (!this.props.disabled) {
|
if (!this.props.disabled) {
|
||||||
overlay = (
|
overlay = (
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id='removeIcon'
|
title={(
|
||||||
title={
|
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='admin.team.removeBrandImage'
|
id='admin.team.removeBrandImage'
|
||||||
defaultMessage='Remove brand image'
|
defaultMessage='Remove brand image'
|
||||||
/>}
|
/>
|
||||||
placement='right'
|
)}
|
||||||
|
isVertical={false}
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
type='button'
|
type='button'
|
||||||
|
|||||||
@@ -180,8 +180,6 @@ exports[`components/admin_console/CustomPluginSettings should match snapshot wit
|
|||||||
savingMessage="Saving Config..."
|
savingMessage="Saving Config..."
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -232,8 +230,6 @@ exports[`components/admin_console/CustomPluginSettings should match snapshot wit
|
|||||||
savingMessage="Saving Config..."
|
savingMessage="Saving Config..."
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -434,8 +430,6 @@ exports[`components/admin_console/CustomPluginSettings should match snapshot wit
|
|||||||
savingMessage="Saving Config..."
|
savingMessage="Saving Config..."
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -31,8 +31,6 @@ exports[`components/admin_console/CustomTermsOfServiceSettings should match snap
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -79,8 +77,6 @@ exports[`components/admin_console/CustomTermsOfServiceSettings should match snap
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -127,8 +123,6 @@ exports[`components/admin_console/CustomTermsOfServiceSettings should match snap
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -175,8 +169,6 @@ exports[`components/admin_console/CustomTermsOfServiceSettings should match snap
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -44,8 +44,6 @@ const EditTableRow = ({
|
|||||||
{hoveredRow === index && (
|
{hoveredRow === index && (
|
||||||
<>
|
<>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id='edit-tooltip'
|
|
||||||
placement='top'
|
|
||||||
title={formatMessage({id: 'admin.ip_filtering.edit', defaultMessage: 'Edit'})}
|
title={formatMessage({id: 'admin.ip_filtering.edit', defaultMessage: 'Edit'})}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -58,8 +56,6 @@ const EditTableRow = ({
|
|||||||
</div>
|
</div>
|
||||||
</WithTooltip>
|
</WithTooltip>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id='delete-tooltip'
|
|
||||||
placement='top'
|
|
||||||
title={formatMessage({id: 'admin.ip_filtering.delete', defaultMessage: 'Delete'})}
|
title={formatMessage({id: 'admin.ip_filtering.delete', defaultMessage: 'Delete'})}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -65,8 +65,6 @@ export function ElapsedDurationCell(props: Props) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id='system-users-cell-elapsed-duration-tooltip'
|
|
||||||
placement='bottom'
|
|
||||||
title={exactPassedInDate}
|
title={exactPassedInDate}
|
||||||
>
|
>
|
||||||
<span>{elapsedDaysText}</span>
|
<span>{elapsedDaysText}</span>
|
||||||
|
|||||||
@@ -239,8 +239,6 @@ export default abstract class OLDAdminSettings <Props extends BaseProps, State e
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id='error-tooltip'
|
|
||||||
placement='top'
|
|
||||||
title={this.state?.serverError ?? ''}
|
title={this.state?.serverError ?? ''}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -25,8 +25,6 @@ exports[`components/admin_console/permission_schemes_settings/permission_descrip
|
|||||||
>
|
>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
disabled={false}
|
disabled={false}
|
||||||
id="defaultID"
|
|
||||||
placement="top"
|
|
||||||
title={
|
title={
|
||||||
<span
|
<span
|
||||||
className="inherit-link-wrapper"
|
className="inherit-link-wrapper"
|
||||||
@@ -44,108 +42,42 @@ exports[`components/admin_console/permission_schemes_settings/permission_descrip
|
|||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<OverlayTrigger
|
<span
|
||||||
defaultOverlayShown={false}
|
className="permission-description"
|
||||||
delay={400}
|
onBlur={[Function]}
|
||||||
disabled={false}
|
onClick={[Function]}
|
||||||
overlay={<Unknown />}
|
onFocus={[Function]}
|
||||||
placement="top"
|
onKeyDown={[Function]}
|
||||||
trigger={
|
onMouseLeave={[Function]}
|
||||||
Array [
|
onMouseMove={[Function]}
|
||||||
"hover",
|
onPointerDown={[Function]}
|
||||||
"focus",
|
onPointerEnter={[Function]}
|
||||||
]
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
<OverlayTrigger
|
<span
|
||||||
defaultOverlayShown={false}
|
className="inherit-link-wrapper"
|
||||||
delay={400}
|
|
||||||
overlay={
|
|
||||||
<OverlayWrapper
|
|
||||||
intl={
|
|
||||||
Object {
|
|
||||||
"$t": [Function],
|
|
||||||
"defaultFormats": Object {},
|
|
||||||
"defaultLocale": "en",
|
|
||||||
"defaultRichTextElements": undefined,
|
|
||||||
"fallbackOnEmptyString": true,
|
|
||||||
"formatDate": [Function],
|
|
||||||
"formatDateTimeRange": [Function],
|
|
||||||
"formatDateToParts": [Function],
|
|
||||||
"formatDisplayName": [Function],
|
|
||||||
"formatList": [Function],
|
|
||||||
"formatListToParts": [Function],
|
|
||||||
"formatMessage": [Function],
|
|
||||||
"formatNumber": [Function],
|
|
||||||
"formatNumberToParts": [Function],
|
|
||||||
"formatPlural": [Function],
|
|
||||||
"formatRelativeTime": [Function],
|
|
||||||
"formatTime": [Function],
|
|
||||||
"formatTimeToParts": [Function],
|
|
||||||
"formats": Object {},
|
|
||||||
"formatters": Object {
|
|
||||||
"getDateTimeFormat": [Function],
|
|
||||||
"getDisplayNames": [Function],
|
|
||||||
"getListFormat": [Function],
|
|
||||||
"getMessageFormat": [Function],
|
|
||||||
"getNumberFormat": [Function],
|
|
||||||
"getPluralRules": [Function],
|
|
||||||
"getRelativeTimeFormat": [Function],
|
|
||||||
},
|
|
||||||
"locale": "en",
|
|
||||||
"messages": Object {},
|
|
||||||
"onError": [Function],
|
|
||||||
"onWarn": [Function],
|
|
||||||
"textComponent": "span",
|
|
||||||
"timeZone": "Etc/UTC",
|
|
||||||
"wrapRichTextChunksInFragment": undefined,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
placement="top"
|
|
||||||
trigger={
|
|
||||||
Array [
|
|
||||||
"hover",
|
|
||||||
"focus",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
<span
|
<FormattedMessage
|
||||||
className="permission-description"
|
defaultMessage="Inherited from <link>{name}</link>."
|
||||||
onBlur={[Function]}
|
id="admin.permissions.inherited_from"
|
||||||
onClick={[Function]}
|
values={
|
||||||
onFocus={[Function]}
|
Object {
|
||||||
onMouseOut={[Function]}
|
"link": [Function],
|
||||||
onMouseOver={[Function]}
|
"name": "All Members",
|
||||||
|
}
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<span
|
<span>
|
||||||
className="inherit-link-wrapper"
|
Inherited from
|
||||||
>
|
<a
|
||||||
<FormattedMessage
|
key=".$.1"
|
||||||
defaultMessage="Inherited from <link>{name}</link>."
|
|
||||||
id="admin.permissions.inherited_from"
|
|
||||||
values={
|
|
||||||
Object {
|
|
||||||
"link": [Function],
|
|
||||||
"name": "All Members",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
<span>
|
All Members
|
||||||
Inherited from
|
</a>
|
||||||
<a
|
.
|
||||||
key=".$.1"
|
|
||||||
>
|
|
||||||
All Members
|
|
||||||
</a>
|
|
||||||
.
|
|
||||||
</span>
|
|
||||||
</FormattedMessage>
|
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</FormattedMessage>
|
||||||
</OverlayTrigger>
|
</span>
|
||||||
</OverlayTrigger>
|
</span>
|
||||||
</WithTooltip>
|
</WithTooltip>
|
||||||
</PermissionDescription>
|
</PermissionDescription>
|
||||||
</Provider>
|
</Provider>
|
||||||
@@ -199,8 +131,6 @@ exports[`components/admin_console/permission_schemes_settings/permission_descrip
|
|||||||
exports[`components/admin_console/permission_schemes_settings/permission_description should match snapshot with clickable link 1`] = `
|
exports[`components/admin_console/permission_schemes_settings/permission_description should match snapshot with clickable link 1`] = `
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
disabled={false}
|
disabled={false}
|
||||||
id="defaultID"
|
|
||||||
placement="top"
|
|
||||||
title={
|
title={
|
||||||
<span>
|
<span>
|
||||||
This is a clickable description
|
This is a clickable description
|
||||||
@@ -221,8 +151,6 @@ exports[`components/admin_console/permission_schemes_settings/permission_descrip
|
|||||||
exports[`components/admin_console/permission_schemes_settings/permission_description should match snapshot with default Props 1`] = `
|
exports[`components/admin_console/permission_schemes_settings/permission_description should match snapshot with default Props 1`] = `
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
disabled={false}
|
disabled={false}
|
||||||
id="defaultID"
|
|
||||||
placement="top"
|
|
||||||
title="This is the description"
|
title="This is the description"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
|
|||||||
@@ -68,8 +68,6 @@ const PermissionDescription = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id={id}
|
|
||||||
placement='top'
|
|
||||||
title={content}
|
title={content}
|
||||||
disabled={!showTooltip}
|
disabled={!showTooltip}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -273,8 +273,6 @@ exports[`components/admin_console/permission_schemes_settings/permissions_scheme
|
|||||||
Team 8
|
Team 8
|
||||||
</span>
|
</span>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="id-extra-teams-overlay"
|
|
||||||
placement="bottom"
|
|
||||||
title="Team 9, Team 10"
|
title="Team 9, Team 10"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
|
|||||||
@@ -145,9 +145,7 @@ export default class PermissionsSchemeSummary extends React.PureComponent<Props
|
|||||||
if (teams.length > MAX_TEAMS_PER_SCHEME_SUMMARY) {
|
if (teams.length > MAX_TEAMS_PER_SCHEME_SUMMARY) {
|
||||||
extraTeams = (
|
extraTeams = (
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id={scheme.id + '-extra-teams-overlay'}
|
|
||||||
title={this.props?.teams?.slice(MAX_TEAMS_PER_SCHEME_SUMMARY).map((team) => team.display_name).join(', ') ?? ''}
|
title={this.props?.teams?.slice(MAX_TEAMS_PER_SCHEME_SUMMARY).map((team) => team.display_name).join(', ') ?? ''}
|
||||||
placement='bottom'
|
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
className='team'
|
className='team'
|
||||||
|
|||||||
@@ -244,8 +244,6 @@ exports[`components/PluginManagement should match snapshot 1`] = `
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -505,8 +503,6 @@ exports[`components/PluginManagement should match snapshot when \`Enable Marketp
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -583,8 +579,6 @@ exports[`components/PluginManagement should match snapshot when \`Enable Plugins
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -844,8 +838,6 @@ exports[`components/PluginManagement should match snapshot when \`Enable Remote
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -1107,8 +1099,6 @@ exports[`components/PluginManagement should match snapshot when \`Require Signat
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -1372,8 +1362,6 @@ exports[`components/PluginManagement should match snapshot, No installed plugins
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -1633,8 +1621,6 @@ exports[`components/PluginManagement should match snapshot, allow insecure URL e
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -1878,8 +1864,6 @@ exports[`components/PluginManagement should match snapshot, disabled 1`] = `
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -2139,8 +2123,6 @@ exports[`components/PluginManagement should match snapshot, text entered into th
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -2407,8 +2389,6 @@ exports[`components/PluginManagement should match snapshot, upload disabled 1`]
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -2731,8 +2711,6 @@ exports[`components/PluginManagement should match snapshot, with installed plugi
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -3023,8 +3001,6 @@ exports[`components/PluginManagement should match snapshot, with installed plugi
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -3315,8 +3291,6 @@ exports[`components/PluginManagement should match snapshot, with installed plugi
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -3607,8 +3581,6 @@ exports[`components/PluginManagement should match snapshot, with installed plugi
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -3931,8 +3903,6 @@ exports[`components/PluginManagement should match snapshot, with installed plugi
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="error-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -1350,8 +1350,6 @@ export class SchemaAdminSettings extends React.PureComponent<Props, State> {
|
|||||||
savingMessage={this.props.intl.formatMessage({id: 'admin.saving', defaultMessage: 'Saving Config...'})}
|
savingMessage={this.props.intl.formatMessage({id: 'admin.saving', defaultMessage: 'Saving Config...'})}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id='error-tooltip'
|
|
||||||
placement='top'
|
|
||||||
title={this.state?.serverError ?? ''}
|
title={this.state?.serverError ?? ''}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -230,8 +230,6 @@ export const ConnectionStatusLabel = ({rc}: {rc: RemoteCluster}) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id='connection-status-tooltip'
|
|
||||||
placement='top'
|
|
||||||
title={(
|
title={(
|
||||||
<>
|
<>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
|
|||||||
@@ -459,7 +459,6 @@ export class SystemUserDetail extends PureComponent<Props, State> {
|
|||||||
{
|
{
|
||||||
this.props.showLockedManageUserSettings &&
|
this.props.showLockedManageUserSettings &&
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id='adminUserSettingUpdateDisabled'
|
|
||||||
title={defineMessage({
|
title={defineMessage({
|
||||||
id: 'generic.enterprise_feature',
|
id: 'generic.enterprise_feature',
|
||||||
defaultMessage: 'Enterprise feature',
|
defaultMessage: 'Enterprise feature',
|
||||||
@@ -468,7 +467,6 @@ export class SystemUserDetail extends PureComponent<Props, State> {
|
|||||||
id: 'admin.user_item.manageSettings.disabled_tooltip',
|
id: 'admin.user_item.manageSettings.disabled_tooltip',
|
||||||
defaultMessage: 'Please upgrade to Enterprise to manage user settings',
|
defaultMessage: 'Please upgrade to Enterprise to manage user settings',
|
||||||
})}
|
})}
|
||||||
placement='top'
|
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
className='manageUserSettingsBtn btn disabled'
|
className='manageUserSettingsBtn btn disabled'
|
||||||
|
|||||||
@@ -279,13 +279,11 @@ function SystemUsers(props: Props) {
|
|||||||
{getDisplayName(info.row.original) || ''}
|
{getDisplayName(info.row.original) || ''}
|
||||||
{isRemoteUser && (
|
{isRemoteUser && (
|
||||||
<SharedUserIndicator
|
<SharedUserIndicator
|
||||||
id={`sharedUserIndicator-${info.row.original.id}`}
|
|
||||||
title={formatMessage({id: 'admin.system_users.list.userIsRemote', defaultMessage: 'Remote user'})}
|
title={formatMessage({id: 'admin.system_users.list.userIsRemote', defaultMessage: 'Remote user'})}
|
||||||
ariaLabel={formatMessage({id: 'admin.system_users.list.userIsRemoteAriaLabel', defaultMessage: 'This is a remote user'})}
|
ariaLabel={formatMessage({id: 'admin.system_users.list.userIsRemoteAriaLabel', defaultMessage: 'This is a remote user'})}
|
||||||
role='img'
|
role='img'
|
||||||
className='icon-12'
|
className='icon-12'
|
||||||
withTooltip={true}
|
withTooltip={true}
|
||||||
placement='top'
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -155,10 +155,9 @@ export function SystemUsersColumnTogglerMenu(props: Props) {
|
|||||||
return (
|
return (
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
key={column.id}
|
key={column.id}
|
||||||
id={column.id}
|
|
||||||
title={formatMessage({id: 'admin.system_users.column_toggler.mysql_unavailable.title', defaultMessage: 'Not available for servers using MySQL'})}
|
title={formatMessage({id: 'admin.system_users.column_toggler.mysql_unavailable.title', defaultMessage: 'Not available for servers using MySQL'})}
|
||||||
hint={formatMessage({id: 'admin.system_users.column_toggler.mysql_unavailable.desc', defaultMessage: 'Please use the export functionality to view these values'})}
|
hint={formatMessage({id: 'admin.system_users.column_toggler.mysql_unavailable.desc', defaultMessage: 'Please use the export functionality to view these values'})}
|
||||||
placement='left'
|
isVertical={false}
|
||||||
>
|
>
|
||||||
<Menu.Item
|
<Menu.Item
|
||||||
className='systemUsersColumnToggler__lockedItem'
|
className='systemUsersColumnToggler__lockedItem'
|
||||||
|
|||||||
@@ -113,10 +113,8 @@ export function SystemUsersExport(props: Props) {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id='sharedTooltip'
|
|
||||||
title={formatMessage({id: 'admin.system_users.exportButton.notLicensed.title', defaultMessage: 'Professional feature'})}
|
title={formatMessage({id: 'admin.system_users.exportButton.notLicensed.title', defaultMessage: 'Professional feature'})}
|
||||||
hint={formatMessage({id: 'admin.system_users.exportButton.notLicensed.hint', defaultMessage: 'This feature is available on the professional plan'})}
|
hint={formatMessage({id: 'admin.system_users.exportButton.notLicensed.hint', defaultMessage: 'This feature is available on the professional plan'})}
|
||||||
placement='top'
|
|
||||||
>
|
>
|
||||||
{button}
|
{button}
|
||||||
</WithTooltip>
|
</WithTooltip>
|
||||||
|
|||||||
@@ -29,8 +29,6 @@ exports[`components/admin_console/team_channel_settings/group/UsersToRemoveGroup
|
|||||||
className="UsersToRemoveGroups"
|
className="UsersToRemoveGroups"
|
||||||
>
|
>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="groupsTooltip"
|
|
||||||
placement="bottom"
|
|
||||||
title="group1, group2, group3"
|
title="group1, group2, group3"
|
||||||
>
|
>
|
||||||
<a
|
<a
|
||||||
|
|||||||
@@ -39,8 +39,6 @@ export default function UsersToRemoveGroups(props: UsersToRemoveGroupsProps): JS
|
|||||||
|
|
||||||
column = (
|
column = (
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id='groupsTooltip'
|
|
||||||
placement='bottom'
|
|
||||||
title={tooltip}
|
title={tooltip}
|
||||||
>
|
>
|
||||||
<a href='#'>{message}</a>
|
<a href='#'>{message}</a>
|
||||||
|
|||||||
@@ -65,10 +65,8 @@ export function TeamProfile({team, isArchived, onToggleArchive, isDisabled, save
|
|||||||
if (restoreDisabled) {
|
if (restoreDisabled) {
|
||||||
return (
|
return (
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id='sharedTooltip'
|
title={intl.formatMessage({id: 'workspace_limits.teams_limit_reached.upgrade_to_unarchive', defaultMessage: 'Upgrade to Unarchive'})}
|
||||||
title={defineMessage({id: 'workspace_limits.teams_limit_reached.upgrade_to_unarchive', defaultMessage: 'Upgrade to Unarchive'})}
|
hint={intl.formatMessage({id: 'workspace_limits.teams_limit_reached.tool_tip', defaultMessage: 'You\'ve reached the team limit for your current plan. Consider upgrading to unarchive this team or archive your other teams'})}
|
||||||
hint={defineMessage({id: 'workspace_limits.teams_limit_reached.tool_tip', defaultMessage: 'You\'ve reached the team limit for your current plan. Consider upgrading to unarchive this team or archive your other teams'})}
|
|
||||||
placement='bottom'
|
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className={'disabled-overlay-wrapper'}
|
className={'disabled-overlay-wrapper'}
|
||||||
|
|||||||
@@ -134,8 +134,6 @@ export default class UserGridRoleDropdown extends React.PureComponent<Props> {
|
|||||||
return (
|
return (
|
||||||
<div className='more-modal__shared-actions'>
|
<div className='more-modal__shared-actions'>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id='userGridDropdown.sharedUserIndicator.tooltip'
|
|
||||||
placement='bottom'
|
|
||||||
title={
|
title={
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='shared_user_indicator.tooltip'
|
id='shared_user_indicator.tooltip'
|
||||||
|
|||||||
@@ -147,8 +147,6 @@ const FormattingIcon = (props: FormattingIconProps): JSX.Element => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id='formatting-icon-tooltip'
|
|
||||||
placement='top'
|
|
||||||
title={
|
title={
|
||||||
<KeyboardShortcutSequence
|
<KeyboardShortcutSequence
|
||||||
shortcut={shortcut}
|
shortcut={shortcut}
|
||||||
|
|||||||
@@ -1,102 +1,41 @@
|
|||||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||||
// See LICENSE.txt for license information.
|
// See LICENSE.txt for license information.
|
||||||
|
|
||||||
|
import classNames from 'classnames';
|
||||||
import React, {memo} from 'react';
|
import React, {memo} from 'react';
|
||||||
import type {CSSProperties} from 'react';
|
|
||||||
import {FormattedMessage, useIntl} from 'react-intl';
|
import {FormattedMessage, useIntl} from 'react-intl';
|
||||||
import styled from 'styled-components';
|
|
||||||
|
|
||||||
import {CheckCircleOutlineIcon, BellRingOutlineIcon} from '@mattermost/compass-icons/components';
|
|
||||||
import type {PostPriorityMetadata} from '@mattermost/types/posts';
|
import type {PostPriorityMetadata} from '@mattermost/types/posts';
|
||||||
|
|
||||||
import {HasNoMentions, HasSpecialMentions} from 'components/post_priority/error_messages';
|
import {HasNoMentions, HasSpecialMentions} from 'components/post_priority/error_messages';
|
||||||
import PriorityLabel from 'components/post_priority/post_priority_label';
|
import PriorityLabel from 'components/post_priority/post_priority_label';
|
||||||
import WithTooltip from 'components/with_tooltip';
|
import WithTooltip from 'components/with_tooltip';
|
||||||
|
|
||||||
|
import './priority_labels.scss';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
canRemove: boolean;
|
canRemove: boolean;
|
||||||
hasError: boolean;
|
hasError: boolean;
|
||||||
specialMentions?: {[key: string]: boolean};
|
specialMentions?: {[key: string]: boolean};
|
||||||
onRemove?: () => void;
|
onRemove?: () => void;
|
||||||
padding?: CSSProperties['padding'];
|
|
||||||
persistentNotifications?: PostPriorityMetadata['persistent_notifications'];
|
persistentNotifications?: PostPriorityMetadata['persistent_notifications'];
|
||||||
priority?: PostPriorityMetadata['priority'];
|
priority?: PostPriorityMetadata['priority'];
|
||||||
requestedAck?: PostPriorityMetadata['requested_ack'];
|
requestedAck?: PostPriorityMetadata['requested_ack'];
|
||||||
};
|
};
|
||||||
|
|
||||||
type StyledProps = {
|
|
||||||
hasError: boolean;
|
|
||||||
};
|
|
||||||
|
|
||||||
const Priority = styled.div`
|
|
||||||
align-items: center;
|
|
||||||
display: flex;
|
|
||||||
gap: 6px;
|
|
||||||
padding: ${(props: {padding: CSSProperties['padding']}) => props.padding || '14px 16px 0'}
|
|
||||||
`;
|
|
||||||
|
|
||||||
const Acknowledgements = styled.div`
|
|
||||||
align-items: center;
|
|
||||||
color: ${(props: StyledProps) => (props.hasError ? 'var(--dnd-indicator)' : 'var(--online-indicator)')};
|
|
||||||
display: flex;
|
|
||||||
|
|
||||||
> span {
|
|
||||||
margin-left: 4px;
|
|
||||||
font-size: 11px;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
|
|
||||||
const Notifications = styled.div`
|
|
||||||
align-items: center;
|
|
||||||
color: var(--dnd-indicator);
|
|
||||||
display: flex;
|
|
||||||
|
|
||||||
> span {
|
|
||||||
margin-left: 4px;
|
|
||||||
font-size: 11px;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
|
|
||||||
const Close = styled.button`
|
|
||||||
align-items: center;
|
|
||||||
color: rgb(var(--center-channel-color));
|
|
||||||
display: flex;
|
|
||||||
font-size: 17px;
|
|
||||||
justify-content: center;
|
|
||||||
margin-top: -1px;
|
|
||||||
opacity: 0.73;
|
|
||||||
visibility: hidden;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
opacity: 0.73;
|
|
||||||
}
|
|
||||||
|
|
||||||
${Priority}:hover & {
|
|
||||||
visibility: visible;
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
|
|
||||||
const Error = styled.div`
|
|
||||||
color: var(--dnd-indicator);
|
|
||||||
font-size: 11px;
|
|
||||||
font-weight: 600;
|
|
||||||
`;
|
|
||||||
|
|
||||||
function PriorityLabels({
|
function PriorityLabels({
|
||||||
canRemove,
|
canRemove,
|
||||||
hasError,
|
hasError,
|
||||||
specialMentions,
|
specialMentions,
|
||||||
onRemove,
|
onRemove,
|
||||||
padding,
|
|
||||||
persistentNotifications,
|
persistentNotifications,
|
||||||
priority,
|
priority,
|
||||||
requestedAck,
|
requestedAck,
|
||||||
}: Props) {
|
}: Props) {
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Priority padding={padding}>
|
<div className='priorityLabelsContainer'>
|
||||||
{priority && (
|
{priority && (
|
||||||
<PriorityLabel
|
<PriorityLabel
|
||||||
size='xs'
|
size='xs'
|
||||||
@@ -105,29 +44,23 @@ function PriorityLabels({
|
|||||||
)}
|
)}
|
||||||
{persistentNotifications && (
|
{persistentNotifications && (
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id='post-priority-picker-persistent-notifications-tooltip'
|
|
||||||
placement='top'
|
|
||||||
title={intl.formatMessage({
|
title={intl.formatMessage({
|
||||||
id: 'post_priority.persistent_notifications.tooltip',
|
id: 'post_priority.persistent_notifications.tooltip',
|
||||||
defaultMessage: 'Persistent notifications will be sent',
|
defaultMessage: 'Persistent notifications will be sent',
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<Notifications>
|
<span className='icon icon-bell-ring-outline'/>
|
||||||
<BellRingOutlineIcon size={14}/>
|
|
||||||
</Notifications>
|
|
||||||
</WithTooltip>
|
</WithTooltip>
|
||||||
)}
|
)}
|
||||||
{requestedAck && (
|
{requestedAck && (
|
||||||
<Acknowledgements hasError={hasError}>
|
<div className={classNames('priorityLabelsAcknowledgements', {hasError})}>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id='post-priority-picker-ack-tooltip'
|
|
||||||
placement='top'
|
|
||||||
title={intl.formatMessage({
|
title={intl.formatMessage({
|
||||||
id: 'post_priority.request_acknowledgement.tooltip',
|
id: 'post_priority.request_acknowledgement.tooltip',
|
||||||
defaultMessage: 'Acknowledgement will be requested',
|
defaultMessage: 'Acknowledgement will be requested',
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<CheckCircleOutlineIcon size={14}/>
|
<span className='icon icon-check-circle-outline'/>
|
||||||
</WithTooltip>
|
</WithTooltip>
|
||||||
{!(priority) && (
|
{!(priority) && (
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
@@ -135,25 +68,22 @@ function PriorityLabels({
|
|||||||
defaultMessage={'Request acknowledgement'}
|
defaultMessage={'Request acknowledgement'}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</Acknowledgements>
|
</div>
|
||||||
)}
|
)}
|
||||||
{hasError && (
|
{hasError && (
|
||||||
<Error>
|
<div className='priorityLabelsError'>
|
||||||
{(specialMentions && Object.values(specialMentions).includes(true)) ? <HasSpecialMentions specialMentions={specialMentions}/> : <HasNoMentions/>}
|
{(specialMentions && Object.values(specialMentions).includes(true)) ? <HasSpecialMentions specialMentions={specialMentions}/> : <HasNoMentions/>}
|
||||||
</Error>
|
</div>
|
||||||
)}
|
)}
|
||||||
{canRemove && (
|
{canRemove && (
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id='post-priority-picker-tooltip'
|
|
||||||
placement='top'
|
|
||||||
title={intl.formatMessage({
|
title={intl.formatMessage({
|
||||||
id: 'post_priority.remove',
|
id: 'post_priority.remove',
|
||||||
defaultMessage: 'Remove {priority}',
|
defaultMessage: 'Remove {priority}',
|
||||||
}, {priority})}
|
}, {priority})}
|
||||||
>
|
>
|
||||||
<Close
|
<button
|
||||||
type='button'
|
className='priorityLabelsClose close'
|
||||||
className='close'
|
|
||||||
onClick={onRemove}
|
onClick={onRemove}
|
||||||
>
|
>
|
||||||
<span aria-hidden='true'>{'×'}</span>
|
<span aria-hidden='true'>{'×'}</span>
|
||||||
@@ -164,10 +94,10 @@ function PriorityLabels({
|
|||||||
values={{priority}}
|
values={{priority}}
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</Close>
|
</button>
|
||||||
</WithTooltip>
|
</WithTooltip>
|
||||||
)}
|
)}
|
||||||
</Priority>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
.priorityLabelsContainer {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 14px 16px 0;
|
||||||
|
gap: 6px;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
.priorityLabelsClose {
|
||||||
|
visibility: visible;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.priorityLabelsClose {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin-top: -1px;
|
||||||
|
color: rgb(var(--center-channel-color));
|
||||||
|
font-size: 17px;
|
||||||
|
opacity: 0.73;
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.icon {
|
||||||
|
font-size: 14px;
|
||||||
|
|
||||||
|
&.icon-bell-ring-outline {
|
||||||
|
color: var(--dnd-indicator);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.icon-check-circle-outline {
|
||||||
|
color: var(--online-indicator);
|
||||||
|
|
||||||
|
&.hasError {
|
||||||
|
color: var(--dnd-indicator);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.priorityLabelsError {
|
||||||
|
color: var(--dnd-indicator);
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -15,8 +15,8 @@ import {isSendOnCtrlEnter} from 'selectors/preferences';
|
|||||||
|
|
||||||
import {SendPostOptions} from 'components/advanced_text_editor/send_button/send_post_options';
|
import {SendPostOptions} from 'components/advanced_text_editor/send_button/send_post_options';
|
||||||
import WithTooltip from 'components/with_tooltip';
|
import WithTooltip from 'components/with_tooltip';
|
||||||
import type {ShortcutDefinition} from 'components/with_tooltip/shortcut';
|
import type {ShortcutDefinition} from 'components/with_tooltip/tooltip_shortcut';
|
||||||
import {ShortcutKeys} from 'components/with_tooltip/shortcut';
|
import {ShortcutKeys} from 'components/with_tooltip/tooltip_shortcut';
|
||||||
|
|
||||||
import './send_button.scss';
|
import './send_button.scss';
|
||||||
|
|
||||||
@@ -65,8 +65,6 @@ const SendButton = ({disabled, handleSubmit, channelId}: SendButtonProps) => {
|
|||||||
return (
|
return (
|
||||||
<div className={classNames('splitSendButton', {disabled, scheduledPost: isScheduledPostEnabled})}>
|
<div className={classNames('splitSendButton', {disabled, scheduledPost: isScheduledPostEnabled})}>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
placement='top'
|
|
||||||
id='send_post_now_tooltip'
|
|
||||||
title={formatMessage({id: 'create_post_button.option.send_now', defaultMessage: 'Send Now'})}
|
title={formatMessage({id: 'create_post_button.option.send_now', defaultMessage: 'Send Now'})}
|
||||||
shortcut={sendNowKeyboardShortcutDescriptor}
|
shortcut={sendNowKeyboardShortcutDescriptor}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
|
|||||||
@@ -63,13 +63,13 @@ export function SendPostOptions({disabled, onSelect, channelId}: Props) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Menu.Container
|
<Menu.Container
|
||||||
hideTooltipWhenDisabled={true}
|
|
||||||
menuButtonTooltip={{
|
menuButtonTooltip={{
|
||||||
id: 'send_post_option_schedule_post',
|
id: 'send_post_option_schedule_post',
|
||||||
text: formatMessage({
|
text: formatMessage({
|
||||||
id: 'create_post_button.option.schedule_message',
|
id: 'create_post_button.option.schedule_message',
|
||||||
defaultMessage: 'Schedule message',
|
defaultMessage: 'Schedule message',
|
||||||
}),
|
}),
|
||||||
|
disabled,
|
||||||
}}
|
}}
|
||||||
menuButton={{
|
menuButton={{
|
||||||
id: 'button_send_post_options',
|
id: 'button_send_post_options',
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ const ShowFormatting = (props: ShowFormatProps): JSX.Element => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id='PreviewInputTextButtonTooltip'
|
|
||||||
title={
|
title={
|
||||||
<KeyboardShortcutSequence
|
<KeyboardShortcutSequence
|
||||||
shortcut={KEYBOARD_SHORTCUTS.msgMarkdownPreview}
|
shortcut={KEYBOARD_SHORTCUTS.msgMarkdownPreview}
|
||||||
@@ -33,7 +32,6 @@ const ShowFormatting = (props: ShowFormatProps): JSX.Element => {
|
|||||||
isInsideTooltip={true}
|
isInsideTooltip={true}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
placement='left'
|
|
||||||
>
|
>
|
||||||
<IconContainer
|
<IconContainer
|
||||||
type='button'
|
type='button'
|
||||||
|
|||||||
@@ -41,9 +41,7 @@ const ToggleFormattingBar = (props: ToggleFormattingBarProps): JSX.Element => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id={active ? 'toggleFormattingBarButtonTooltip_active' : 'toggleFormattingBarButtonTooltip_inactive'}
|
|
||||||
title={title}
|
title={title}
|
||||||
placement={'top'}
|
|
||||||
>
|
>
|
||||||
<IconContainer
|
<IconContainer
|
||||||
type='button'
|
type='button'
|
||||||
|
|||||||
@@ -129,8 +129,6 @@ const useEmojiPicker = (
|
|||||||
topOffset={-7}
|
topOffset={-7}
|
||||||
/>
|
/>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id='upload-tooltip'
|
|
||||||
placement='top'
|
|
||||||
title={
|
title={
|
||||||
<KeyboardShortcutSequence
|
<KeyboardShortcutSequence
|
||||||
shortcut={KEYBOARD_SHORTCUTS.msgShowEmojiPicker}
|
shortcut={KEYBOARD_SHORTCUTS.msgShowEmojiPicker}
|
||||||
|
|||||||
@@ -122,9 +122,8 @@ const AlertBanner = ({
|
|||||||
</div>
|
</div>
|
||||||
{onDismiss && closeBtnTooltip && (
|
{onDismiss && closeBtnTooltip && (
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id={`alertBannerTooltip_${id}`}
|
|
||||||
title={closeBtnTooltip}
|
title={closeBtnTooltip}
|
||||||
placement='left'
|
isVertical={false}
|
||||||
>
|
>
|
||||||
{dismissButton}
|
{dismissButton}
|
||||||
</WithTooltip>
|
</WithTooltip>
|
||||||
|
|||||||
@@ -22,8 +22,6 @@ exports[`components/analytics/table_chart.tsx should match snapshot, loaded with
|
|||||||
>
|
>
|
||||||
<td>
|
<td>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="tip-table-entry-test1"
|
|
||||||
placement="top"
|
|
||||||
title="test-tip1"
|
title="test-tip1"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
@@ -42,8 +40,6 @@ exports[`components/analytics/table_chart.tsx should match snapshot, loaded with
|
|||||||
>
|
>
|
||||||
<td>
|
<td>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="tip-table-entry-test2"
|
|
||||||
placement="top"
|
|
||||||
title="test-tip2"
|
title="test-tip2"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
|
|||||||
@@ -17,10 +17,8 @@ const Title = () => {
|
|||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
return (
|
return (
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id='activated_user_title_tooltip'
|
|
||||||
title={defineMessage({id: 'analytics.team.totalUsers.title.tooltip.title', defaultMessage: 'Activated users on this server'})}
|
title={defineMessage({id: 'analytics.team.totalUsers.title.tooltip.title', defaultMessage: 'Activated users on this server'})}
|
||||||
hint={defineMessage({id: 'analytics.team.totalUsers.title.tooltip.hint', defaultMessage: 'Also called Registered Users'})}
|
hint={defineMessage({id: 'analytics.team.totalUsers.title.tooltip.hint', defaultMessage: 'Also called Registered Users'})}
|
||||||
placement='top'
|
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
<ExternalLink
|
<ExternalLink
|
||||||
|
|||||||
@@ -32,8 +32,6 @@ const TableChart = ({
|
|||||||
<tr key={'table-entry-' + item.name}>
|
<tr key={'table-entry-' + item.name}>
|
||||||
<td>
|
<td>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id={'tip-table-entry-' + item.name}
|
|
||||||
placement='top'
|
|
||||||
title={item.tip}
|
title={item.tip}
|
||||||
>
|
>
|
||||||
<span>{item.name}</span>
|
<span>{item.name}</span>
|
||||||
|
|||||||
@@ -44,8 +44,6 @@ type State = {
|
|||||||
isStringContainingUrl: boolean;
|
isStringContainingUrl: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const OVERLAY_ANNOUNCEMENT_HIDE_DELAY = 600;
|
|
||||||
|
|
||||||
export default class AnnouncementBar extends React.PureComponent<Props, State> {
|
export default class AnnouncementBar extends React.PureComponent<Props, State> {
|
||||||
messageRef: React.RefObject<HTMLDivElement>;
|
messageRef: React.RefObject<HTMLDivElement>;
|
||||||
constructor(props: Props) {
|
constructor(props: Props) {
|
||||||
@@ -196,10 +194,8 @@ export default class AnnouncementBar extends React.PureComponent<Props, State> {
|
|||||||
if (this.state.showTooltip) {
|
if (this.state.showTooltip) {
|
||||||
barContent = (
|
barContent = (
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id='announcement-bar__tooltip'
|
|
||||||
title={this.props.tooltipMsg ? this.props.tooltipMsg : message}
|
title={this.props.tooltipMsg ? this.props.tooltipMsg : message}
|
||||||
placement='bottom'
|
tooltipContentContainerClassName='announcementBarTooltip'
|
||||||
delayHide={this.state.isStringContainingUrl ? OVERLAY_ANNOUNCEMENT_HIDE_DELAY : 0}
|
|
||||||
>
|
>
|
||||||
{barContent}
|
{barContent}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#announcement-bar__tooltip {
|
.announcementBarTooltip {
|
||||||
width: 50%;
|
min-width: 50vw;
|
||||||
max-width: 100%;
|
max-width: 100vw;
|
||||||
pointer-events: auto;
|
pointer-events: auto;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,9 +84,8 @@ const AppBarBinding = (props: BindingComponentProps) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id={'tooltip-' + id}
|
|
||||||
title={label}
|
title={label}
|
||||||
placement='left'
|
isVertical={false}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
id={id}
|
id={id}
|
||||||
|
|||||||
@@ -32,9 +32,8 @@ const AppBarMarketplace = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id='tooltip-app-bar-marketplace'
|
|
||||||
title={label}
|
title={label}
|
||||||
placement='left'
|
isVertical={false}
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
key='app_bar_marketplace'
|
key='app_bar_marketplace'
|
||||||
|
|||||||
@@ -96,9 +96,8 @@ const AppBarPluginComponent = (props: PluginComponentProps) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id={'pluginTooltip-' + buttonId}
|
|
||||||
title={tooltipText}
|
title={tooltipText}
|
||||||
placement='left'
|
isVertical={false}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
id={buttonId}
|
id={buttonId}
|
||||||
|
|||||||
@@ -1664,8 +1664,6 @@ exports[`components/ChannelHeader should render correct menu when muted 1`] = `
|
|||||||
className="channel-header__icons"
|
className="channel-header__icons"
|
||||||
>
|
>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="channelMutedTooltip"
|
|
||||||
placement="bottom"
|
|
||||||
title={
|
title={
|
||||||
<Memo(MemoizedFormattedMessage)
|
<Memo(MemoizedFormattedMessage)
|
||||||
defaultMessage="Unmute"
|
defaultMessage="Unmute"
|
||||||
@@ -2498,13 +2496,11 @@ exports[`components/ChannelHeader should render properly when custom status is s
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
showTooltip={true}
|
showTooltip={true}
|
||||||
tooltipDirection="bottom"
|
|
||||||
userID="user_id"
|
userID="user_id"
|
||||||
/>
|
/>
|
||||||
<CustomStatusText
|
<CustomStatusText
|
||||||
className="custom-emoji__text"
|
className="custom-emoji__text"
|
||||||
text="In a meeting"
|
text="In a meeting"
|
||||||
tooltipDirection="bottom"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -239,7 +239,6 @@ class ChannelHeader extends React.PureComponent<Props, State> {
|
|||||||
<CustomStatusEmoji
|
<CustomStatusEmoji
|
||||||
userID={this.props.dmUser?.id}
|
userID={this.props.dmUser?.id}
|
||||||
showTooltip={true}
|
showTooltip={true}
|
||||||
tooltipDirection='bottom'
|
|
||||||
emojiStyle={{
|
emojiStyle={{
|
||||||
verticalAlign: 'top',
|
verticalAlign: 'top',
|
||||||
margin: '0 4px 1px',
|
margin: '0 4px 1px',
|
||||||
@@ -569,8 +568,6 @@ class ChannelHeader extends React.PureComponent<Props, State> {
|
|||||||
if (channelMuted) {
|
if (channelMuted) {
|
||||||
muteTrigger = (
|
muteTrigger = (
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id='channelMutedTooltip'
|
|
||||||
placement='bottom'
|
|
||||||
title={
|
title={
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='channelHeader.unmute'
|
id='channelHeader.unmute'
|
||||||
|
|||||||
@@ -138,8 +138,6 @@ const ChannelHeaderTitle = ({
|
|||||||
>
|
>
|
||||||
{showTooltip ? (
|
{showTooltip ? (
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id='channelHeaderTooltip'
|
|
||||||
placement='bottom'
|
|
||||||
title={channelTitle as string}
|
title={channelTitle as string}
|
||||||
>
|
>
|
||||||
<strong
|
<strong
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||||
// See LICENSE.txt for license information.
|
// See LICENSE.txt for license information.
|
||||||
|
|
||||||
import {screen, fireEvent, act} from '@testing-library/react';
|
import {screen, fireEvent, act, waitFor} from '@testing-library/react';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
import type {Channel} from '@mattermost/types/channels';
|
import type {Channel} from '@mattermost/types/channels';
|
||||||
@@ -189,10 +189,7 @@ describe('ChannelHeaderTitleFavorite Component', () => {
|
|||||||
expect(icon).toHaveClass('icon-star');
|
expect(icon).toHaveClass('icon-star');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should dispatch A11yFocusEvent after toggling favorite', () => {
|
it('should dispatch A11yFocusEvent after toggling favorite', async () => {
|
||||||
// Use fake timers to handle requestAnimationFrame
|
|
||||||
jest.useFakeTimers();
|
|
||||||
|
|
||||||
isCurrentChannelFavoriteMock.mockReturnValue(false);
|
isCurrentChannelFavoriteMock.mockReturnValue(false);
|
||||||
getCurrentChannelMock.mockReturnValue(activeChannel);
|
getCurrentChannelMock.mockReturnValue(activeChannel);
|
||||||
|
|
||||||
@@ -207,28 +204,36 @@ describe('ChannelHeaderTitleFavorite Component', () => {
|
|||||||
renderComponent();
|
renderComponent();
|
||||||
|
|
||||||
const button = screen.getByRole('button', {name: ADD_TO_FAVORITES_REGEX});
|
const button = screen.getByRole('button', {name: ADD_TO_FAVORITES_REGEX});
|
||||||
fireEvent.click(button);
|
|
||||||
|
// Ensure the ref is set by triggering a focus event
|
||||||
|
fireEvent.focus(button);
|
||||||
|
|
||||||
|
act(() => {
|
||||||
|
fireEvent.click(button);
|
||||||
|
});
|
||||||
|
|
||||||
expect(dispatchMock).toHaveBeenCalledWith({
|
expect(dispatchMock).toHaveBeenCalledWith({
|
||||||
type: 'FAVORITE_CHANNEL',
|
type: 'FAVORITE_CHANNEL',
|
||||||
data: activeChannel.id,
|
data: activeChannel.id,
|
||||||
});
|
});
|
||||||
|
|
||||||
// Execute the requestAnimationFrame callback
|
await waitFor(() => {
|
||||||
act(() => {
|
expect(dispatchEventSpy).toHaveBeenCalled();
|
||||||
jest.runAllTimers();
|
}, {
|
||||||
|
timeout: 1000, // Increase timeout
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(dispatchEventSpy).toHaveBeenCalled();
|
|
||||||
|
|
||||||
// Verify the details of the dispatched event
|
// Verify the details of the dispatched event
|
||||||
const event = dispatchEventSpy.mock.calls.find((call) => call[0].type === A11yCustomEventTypes.FOCUS)?.[0] as CustomEvent<A11yFocusEventDetail>;
|
const focusEvents = dispatchEventSpy.mock.calls.
|
||||||
expect(event).toBeDefined();
|
filter((call) => call[0].type === A11yCustomEventTypes.FOCUS).
|
||||||
|
map((call) => call[0] as CustomEvent<A11yFocusEventDetail>);
|
||||||
|
|
||||||
|
expect(focusEvents.length).toBeGreaterThan(0);
|
||||||
|
const event = focusEvents[focusEvents.length - 1];
|
||||||
expect(event.detail.target).toBe(button);
|
expect(event.detail.target).toBe(button);
|
||||||
expect(event.detail.keyboardOnly).toBe(false);
|
expect(event.detail.keyboardOnly).toBe(false);
|
||||||
|
|
||||||
|
// Cleanup
|
||||||
dispatchEventSpy.mockRestore();
|
dispatchEventSpy.mockRestore();
|
||||||
|
|
||||||
jest.useRealTimers();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -73,10 +73,7 @@ const ChannelHeaderTitleFavorite = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
key={`isFavorite-${isFavorite}`}
|
|
||||||
id='favoriteTooltip'
|
|
||||||
title={title}
|
title={title}
|
||||||
placement='bottom'
|
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
id='toggleFavorite'
|
id='toggleFavorite'
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import React from 'react';
|
|||||||
|
|
||||||
import NewChannelWithBoardTourTip from 'components/app_bar/new_channel_with_board_tour_tip';
|
import NewChannelWithBoardTourTip from 'components/app_bar/new_channel_with_board_tour_tip';
|
||||||
import WithTooltip from 'components/with_tooltip';
|
import WithTooltip from 'components/with_tooltip';
|
||||||
import type {ShortcutDefinition} from 'components/with_tooltip/shortcut';
|
import type {ShortcutDefinition} from 'components/with_tooltip/tooltip_shortcut';
|
||||||
|
|
||||||
import {suitePluginIds} from 'utils/constants';
|
import {suitePluginIds} from 'utils/constants';
|
||||||
|
|
||||||
@@ -47,8 +47,6 @@ const HeaderIconWrapper = (props: Props) => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id={buttonId + '-tooltip'}
|
|
||||||
placement='bottom'
|
|
||||||
title={isRhsOpen ? '' : tooltipText}
|
title={isRhsOpen ? '' : tooltipText}
|
||||||
shortcut={tooltipShortcut}
|
shortcut={tooltipShortcut}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -59,8 +59,6 @@ const Header = ({channel, isArchived, isMobile, onClose}: Props) => {
|
|||||||
</span>
|
</span>
|
||||||
|
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id='closeSidebarTooltip'
|
|
||||||
placement='top'
|
|
||||||
title={
|
title={
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='rhs_header.closeSidebarTooltip'
|
id='rhs_header.closeSidebarTooltip'
|
||||||
|
|||||||
@@ -124,8 +124,6 @@ export default function TopButtons({
|
|||||||
return (
|
return (
|
||||||
<ChannelInfoRhsTopButtons>
|
<ChannelInfoRhsTopButtons>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
placement='top'
|
|
||||||
id='favorite-tooltip'
|
|
||||||
title={
|
title={
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='channel_info_rhs.top_buttons.favorite.tooltip'
|
id='channel_info_rhs.top_buttons.favorite.tooltip'
|
||||||
@@ -144,8 +142,6 @@ export default function TopButtons({
|
|||||||
</Button>
|
</Button>
|
||||||
</WithTooltip>
|
</WithTooltip>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
placement='top'
|
|
||||||
id='mute-tooltip'
|
|
||||||
title={
|
title={
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='channel_info_rhs.top_buttons.mute.tooltip'
|
id='channel_info_rhs.top_buttons.mute.tooltip'
|
||||||
@@ -165,8 +161,6 @@ export default function TopButtons({
|
|||||||
</WithTooltip>
|
</WithTooltip>
|
||||||
{canAddPeople && (
|
{canAddPeople && (
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id='add-people-tooltip'
|
|
||||||
placement='top'
|
|
||||||
title={
|
title={
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='channel_info_rhs.top_buttons.add_people.tooltip'
|
id='channel_info_rhs.top_buttons.add_people.tooltip'
|
||||||
@@ -192,8 +186,6 @@ export default function TopButtons({
|
|||||||
)}
|
)}
|
||||||
{canCopyLink && (
|
{canCopyLink && (
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id='copy-link-tooltip'
|
|
||||||
placement='top'
|
|
||||||
title={
|
title={
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='channel_info_rhs.top_buttons.copy_link.tooltip'
|
id='channel_info_rhs.top_buttons.copy_link.tooltip'
|
||||||
|
|||||||
@@ -104,9 +104,7 @@ const GroupOption = (props: Props) => {
|
|||||||
{'@'}{group.name}
|
{'@'}{group.name}
|
||||||
</span>
|
</span>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id={'usernames-overflow'}
|
|
||||||
title={overflowNames}
|
title={overflowNames}
|
||||||
placement={'top'}
|
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
className='add-group-members'
|
className='add-group-members'
|
||||||
|
|||||||
@@ -460,8 +460,6 @@ exports[`components/channel_invite_modal/team_warning_banner should match snapsh
|
|||||||
/>,
|
/>,
|
||||||
" and ",
|
" and ",
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="usernames-overflow"
|
|
||||||
placement="top"
|
|
||||||
title="@user-1, @user-2, @user-3, @user-4, @user-5, @user-6, @user-7, @user-8, @user-9, @user-10"
|
title="@user-1, @user-2, @user-3, @user-4, @user-5, @user-6, @user-7, @user-8, @user-9, @user-10"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
@@ -562,102 +560,33 @@ exports[`components/channel_invite_modal/team_warning_banner should match snapsh
|
|||||||
</Connect(Component)>
|
</Connect(Component)>
|
||||||
and
|
and
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="usernames-overflow"
|
|
||||||
key=".2"
|
key=".2"
|
||||||
placement="top"
|
|
||||||
title="@user-1, @user-2, @user-3, @user-4, @user-5, @user-6, @user-7, @user-8, @user-9, @user-10"
|
title="@user-1, @user-2, @user-3, @user-4, @user-5, @user-6, @user-7, @user-8, @user-9, @user-10"
|
||||||
>
|
>
|
||||||
<OverlayTrigger
|
<span
|
||||||
defaultOverlayShown={false}
|
className="add-others-link"
|
||||||
delay={400}
|
onBlur={[Function]}
|
||||||
disabled={false}
|
onFocus={[Function]}
|
||||||
overlay={<Unknown />}
|
onKeyDown={[Function]}
|
||||||
placement="top"
|
onMouseLeave={[Function]}
|
||||||
trigger={
|
onMouseMove={[Function]}
|
||||||
Array [
|
onPointerDown={[Function]}
|
||||||
"hover",
|
onPointerEnter={[Function]}
|
||||||
"focus",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
<OverlayTrigger
|
<FormattedMessage
|
||||||
defaultOverlayShown={false}
|
defaultMessage="{count} others"
|
||||||
delay={400}
|
id="channel_invite.invite_team_members.messageOthers"
|
||||||
overlay={
|
values={
|
||||||
<OverlayWrapper
|
Object {
|
||||||
intl={
|
"count": 10,
|
||||||
Object {
|
}
|
||||||
"$t": [Function],
|
|
||||||
"defaultFormats": Object {},
|
|
||||||
"defaultLocale": "en",
|
|
||||||
"defaultRichTextElements": undefined,
|
|
||||||
"fallbackOnEmptyString": true,
|
|
||||||
"formatDate": [Function],
|
|
||||||
"formatDateTimeRange": [Function],
|
|
||||||
"formatDateToParts": [Function],
|
|
||||||
"formatDisplayName": [Function],
|
|
||||||
"formatList": [Function],
|
|
||||||
"formatListToParts": [Function],
|
|
||||||
"formatMessage": [Function],
|
|
||||||
"formatNumber": [Function],
|
|
||||||
"formatNumberToParts": [Function],
|
|
||||||
"formatPlural": [Function],
|
|
||||||
"formatRelativeTime": [Function],
|
|
||||||
"formatTime": [Function],
|
|
||||||
"formatTimeToParts": [Function],
|
|
||||||
"formats": Object {},
|
|
||||||
"formatters": Object {
|
|
||||||
"getDateTimeFormat": [Function],
|
|
||||||
"getDisplayNames": [Function],
|
|
||||||
"getListFormat": [Function],
|
|
||||||
"getMessageFormat": [Function],
|
|
||||||
"getNumberFormat": [Function],
|
|
||||||
"getPluralRules": [Function],
|
|
||||||
"getRelativeTimeFormat": [Function],
|
|
||||||
},
|
|
||||||
"locale": "en",
|
|
||||||
"messages": Object {},
|
|
||||||
"onError": [Function],
|
|
||||||
"onWarn": [Function],
|
|
||||||
"textComponent": "span",
|
|
||||||
"timeZone": "Etc/UTC",
|
|
||||||
"wrapRichTextChunksInFragment": undefined,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
placement="top"
|
|
||||||
trigger={
|
|
||||||
Array [
|
|
||||||
"hover",
|
|
||||||
"focus",
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<span
|
<span>
|
||||||
className="add-others-link"
|
10 others
|
||||||
onBlur={[Function]}
|
|
||||||
onClick={null}
|
|
||||||
onFocus={[Function]}
|
|
||||||
onMouseOut={[Function]}
|
|
||||||
onMouseOver={[Function]}
|
|
||||||
>
|
|
||||||
<FormattedMessage
|
|
||||||
defaultMessage="{count} others"
|
|
||||||
id="channel_invite.invite_team_members.messageOthers"
|
|
||||||
values={
|
|
||||||
Object {
|
|
||||||
"count": 10,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<span>
|
|
||||||
10 others
|
|
||||||
</span>
|
|
||||||
</FormattedMessage>
|
|
||||||
</span>
|
</span>
|
||||||
</OverlayTrigger>
|
</FormattedMessage>
|
||||||
</OverlayTrigger>
|
</span>
|
||||||
</WithTooltip>
|
</WithTooltip>
|
||||||
are guest users and need to first be invited to the team before you can add them to the channel. Once they've joined the team, you can add them to this channel.
|
are guest users and need to first be invited to the team before you can add them to the channel. Once they've joined the team, you can add them to this channel.
|
||||||
</div>
|
</div>
|
||||||
@@ -777,8 +706,6 @@ exports[`components/channel_invite_modal/team_warning_banner should match snapsh
|
|||||||
/>,
|
/>,
|
||||||
" and ",
|
" and ",
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="usernames-overflow"
|
|
||||||
placement="top"
|
|
||||||
title="@user-1, @user-2, @user-3, @user-4, @user-5, @user-6, @user-7, @user-8, @user-9, @user-10"
|
title="@user-1, @user-2, @user-3, @user-4, @user-5, @user-6, @user-7, @user-8, @user-9, @user-10"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
@@ -882,102 +809,33 @@ exports[`components/channel_invite_modal/team_warning_banner should match snapsh
|
|||||||
</Connect(Component)>
|
</Connect(Component)>
|
||||||
and
|
and
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="usernames-overflow"
|
|
||||||
key=".3"
|
key=".3"
|
||||||
placement="top"
|
|
||||||
title="@user-1, @user-2, @user-3, @user-4, @user-5, @user-6, @user-7, @user-8, @user-9, @user-10"
|
title="@user-1, @user-2, @user-3, @user-4, @user-5, @user-6, @user-7, @user-8, @user-9, @user-10"
|
||||||
>
|
>
|
||||||
<OverlayTrigger
|
<span
|
||||||
defaultOverlayShown={false}
|
className="add-others-link"
|
||||||
delay={400}
|
onBlur={[Function]}
|
||||||
disabled={false}
|
onFocus={[Function]}
|
||||||
overlay={<Unknown />}
|
onKeyDown={[Function]}
|
||||||
placement="top"
|
onMouseLeave={[Function]}
|
||||||
trigger={
|
onMouseMove={[Function]}
|
||||||
Array [
|
onPointerDown={[Function]}
|
||||||
"hover",
|
onPointerEnter={[Function]}
|
||||||
"focus",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
<OverlayTrigger
|
<FormattedMessage
|
||||||
defaultOverlayShown={false}
|
defaultMessage="{count} others"
|
||||||
delay={400}
|
id="channel_invite.invite_team_members.messageOthers"
|
||||||
overlay={
|
values={
|
||||||
<OverlayWrapper
|
Object {
|
||||||
intl={
|
"count": 10,
|
||||||
Object {
|
}
|
||||||
"$t": [Function],
|
|
||||||
"defaultFormats": Object {},
|
|
||||||
"defaultLocale": "en",
|
|
||||||
"defaultRichTextElements": undefined,
|
|
||||||
"fallbackOnEmptyString": true,
|
|
||||||
"formatDate": [Function],
|
|
||||||
"formatDateTimeRange": [Function],
|
|
||||||
"formatDateToParts": [Function],
|
|
||||||
"formatDisplayName": [Function],
|
|
||||||
"formatList": [Function],
|
|
||||||
"formatListToParts": [Function],
|
|
||||||
"formatMessage": [Function],
|
|
||||||
"formatNumber": [Function],
|
|
||||||
"formatNumberToParts": [Function],
|
|
||||||
"formatPlural": [Function],
|
|
||||||
"formatRelativeTime": [Function],
|
|
||||||
"formatTime": [Function],
|
|
||||||
"formatTimeToParts": [Function],
|
|
||||||
"formats": Object {},
|
|
||||||
"formatters": Object {
|
|
||||||
"getDateTimeFormat": [Function],
|
|
||||||
"getDisplayNames": [Function],
|
|
||||||
"getListFormat": [Function],
|
|
||||||
"getMessageFormat": [Function],
|
|
||||||
"getNumberFormat": [Function],
|
|
||||||
"getPluralRules": [Function],
|
|
||||||
"getRelativeTimeFormat": [Function],
|
|
||||||
},
|
|
||||||
"locale": "en",
|
|
||||||
"messages": Object {},
|
|
||||||
"onError": [Function],
|
|
||||||
"onWarn": [Function],
|
|
||||||
"textComponent": "span",
|
|
||||||
"timeZone": "Etc/UTC",
|
|
||||||
"wrapRichTextChunksInFragment": undefined,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
placement="top"
|
|
||||||
trigger={
|
|
||||||
Array [
|
|
||||||
"hover",
|
|
||||||
"focus",
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<span
|
<span>
|
||||||
className="add-others-link"
|
10 others
|
||||||
onBlur={[Function]}
|
|
||||||
onClick={null}
|
|
||||||
onFocus={[Function]}
|
|
||||||
onMouseOut={[Function]}
|
|
||||||
onMouseOver={[Function]}
|
|
||||||
>
|
|
||||||
<FormattedMessage
|
|
||||||
defaultMessage="{count} others"
|
|
||||||
id="channel_invite.invite_team_members.messageOthers"
|
|
||||||
values={
|
|
||||||
Object {
|
|
||||||
"count": 10,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<span>
|
|
||||||
10 others
|
|
||||||
</span>
|
|
||||||
</FormattedMessage>
|
|
||||||
</span>
|
</span>
|
||||||
</OverlayTrigger>
|
</FormattedMessage>
|
||||||
</OverlayTrigger>
|
</span>
|
||||||
</WithTooltip>
|
</WithTooltip>
|
||||||
to this channel once they are members of the
|
to this channel once they are members of the
|
||||||
<strong
|
<strong
|
||||||
|
|||||||
@@ -63,9 +63,7 @@ const TeamWarningBanner = (props: Props) => {
|
|||||||
),
|
),
|
||||||
others: (
|
others: (
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id='usernames-overflow'
|
|
||||||
title={commaSeparatedUsernames.replace(`@${firstName}, `, '')}
|
title={commaSeparatedUsernames.replace(`@${firstName}, `, '')}
|
||||||
placement='top'
|
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
className='add-others-link'
|
className='add-others-link'
|
||||||
@@ -134,9 +132,7 @@ const TeamWarningBanner = (props: Props) => {
|
|||||||
),
|
),
|
||||||
others: (
|
others: (
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id='usernames-overflow'
|
|
||||||
title={commaSeparatedUsernames.replace(`@${firstName}, `, '')}
|
title={commaSeparatedUsernames.replace(`@${firstName}, `, '')}
|
||||||
placement='top'
|
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
className='add-others-link'
|
className='add-others-link'
|
||||||
|
|||||||
@@ -57,8 +57,6 @@ const Header = ({channel, canGoBack, onClose, goBack}: Props) => {
|
|||||||
</span>
|
</span>
|
||||||
|
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id='closeSidebarTooltip'
|
|
||||||
placement='top'
|
|
||||||
title={
|
title={
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='rhs_header.closeSidebarTooltip'
|
id='rhs_header.closeSidebarTooltip'
|
||||||
|
|||||||
@@ -198,12 +198,10 @@ const Member = ({className, channel, member, index, totalUsers, editing, actions
|
|||||||
</RoleChooser>
|
</RoleChooser>
|
||||||
{!editing && (
|
{!editing && (
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id={`member-tooltip-${member.user.id}`}
|
|
||||||
title={formatMessage({
|
title={formatMessage({
|
||||||
id: 'channel_members_rhs.member.send_message',
|
id: 'channel_members_rhs.member.send_message',
|
||||||
defaultMessage: 'Send message',
|
defaultMessage: 'Send message',
|
||||||
})}
|
})}
|
||||||
placement='left'
|
|
||||||
>
|
>
|
||||||
<SendMessage onClick={() => actions.openDirectMessage(member.user)}>
|
<SendMessage onClick={() => actions.openDirectMessage(member.user)}>
|
||||||
<i className='icon icon-send'/>
|
<i className='icon icon-send'/>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import React from 'react';
|
|||||||
import {useIntl} from 'react-intl';
|
import {useIntl} from 'react-intl';
|
||||||
|
|
||||||
import ReplyIcon from 'components/widgets/icons/reply_icon';
|
import ReplyIcon from 'components/widgets/icons/reply_icon';
|
||||||
import WithTooltip from 'components/with_tooltip/with_tooltip_new';
|
import WithTooltip from 'components/with_tooltip';
|
||||||
|
|
||||||
import type {Locations} from 'utils/constants';
|
import type {Locations} from 'utils/constants';
|
||||||
|
|
||||||
|
|||||||
@@ -46,8 +46,6 @@ const MultiSelectCard = (props: Props) => {
|
|||||||
if (props.tooltip) {
|
if (props.tooltip) {
|
||||||
button = (
|
button = (
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id={props.id}
|
|
||||||
placement='top'
|
|
||||||
title={props.tooltip}
|
title={props.tooltip}
|
||||||
>
|
>
|
||||||
{button}
|
{button}
|
||||||
|
|||||||
@@ -5,14 +5,13 @@ import classNames from 'classnames';
|
|||||||
import React, {useRef, useState} from 'react';
|
import React, {useRef, useState} from 'react';
|
||||||
import {FormattedMessage, defineMessages, useIntl} from 'react-intl';
|
import {FormattedMessage, defineMessages, useIntl} from 'react-intl';
|
||||||
|
|
||||||
import {copyToClipboard} from 'utils/utils';
|
import WithTooltip from 'components/with_tooltip';
|
||||||
|
|
||||||
import WithTooltip from './with_tooltip';
|
import {copyToClipboard} from 'utils/utils';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
content: string;
|
content: string;
|
||||||
isForText?: boolean;
|
isForText?: boolean;
|
||||||
placement?: string;
|
|
||||||
className?: string;
|
className?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -54,8 +53,6 @@ const CopyButton: React.FC<Props> = (props: Props) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id='copyButton.text'
|
|
||||||
placement={props.placement ?? 'top'}
|
|
||||||
title={tooltipText}
|
title={tooltipText}
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
|
|||||||
@@ -30,11 +30,7 @@ const CopyText = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<WithTooltip
|
<WithTooltip title={label}>
|
||||||
id='copyTextTooltip'
|
|
||||||
placement='top'
|
|
||||||
title={label}
|
|
||||||
>
|
|
||||||
<button
|
<button
|
||||||
data-testid='copyText'
|
data-testid='copyText'
|
||||||
className='btn btn-link fa fa-copy ml-2'
|
className='btn btn-link fa fa-copy ml-2'
|
||||||
|
|||||||
@@ -28,8 +28,6 @@ exports[`/components/create_team/components/display_name should match snapshot 1
|
|||||||
className="input-group input-group--limit"
|
className="input-group input-group--limit"
|
||||||
>
|
>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="urlTooltip"
|
|
||||||
placement="top"
|
|
||||||
title="http://localhost:8065/"
|
title="http://localhost:8065/"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
|
|||||||
@@ -233,9 +233,7 @@ export default class TeamUrl extends React.PureComponent<Props, State> {
|
|||||||
<div className='col-sm-11'>
|
<div className='col-sm-11'>
|
||||||
<div className='input-group input-group--limit'>
|
<div className='input-group input-group--limit'>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id='urlTooltip'
|
|
||||||
title={title}
|
title={title}
|
||||||
placement={'top'}
|
|
||||||
>
|
>
|
||||||
<span className='input-group-addon'>
|
<span className='input-group-addon'>
|
||||||
{title}
|
{title}
|
||||||
|
|||||||
@@ -6,6 +6,5 @@ exports[`components/custom_status/custom_status_emoji should match snapshot with
|
|||||||
<CustomStatusEmoji
|
<CustomStatusEmoji
|
||||||
emojiSize={34}
|
emojiSize={34}
|
||||||
showTooltip={true}
|
showTooltip={true}
|
||||||
tooltipDirection="bottom"
|
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ exports[`components/custom_status/custom_status_emoji should match snapshot 1`]
|
|||||||
<CustomStatusText
|
<CustomStatusText
|
||||||
className="statusSuggestion__text"
|
className="statusSuggestion__text"
|
||||||
text=""
|
text=""
|
||||||
tooltipDirection="top"
|
|
||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
`;
|
`;
|
||||||
@@ -43,7 +42,6 @@ exports[`components/custom_status/custom_status_emoji should match snapshot with
|
|||||||
<CustomStatusText
|
<CustomStatusText
|
||||||
className="statusSuggestion__text with_duration"
|
className="statusSuggestion__text with_duration"
|
||||||
text=""
|
text=""
|
||||||
tooltipDirection="top"
|
|
||||||
/>
|
/>
|
||||||
<span
|
<span
|
||||||
className="statusSuggestion__duration"
|
className="statusSuggestion__duration"
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ exports[`components/custom_status/custom_status_text should match snapshot 1`] =
|
|||||||
<CustomStatusText
|
<CustomStatusText
|
||||||
className=""
|
className=""
|
||||||
text=""
|
text=""
|
||||||
tooltipDirection="bottom"
|
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@@ -12,6 +11,5 @@ exports[`components/custom_status/custom_status_text should match snapshot with
|
|||||||
<CustomStatusText
|
<CustomStatusText
|
||||||
className=""
|
className=""
|
||||||
text="In a meeting"
|
text="In a meeting"
|
||||||
tooltipDirection="top"
|
|
||||||
/>
|
/>
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ describe('components/custom_status/custom_status_emoji', () => {
|
|||||||
<CustomStatusEmoji
|
<CustomStatusEmoji
|
||||||
emojiSize={34}
|
emojiSize={34}
|
||||||
showTooltip={true}
|
showTooltip={true}
|
||||||
tooltipDirection='bottom'
|
|
||||||
/>,
|
/>,
|
||||||
{wrappingComponent: Provider, wrappingComponentProps: {store}},
|
{wrappingComponent: Provider, wrappingComponentProps: {store}},
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||||
// See LICENSE.txt for license information.
|
// See LICENSE.txt for license information.
|
||||||
|
|
||||||
import React, {memo, useEffect, useMemo, useRef, useState} from 'react';
|
import React, {memo, useMemo, useRef} from 'react';
|
||||||
import {useSelector} from 'react-redux';
|
import {useSelector} from 'react-redux';
|
||||||
|
|
||||||
import {CustomStatusDuration} from '@mattermost/types/users';
|
import {CustomStatusDuration} from '@mattermost/types/users';
|
||||||
@@ -20,7 +20,6 @@ import ExpiryTime from './expiry_time';
|
|||||||
interface Props {
|
interface Props {
|
||||||
emojiSize?: number;
|
emojiSize?: number;
|
||||||
showTooltip?: boolean;
|
showTooltip?: boolean;
|
||||||
tooltipDirection?: 'top' | 'right' | 'bottom' | 'left';
|
|
||||||
spanStyle?: React.CSSProperties;
|
spanStyle?: React.CSSProperties;
|
||||||
emojiStyle?: React.CSSProperties;
|
emojiStyle?: React.CSSProperties;
|
||||||
userID?: string;
|
userID?: string;
|
||||||
@@ -46,36 +45,8 @@ function CustomStatusEmoji({
|
|||||||
const customStatusExpired = useSelector((state: GlobalState) => isCustomStatusExpired(state, customStatus));
|
const customStatusExpired = useSelector((state: GlobalState) => isCustomStatusExpired(state, customStatus));
|
||||||
const customStatusEnabled = useSelector(isCustomStatusEnabled);
|
const customStatusEnabled = useSelector(isCustomStatusEnabled);
|
||||||
|
|
||||||
const [placement, setPlacement] = useState('bottom');
|
|
||||||
const emojiRef = useRef<HTMLSpanElement>(null);
|
const emojiRef = useRef<HTMLSpanElement>(null);
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
function handleMouseEnter() {
|
|
||||||
if (emojiRef.current) {
|
|
||||||
const boundingRect = emojiRef.current.getBoundingClientRect();
|
|
||||||
const windowHeight = window.innerHeight;
|
|
||||||
const threshold = windowHeight * 0.8;
|
|
||||||
|
|
||||||
if (boundingRect.bottom >= threshold) {
|
|
||||||
setPlacement('top');
|
|
||||||
} else {
|
|
||||||
setPlacement('bottom');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const emojiElement = emojiRef.current;
|
|
||||||
if (emojiElement) {
|
|
||||||
emojiElement.addEventListener('mouseenter', handleMouseEnter);
|
|
||||||
}
|
|
||||||
|
|
||||||
return () => {
|
|
||||||
if (emojiElement) {
|
|
||||||
emojiElement.removeEventListener('mouseenter', handleMouseEnter);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
if (!customStatusEnabled || !customStatus?.emoji || customStatusExpired) {
|
if (!customStatusEnabled || !customStatus?.emoji || customStatusExpired) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -95,7 +66,6 @@ function CustomStatusEmoji({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id='custom-status-tooltip'
|
|
||||||
title={
|
title={
|
||||||
<>
|
<>
|
||||||
<div className='custom-status'>
|
<div className='custom-status'>
|
||||||
@@ -120,8 +90,7 @@ function CustomStatusEmoji({
|
|||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
emoji={customStatus.emoji}
|
emoji={customStatus.emoji}
|
||||||
emojiStyle='large'
|
isEmojiLarge={true}
|
||||||
placement={placement}
|
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
ref={emojiRef}
|
ref={emojiRef}
|
||||||
|
|||||||
@@ -462,7 +462,6 @@ const CustomStatusModal: React.FC<Props> = (props: Props) => {
|
|||||||
onClear={clearHandle}
|
onClear={clearHandle}
|
||||||
className='emoji-quick-input form-control'
|
className='emoji-quick-input form-control'
|
||||||
clearClassName='StatusModal__clear-container'
|
clearClassName='StatusModal__clear-container'
|
||||||
tooltipPosition='top'
|
|
||||||
onChange={handleTextChange}
|
onChange={handleTextChange}
|
||||||
placeholder={formatMessage({id: 'custom_status.set_status', defaultMessage: 'Set a status'})}
|
placeholder={formatMessage({id: 'custom_status.set_status', defaultMessage: 'Set a status'})}
|
||||||
autoFocus={true}
|
autoFocus={true}
|
||||||
|
|||||||
@@ -43,14 +43,12 @@ const CustomStatusSuggestion: React.FC<Props> = (props: Props) => {
|
|||||||
const clearButton = handleClear ? (
|
const clearButton = handleClear ? (
|
||||||
<div className='suggestion-clear'>
|
<div className='suggestion-clear'>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
placement='top'
|
|
||||||
title={
|
title={
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='custom_status.suggestions.clear'
|
id='custom_status.suggestions.clear'
|
||||||
defaultMessage='Clear'
|
defaultMessage='Clear'
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
id='clear-recent-custom-status'
|
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
className='style--none input-clear-x'
|
className='style--none input-clear-x'
|
||||||
@@ -78,7 +76,6 @@ const CustomStatusSuggestion: React.FC<Props> = (props: Props) => {
|
|||||||
</div>
|
</div>
|
||||||
<CustomStatusText
|
<CustomStatusText
|
||||||
text={text}
|
text={text}
|
||||||
tooltipDirection='top'
|
|
||||||
className={classNames('statusSuggestion__text', {
|
className={classNames('statusSuggestion__text', {
|
||||||
with_duration: duration,
|
with_duration: duration,
|
||||||
})}
|
})}
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ describe('components/custom_status/custom_status_text', () => {
|
|||||||
it('should match snapshot with props', () => {
|
it('should match snapshot with props', () => {
|
||||||
const wrapper = mount(
|
const wrapper = mount(
|
||||||
<CustomStatusText
|
<CustomStatusText
|
||||||
tooltipDirection='top'
|
|
||||||
text='In a meeting'
|
text='In a meeting'
|
||||||
/>,
|
/>,
|
||||||
{wrappingComponent: Provider, wrappingComponentProps: {store}},
|
{wrappingComponent: Provider, wrappingComponentProps: {store}},
|
||||||
|
|||||||
@@ -11,13 +11,12 @@ import WithTooltip from 'components/with_tooltip';
|
|||||||
import type {GlobalState} from 'types/store';
|
import type {GlobalState} from 'types/store';
|
||||||
|
|
||||||
interface ComponentProps {
|
interface ComponentProps {
|
||||||
tooltipDirection?: 'top' | 'right' | 'bottom' | 'left';
|
|
||||||
text: string;
|
text: string;
|
||||||
className?: string;
|
className?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const CustomStatusText = (props: ComponentProps) => {
|
const CustomStatusText = (props: ComponentProps) => {
|
||||||
const {tooltipDirection, text, className} = props;
|
const {text, className} = props;
|
||||||
const customStatusEnabled = useSelector((state: GlobalState) => {
|
const customStatusEnabled = useSelector((state: GlobalState) => {
|
||||||
return isCustomStatusEnabled(state);
|
return isCustomStatusEnabled(state);
|
||||||
});
|
});
|
||||||
@@ -49,8 +48,6 @@ const CustomStatusText = (props: ComponentProps) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id='custom-status-tooltip'
|
|
||||||
placement={tooltipDirection}
|
|
||||||
title={text}
|
title={text}
|
||||||
>
|
>
|
||||||
{customStatusTextComponent}
|
{customStatusTextComponent}
|
||||||
@@ -59,7 +56,6 @@ const CustomStatusText = (props: ComponentProps) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
CustomStatusText.defaultProps = {
|
CustomStatusText.defaultProps = {
|
||||||
tooltipDirection: 'bottom',
|
|
||||||
text: '',
|
text: '',
|
||||||
className: '',
|
className: '',
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ exports[`components/drafts/draft_actions/action should match snapshot 1`] = `
|
|||||||
className="DraftAction"
|
className="DraftAction"
|
||||||
>
|
>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="drafts_action_tooltip_"
|
|
||||||
placement="top"
|
|
||||||
title=""
|
title=""
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
|
|||||||
@@ -26,8 +26,6 @@ function Action({
|
|||||||
return (
|
return (
|
||||||
<div className='DraftAction'>
|
<div className='DraftAction'>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id={`drafts_action_tooltip_${id}`}
|
|
||||||
placement='top'
|
|
||||||
title={tooltipText}
|
title={tooltipText}
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
|
|||||||
@@ -138,8 +138,6 @@ function DraftsLink() {
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
placement='right'
|
|
||||||
id='draft-scheduled-post-tooltip'
|
|
||||||
title={tooltipText}
|
title={tooltipText}
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ exports[`components/drafts/panel/panel_body should have called handleFormattedTe
|
|||||||
<span
|
<span
|
||||||
className="profile-icon "
|
className="profile-icon "
|
||||||
>
|
>
|
||||||
<Memo(Avatar)
|
<Avatar
|
||||||
size="md"
|
size="md"
|
||||||
url="/api/v4/users/user_id/image?_=0"
|
url="/api/v4/users/user_id/image?_=0"
|
||||||
username="username"
|
username="username"
|
||||||
@@ -76,7 +76,7 @@ exports[`components/drafts/panel/panel_body should have called handleFormattedTe
|
|||||||
onError={[Function]}
|
onError={[Function]}
|
||||||
src="/api/v4/users/user_id/image?_=0"
|
src="/api/v4/users/user_id/image?_=0"
|
||||||
/>
|
/>
|
||||||
</Memo(Avatar)>
|
</Avatar>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</RoundButton>
|
</RoundButton>
|
||||||
@@ -290,7 +290,7 @@ exports[`components/drafts/panel/panel_body should match snapshot 1`] = `
|
|||||||
<span
|
<span
|
||||||
className="profile-icon "
|
className="profile-icon "
|
||||||
>
|
>
|
||||||
<Memo(Avatar)
|
<Avatar
|
||||||
size="md"
|
size="md"
|
||||||
url="/api/v4/users/user_id/image?_=0"
|
url="/api/v4/users/user_id/image?_=0"
|
||||||
username="username"
|
username="username"
|
||||||
@@ -302,7 +302,7 @@ exports[`components/drafts/panel/panel_body should match snapshot 1`] = `
|
|||||||
onError={[Function]}
|
onError={[Function]}
|
||||||
src="/api/v4/users/user_id/image?_=0"
|
src="/api/v4/users/user_id/image?_=0"
|
||||||
/>
|
/>
|
||||||
</Memo(Avatar)>
|
</Avatar>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</RoundButton>
|
</RoundButton>
|
||||||
@@ -522,7 +522,7 @@ exports[`components/drafts/panel/panel_body should match snapshot for priority 1
|
|||||||
<span
|
<span
|
||||||
className="profile-icon "
|
className="profile-icon "
|
||||||
>
|
>
|
||||||
<Memo(Avatar)
|
<Avatar
|
||||||
size="md"
|
size="md"
|
||||||
url="/api/v4/users/user_id/image?_=0"
|
url="/api/v4/users/user_id/image?_=0"
|
||||||
username="username"
|
username="username"
|
||||||
@@ -534,7 +534,7 @@ exports[`components/drafts/panel/panel_body should match snapshot for priority 1
|
|||||||
onError={[Function]}
|
onError={[Function]}
|
||||||
src="/api/v4/users/user_id/image?_=0"
|
src="/api/v4/users/user_id/image?_=0"
|
||||||
/>
|
/>
|
||||||
</Memo(Avatar)>
|
</Avatar>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</RoundButton>
|
</RoundButton>
|
||||||
@@ -614,64 +614,59 @@ exports[`components/drafts/panel/panel_body should match snapshot for priority 1
|
|||||||
<Memo(PriorityLabels)
|
<Memo(PriorityLabels)
|
||||||
canRemove={false}
|
canRemove={false}
|
||||||
hasError={false}
|
hasError={false}
|
||||||
padding="0 0 0 8px"
|
|
||||||
priority="important"
|
priority="important"
|
||||||
requestedAck={false}
|
requestedAck={false}
|
||||||
>
|
>
|
||||||
<Priority
|
<div
|
||||||
padding="0 0 0 8px"
|
className="priorityLabelsContainer"
|
||||||
>
|
>
|
||||||
<div
|
<PriorityLabel
|
||||||
className="Priority-unHRQ dkJcdD"
|
priority="important"
|
||||||
|
size="xs"
|
||||||
>
|
>
|
||||||
<PriorityLabel
|
<Memo(Tag)
|
||||||
priority="important"
|
icon="alert-circle-outline"
|
||||||
size="xs"
|
size="xs"
|
||||||
|
text="Important"
|
||||||
|
uppercase={true}
|
||||||
|
variant="info"
|
||||||
>
|
>
|
||||||
<Memo(Tag)
|
<TagWrapper
|
||||||
icon="alert-circle-outline"
|
as="div"
|
||||||
size="xs"
|
className="Tag Tag--info Tag--xs"
|
||||||
text="Important"
|
|
||||||
uppercase={true}
|
uppercase={true}
|
||||||
variant="info"
|
|
||||||
>
|
>
|
||||||
<TagWrapper
|
<div
|
||||||
as="div"
|
className="TagWrapper-keYggn gnIgwl Tag Tag--info Tag--xs"
|
||||||
className="Tag Tag--info Tag--xs"
|
|
||||||
uppercase={true}
|
|
||||||
>
|
>
|
||||||
<div
|
<AlertCircleOutlineIcon
|
||||||
className="TagWrapper-keYggn gnIgwl Tag Tag--info Tag--xs"
|
size={10}
|
||||||
>
|
>
|
||||||
<AlertCircleOutlineIcon
|
<svg
|
||||||
size={10}
|
fill="currentColor"
|
||||||
|
height={10}
|
||||||
|
version="1.1"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
width={10}
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
>
|
>
|
||||||
<svg
|
<path
|
||||||
fill="currentColor"
|
d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10s10-4.5,10-10S17.5,2,12,2 M12,20c-4.4,0-8-3.6-8-8s3.6-8,8-8s8,3.6,8,8S16.4,20,12,20z M12.501,13h-1l-0.5-6h2L12.501,13z M13,16c0,0.552-0.448,1-1,1s-1-0.448-1-1s0.448-1,1-1S13,15.448,13,16z"
|
||||||
height={10}
|
/>
|
||||||
version="1.1"
|
</svg>
|
||||||
viewBox="0 0 24 24"
|
</AlertCircleOutlineIcon>
|
||||||
width={10}
|
<TagText>
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
<span
|
||||||
>
|
className="TagText-bWgUzx kzWPbz"
|
||||||
<path
|
>
|
||||||
d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10s10-4.5,10-10S17.5,2,12,2 M12,20c-4.4,0-8-3.6-8-8s3.6-8,8-8s8,3.6,8,8S16.4,20,12,20z M12.501,13h-1l-0.5-6h2L12.501,13z M13,16c0,0.552-0.448,1-1,1s-1-0.448-1-1s0.448-1,1-1S13,15.448,13,16z"
|
Important
|
||||||
/>
|
</span>
|
||||||
</svg>
|
</TagText>
|
||||||
</AlertCircleOutlineIcon>
|
</div>
|
||||||
<TagText>
|
</TagWrapper>
|
||||||
<span
|
</Memo(Tag)>
|
||||||
className="TagText-bWgUzx kzWPbz"
|
</PriorityLabel>
|
||||||
>
|
</div>
|
||||||
Important
|
|
||||||
</span>
|
|
||||||
</TagText>
|
|
||||||
</div>
|
|
||||||
</TagWrapper>
|
|
||||||
</Memo(Tag)>
|
|
||||||
</PriorityLabel>
|
|
||||||
</div>
|
|
||||||
</Priority>
|
|
||||||
</Memo(PriorityLabels)>
|
</Memo(PriorityLabels)>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@@ -816,7 +811,7 @@ exports[`components/drafts/panel/panel_body should match snapshot for requested_
|
|||||||
<span
|
<span
|
||||||
className="profile-icon "
|
className="profile-icon "
|
||||||
>
|
>
|
||||||
<Memo(Avatar)
|
<Avatar
|
||||||
size="md"
|
size="md"
|
||||||
url="/api/v4/users/user_id/image?_=0"
|
url="/api/v4/users/user_id/image?_=0"
|
||||||
username="username"
|
username="username"
|
||||||
@@ -828,7 +823,7 @@ exports[`components/drafts/panel/panel_body should match snapshot for requested_
|
|||||||
onError={[Function]}
|
onError={[Function]}
|
||||||
src="/api/v4/users/user_id/image?_=0"
|
src="/api/v4/users/user_id/image?_=0"
|
||||||
/>
|
/>
|
||||||
</Memo(Avatar)>
|
</Avatar>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</RoundButton>
|
</RoundButton>
|
||||||
@@ -908,135 +903,39 @@ exports[`components/drafts/panel/panel_body should match snapshot for requested_
|
|||||||
<Memo(PriorityLabels)
|
<Memo(PriorityLabels)
|
||||||
canRemove={false}
|
canRemove={false}
|
||||||
hasError={false}
|
hasError={false}
|
||||||
padding="0 0 0 8px"
|
|
||||||
priority=""
|
priority=""
|
||||||
requestedAck={true}
|
requestedAck={true}
|
||||||
>
|
>
|
||||||
<Priority
|
<div
|
||||||
padding="0 0 0 8px"
|
className="priorityLabelsContainer"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="Priority-unHRQ dkJcdD"
|
className="priorityLabelsAcknowledgements"
|
||||||
>
|
>
|
||||||
<Acknowledgements
|
<WithTooltip
|
||||||
hasError={false}
|
title="Acknowledgement will be requested"
|
||||||
>
|
>
|
||||||
<div
|
<span
|
||||||
className="Acknowledgements-kPkVCv dNydui"
|
className="icon icon-check-circle-outline"
|
||||||
>
|
onBlur={[Function]}
|
||||||
<WithTooltip
|
onFocus={[Function]}
|
||||||
id="post-priority-picker-ack-tooltip"
|
onKeyDown={[Function]}
|
||||||
placement="top"
|
onMouseLeave={[Function]}
|
||||||
title="Acknowledgement will be requested"
|
onMouseMove={[Function]}
|
||||||
>
|
onPointerDown={[Function]}
|
||||||
<OverlayTrigger
|
onPointerEnter={[Function]}
|
||||||
defaultOverlayShown={false}
|
/>
|
||||||
delay={400}
|
</WithTooltip>
|
||||||
disabled={false}
|
<FormattedMessage
|
||||||
overlay={<Unknown />}
|
defaultMessage="Request acknowledgement"
|
||||||
placement="top"
|
id="post_priority.request_acknowledgement"
|
||||||
trigger={
|
>
|
||||||
Array [
|
<span>
|
||||||
"hover",
|
Request acknowledgement
|
||||||
"focus",
|
</span>
|
||||||
]
|
</FormattedMessage>
|
||||||
}
|
|
||||||
>
|
|
||||||
<OverlayTrigger
|
|
||||||
defaultOverlayShown={false}
|
|
||||||
delay={400}
|
|
||||||
overlay={
|
|
||||||
<OverlayWrapper
|
|
||||||
intl={
|
|
||||||
Object {
|
|
||||||
"$t": [Function],
|
|
||||||
"defaultFormats": Object {},
|
|
||||||
"defaultLocale": "en",
|
|
||||||
"defaultRichTextElements": undefined,
|
|
||||||
"fallbackOnEmptyString": true,
|
|
||||||
"formatDate": [Function],
|
|
||||||
"formatDateTimeRange": [Function],
|
|
||||||
"formatDateToParts": [Function],
|
|
||||||
"formatDisplayName": [Function],
|
|
||||||
"formatList": [Function],
|
|
||||||
"formatListToParts": [Function],
|
|
||||||
"formatMessage": [Function],
|
|
||||||
"formatNumber": [Function],
|
|
||||||
"formatNumberToParts": [Function],
|
|
||||||
"formatPlural": [Function],
|
|
||||||
"formatRelativeTime": [Function],
|
|
||||||
"formatTime": [Function],
|
|
||||||
"formatTimeToParts": [Function],
|
|
||||||
"formats": Object {},
|
|
||||||
"formatters": Object {
|
|
||||||
"getDateTimeFormat": [Function],
|
|
||||||
"getDisplayNames": [Function],
|
|
||||||
"getListFormat": [Function],
|
|
||||||
"getMessageFormat": [Function],
|
|
||||||
"getNumberFormat": [Function],
|
|
||||||
"getPluralRules": [Function],
|
|
||||||
"getRelativeTimeFormat": [Function],
|
|
||||||
},
|
|
||||||
"locale": "en",
|
|
||||||
"messages": Object {},
|
|
||||||
"onError": [Function],
|
|
||||||
"onWarn": [Function],
|
|
||||||
"textComponent": "span",
|
|
||||||
"timeZone": "Etc/UTC",
|
|
||||||
"wrapRichTextChunksInFragment": undefined,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
placement="top"
|
|
||||||
trigger={
|
|
||||||
Array [
|
|
||||||
"hover",
|
|
||||||
"focus",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<CheckCircleOutlineIcon
|
|
||||||
onBlur={[Function]}
|
|
||||||
onClick={null}
|
|
||||||
onFocus={[Function]}
|
|
||||||
onMouseOut={[Function]}
|
|
||||||
onMouseOver={[Function]}
|
|
||||||
size={14}
|
|
||||||
>
|
|
||||||
<svg
|
|
||||||
fill="currentColor"
|
|
||||||
height={14}
|
|
||||||
onBlur={[Function]}
|
|
||||||
onClick={null}
|
|
||||||
onFocus={[Function]}
|
|
||||||
onMouseOut={[Function]}
|
|
||||||
onMouseOver={[Function]}
|
|
||||||
version="1.1"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
width={14}
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
>
|
|
||||||
<path
|
|
||||||
d="M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M12 20C7.59 20 4 16.41 4 12S7.59 4 12 4 20 7.59 20 12 16.41 20 12 20M16.59 7.58L10 14.17L7.41 11.59L6 13L10 17L18 9L16.59 7.58Z"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
</CheckCircleOutlineIcon>
|
|
||||||
</OverlayTrigger>
|
|
||||||
</OverlayTrigger>
|
|
||||||
</WithTooltip>
|
|
||||||
<FormattedMessage
|
|
||||||
defaultMessage="Request acknowledgement"
|
|
||||||
id="post_priority.request_acknowledgement"
|
|
||||||
>
|
|
||||||
<span>
|
|
||||||
Request acknowledgement
|
|
||||||
</span>
|
|
||||||
</FormattedMessage>
|
|
||||||
</div>
|
|
||||||
</Acknowledgements>
|
|
||||||
</div>
|
</div>
|
||||||
</Priority>
|
</div>
|
||||||
</Memo(PriorityLabels)>
|
</Memo(PriorityLabels)>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -138,8 +138,6 @@ exports[`components/drafts/panel/panel_header should show sync icon when draft i
|
|||||||
className="PanelHeader__sync-icon"
|
className="PanelHeader__sync-icon"
|
||||||
>
|
>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id="drafts-sync-tooltip"
|
|
||||||
placement="top"
|
|
||||||
title={
|
title={
|
||||||
<Memo(MemoizedFormattedMessage)
|
<Memo(MemoizedFormattedMessage)
|
||||||
defaultMessage="Updated from another device"
|
defaultMessage="Updated from another device"
|
||||||
|
|||||||
@@ -4,6 +4,10 @@
|
|||||||
|
|
||||||
&__right {
|
&__right {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|
||||||
|
.priorityLabelsContainer {
|
||||||
|
padding: 0 0 0 8px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.post:hover {
|
&.post:hover {
|
||||||
|
|||||||
@@ -81,7 +81,6 @@ function PanelBody({
|
|||||||
{priority && (
|
{priority && (
|
||||||
<PriorityLabels
|
<PriorityLabels
|
||||||
canRemove={false}
|
canRemove={false}
|
||||||
padding='0 0 0 8px'
|
|
||||||
hasError={false}
|
hasError={false}
|
||||||
persistentNotifications={priority.persistent_notifications}
|
persistentNotifications={priority.persistent_notifications}
|
||||||
priority={priority.priority}
|
priority={priority.priority}
|
||||||
|
|||||||
@@ -62,8 +62,6 @@ function PanelHeader({
|
|||||||
{remote && (
|
{remote && (
|
||||||
<div className='PanelHeader__sync-icon'>
|
<div className='PanelHeader__sync-icon'>
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
id='drafts-sync-tooltip'
|
|
||||||
placement='top'
|
|
||||||
title={
|
title={
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='drafts.info.sync'
|
id='drafts.info.sync'
|
||||||
|
|||||||
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Ссылка в новой задаче
Block a user