[MM-61598]: Fix ARIA roles, states, and properties are valid in user profile image and @user buttons (#29692)
* [MA-26]: Fix ARIA roles, states, and properties are valid in user profile image and @user buttons * [MA-26]: Remove irrelevant e2e tests * [MA-26]: Remove nested interactive elements * [MA-26]: Updated mention-link styles * Minor change --------- Co-authored-by: ayush-chauhan233 <ayush.chauhan@brightscout.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
8fdb9ad358
Коммит
28dbc3cabb
@@ -156,8 +156,6 @@ describe('Verify Accessibility keyboard usability across different regions in th
|
|||||||
cy.get(region).should('have.attr', 'role', 'application');
|
cy.get(region).should('have.attr', 'role', 'application');
|
||||||
});
|
});
|
||||||
cy.get('.search__form').should('have.attr', 'role', 'search');
|
cy.get('.search__form').should('have.attr', 'role', 'search');
|
||||||
cy.get(`#post_${postId}`).children('.post__content').eq(0).should('have.attr', 'role', 'application');
|
|
||||||
cy.get(`#rhsPost_${postId}`).children('.post__content').eq(0).should('have.attr', 'role', 'application');
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ describe('Verify Accessibility Support in Post', () => {
|
|||||||
cy.getLastPostId().then((postId) => {
|
cy.getLastPostId().then((postId) => {
|
||||||
cy.get(`#post_${postId}`).within(() => {
|
cy.get(`#post_${postId}`).within(() => {
|
||||||
// * Verify focus is on profile image
|
// * Verify focus is on profile image
|
||||||
cy.get('.status-wrapper button').first().should('be.focused');
|
cy.get('button.status-wrapper').first().should('be.focused');
|
||||||
cy.focused().tab();
|
cy.focused().tab();
|
||||||
|
|
||||||
// * Verify focus is on the username
|
// * Verify focus is on the username
|
||||||
|
|||||||
@@ -8,13 +8,11 @@ exports[`components/admin_console/admin_user_card/admin_user_card should match d
|
|||||||
<div
|
<div
|
||||||
class="AdminUserCard__header"
|
class="AdminUserCard__header"
|
||||||
>
|
>
|
||||||
<span
|
<button
|
||||||
aria-expanded="false"
|
aria-expanded="false"
|
||||||
aria-haspopup="dialog"
|
aria-haspopup="dialog"
|
||||||
class="status-wrapper admin-user-card"
|
class="status-wrapper style--none admin-user-card"
|
||||||
>
|
style="border-radius: 50%; width: 128px; height: 128px;"
|
||||||
<button
|
|
||||||
class="RoundButton-dvlhqG gnYSKj style--none"
|
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
class="profile-icon "
|
class="profile-icon "
|
||||||
@@ -27,7 +25,6 @@ exports[`components/admin_console/admin_user_card/admin_user_card should match d
|
|||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</span>
|
|
||||||
<div
|
<div
|
||||||
class="AdminUserCard__user-info"
|
class="AdminUserCard__user-info"
|
||||||
>
|
>
|
||||||
@@ -69,13 +66,11 @@ exports[`components/admin_console/admin_user_card/admin_user_card should match s
|
|||||||
<div
|
<div
|
||||||
class="AdminUserCard__header"
|
class="AdminUserCard__header"
|
||||||
>
|
>
|
||||||
<span
|
<button
|
||||||
aria-expanded="false"
|
aria-expanded="false"
|
||||||
aria-haspopup="dialog"
|
aria-haspopup="dialog"
|
||||||
class="status-wrapper admin-user-card"
|
class="status-wrapper style--none admin-user-card"
|
||||||
>
|
style="border-radius: 50%; width: 128px; height: 128px;"
|
||||||
<button
|
|
||||||
class="RoundButton-dvlhqG gnYSKj style--none"
|
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
class="profile-icon "
|
class="profile-icon "
|
||||||
@@ -88,7 +83,6 @@ exports[`components/admin_console/admin_user_card/admin_user_card should match s
|
|||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</span>
|
|
||||||
<div
|
<div
|
||||||
class="AdminUserCard__user-info"
|
class="AdminUserCard__user-info"
|
||||||
>
|
>
|
||||||
@@ -125,13 +119,11 @@ exports[`components/admin_console/admin_user_card/admin_user_card should match s
|
|||||||
<div
|
<div
|
||||||
class="AdminUserCard__header"
|
class="AdminUserCard__header"
|
||||||
>
|
>
|
||||||
<span
|
<button
|
||||||
aria-expanded="false"
|
aria-expanded="false"
|
||||||
aria-haspopup="dialog"
|
aria-haspopup="dialog"
|
||||||
class="status-wrapper admin-user-card"
|
class="status-wrapper style--none admin-user-card"
|
||||||
>
|
style="border-radius: 50%; width: 128px; height: 128px;"
|
||||||
<button
|
|
||||||
class="RoundButton-dvlhqG gnYSKj style--none"
|
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
class="profile-icon "
|
class="profile-icon "
|
||||||
@@ -144,7 +136,6 @@ exports[`components/admin_console/admin_user_card/admin_user_card should match s
|
|||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</span>
|
|
||||||
<div
|
<div
|
||||||
class="AdminUserCard__user-info"
|
class="AdminUserCard__user-info"
|
||||||
>
|
>
|
||||||
@@ -179,13 +170,11 @@ exports[`components/admin_console/admin_user_card/admin_user_card should match s
|
|||||||
<div
|
<div
|
||||||
class="AdminUserCard__header"
|
class="AdminUserCard__header"
|
||||||
>
|
>
|
||||||
<span
|
<button
|
||||||
aria-expanded="false"
|
aria-expanded="false"
|
||||||
aria-haspopup="dialog"
|
aria-haspopup="dialog"
|
||||||
class="status-wrapper admin-user-card"
|
class="status-wrapper style--none admin-user-card"
|
||||||
>
|
style="border-radius: 50%; width: 128px; height: 128px;"
|
||||||
<button
|
|
||||||
class="RoundButton-dvlhqG gnYSKj style--none"
|
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
class="profile-icon "
|
class="profile-icon "
|
||||||
@@ -198,7 +187,6 @@ exports[`components/admin_console/admin_user_card/admin_user_card should match s
|
|||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</span>
|
|
||||||
<div
|
<div
|
||||||
class="AdminUserCard__user-info"
|
class="AdminUserCard__user-info"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -28,13 +28,11 @@ exports[`SystemUserDetail should match default snapshot 1`] = `
|
|||||||
<div
|
<div
|
||||||
class="AdminUserCard__header"
|
class="AdminUserCard__header"
|
||||||
>
|
>
|
||||||
<span
|
<button
|
||||||
aria-expanded="false"
|
aria-expanded="false"
|
||||||
aria-haspopup="dialog"
|
aria-haspopup="dialog"
|
||||||
class="status-wrapper admin-user-card"
|
class="status-wrapper style--none admin-user-card"
|
||||||
>
|
style="border-radius: 50%; width: 128px; height: 128px;"
|
||||||
<button
|
|
||||||
class="RoundButton-dvlhqG gnYSKj style--none"
|
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
class="profile-icon "
|
class="profile-icon "
|
||||||
@@ -47,7 +45,6 @@ exports[`SystemUserDetail should match default snapshot 1`] = `
|
|||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</span>
|
|
||||||
<div
|
<div
|
||||||
class="AdminUserCard__user-info"
|
class="AdminUserCard__user-info"
|
||||||
>
|
>
|
||||||
@@ -240,13 +237,11 @@ exports[`SystemUserDetail should match snapshot if MFA is enabled 1`] = `
|
|||||||
<div
|
<div
|
||||||
class="AdminUserCard__header"
|
class="AdminUserCard__header"
|
||||||
>
|
>
|
||||||
<span
|
<button
|
||||||
aria-expanded="false"
|
aria-expanded="false"
|
||||||
aria-haspopup="dialog"
|
aria-haspopup="dialog"
|
||||||
class="status-wrapper admin-user-card"
|
class="status-wrapper style--none admin-user-card"
|
||||||
>
|
style="border-radius: 50%; width: 128px; height: 128px;"
|
||||||
<button
|
|
||||||
class="RoundButton-dvlhqG gnYSKj style--none"
|
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
class="profile-icon "
|
class="profile-icon "
|
||||||
@@ -259,7 +254,6 @@ exports[`SystemUserDetail should match snapshot if MFA is enabled 1`] = `
|
|||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</span>
|
|
||||||
<div
|
<div
|
||||||
class="AdminUserCard__user-info"
|
class="AdminUserCard__user-info"
|
||||||
>
|
>
|
||||||
@@ -452,13 +446,11 @@ exports[`SystemUserDetail should not show manage user settings button when user
|
|||||||
<div
|
<div
|
||||||
class="AdminUserCard__header"
|
class="AdminUserCard__header"
|
||||||
>
|
>
|
||||||
<span
|
<button
|
||||||
aria-expanded="false"
|
aria-expanded="false"
|
||||||
aria-haspopup="dialog"
|
aria-haspopup="dialog"
|
||||||
class="status-wrapper admin-user-card"
|
class="status-wrapper style--none admin-user-card"
|
||||||
>
|
style="border-radius: 50%; width: 128px; height: 128px;"
|
||||||
<button
|
|
||||||
class="RoundButton-dvlhqG gnYSKj style--none"
|
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
class="profile-icon "
|
class="profile-icon "
|
||||||
@@ -471,7 +463,6 @@ exports[`SystemUserDetail should not show manage user settings button when user
|
|||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</span>
|
|
||||||
<div
|
<div
|
||||||
class="AdminUserCard__user-info"
|
class="AdminUserCard__user-info"
|
||||||
>
|
>
|
||||||
@@ -664,13 +655,11 @@ exports[`SystemUserDetail should show manage user settings button as activated 1
|
|||||||
<div
|
<div
|
||||||
class="AdminUserCard__header"
|
class="AdminUserCard__header"
|
||||||
>
|
>
|
||||||
<span
|
<button
|
||||||
aria-expanded="false"
|
aria-expanded="false"
|
||||||
aria-haspopup="dialog"
|
aria-haspopup="dialog"
|
||||||
class="status-wrapper admin-user-card"
|
class="status-wrapper style--none admin-user-card"
|
||||||
>
|
style="border-radius: 50%; width: 128px; height: 128px;"
|
||||||
<button
|
|
||||||
class="RoundButton-dvlhqG gnYSKj style--none"
|
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
class="profile-icon "
|
class="profile-icon "
|
||||||
@@ -683,7 +672,6 @@ exports[`SystemUserDetail should show manage user settings button as activated 1
|
|||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</span>
|
|
||||||
<div
|
<div
|
||||||
class="AdminUserCard__user-info"
|
class="AdminUserCard__user-info"
|
||||||
>
|
>
|
||||||
@@ -881,13 +869,11 @@ exports[`SystemUserDetail should show manage user settings button as disabled wh
|
|||||||
<div
|
<div
|
||||||
class="AdminUserCard__header"
|
class="AdminUserCard__header"
|
||||||
>
|
>
|
||||||
<span
|
<button
|
||||||
aria-expanded="false"
|
aria-expanded="false"
|
||||||
aria-haspopup="dialog"
|
aria-haspopup="dialog"
|
||||||
class="status-wrapper admin-user-card"
|
class="status-wrapper style--none admin-user-card"
|
||||||
>
|
style="border-radius: 50%; width: 128px; height: 128px;"
|
||||||
<button
|
|
||||||
class="RoundButton-dvlhqG gnYSKj style--none"
|
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
class="profile-icon "
|
class="profile-icon "
|
||||||
@@ -900,7 +886,6 @@ exports[`SystemUserDetail should show manage user settings button as disabled wh
|
|||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</span>
|
|
||||||
<div
|
<div
|
||||||
class="AdminUserCard__user-info"
|
class="AdminUserCard__user-info"
|
||||||
>
|
>
|
||||||
@@ -1093,13 +1078,11 @@ exports[`SystemUserDetail should show the activate user button as disabled when
|
|||||||
<div
|
<div
|
||||||
class="AdminUserCard__header"
|
class="AdminUserCard__header"
|
||||||
>
|
>
|
||||||
<span
|
<button
|
||||||
aria-expanded="false"
|
aria-expanded="false"
|
||||||
aria-haspopup="dialog"
|
aria-haspopup="dialog"
|
||||||
class="status-wrapper admin-user-card"
|
class="status-wrapper style--none admin-user-card"
|
||||||
>
|
style="border-radius: 50%; width: 128px; height: 128px;"
|
||||||
<button
|
|
||||||
class="RoundButton-dvlhqG gnYSKj style--none"
|
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
class="profile-icon "
|
class="profile-icon "
|
||||||
@@ -1112,7 +1095,6 @@ exports[`SystemUserDetail should show the activate user button as disabled when
|
|||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</span>
|
|
||||||
<div
|
<div
|
||||||
class="AdminUserCard__user-info"
|
class="AdminUserCard__user-info"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -96,16 +96,15 @@ exports[`components/AtMention should match snapshot when mentioning current user
|
|||||||
<ProfilePopoverController
|
<ProfilePopoverController
|
||||||
returnFocus={[Function]}
|
returnFocus={[Function]}
|
||||||
src="/api/v4/users/abc1/image"
|
src="/api/v4/users/abc1/image"
|
||||||
triggerComponentClass="mention--highlight"
|
triggerComponentAs="button"
|
||||||
|
triggerComponentClass="style--none mention--highlight"
|
||||||
userId="abc1"
|
userId="abc1"
|
||||||
>
|
>
|
||||||
<a
|
<span
|
||||||
className="mention-link"
|
className="mention-link"
|
||||||
role="button"
|
|
||||||
tabIndex={0}
|
|
||||||
>
|
>
|
||||||
@First Last
|
@First Last
|
||||||
</a>
|
</span>
|
||||||
</ProfilePopoverController>
|
</ProfilePopoverController>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
`;
|
`;
|
||||||
@@ -115,16 +114,15 @@ exports[`components/AtMention should match snapshot when mentioning user 1`] = `
|
|||||||
<ProfilePopoverController
|
<ProfilePopoverController
|
||||||
returnFocus={[Function]}
|
returnFocus={[Function]}
|
||||||
src="/api/v4/users/abc2/image"
|
src="/api/v4/users/abc2/image"
|
||||||
triggerComponentClass=""
|
triggerComponentAs="button"
|
||||||
|
triggerComponentClass="style--none"
|
||||||
userId="abc2"
|
userId="abc2"
|
||||||
>
|
>
|
||||||
<a
|
<span
|
||||||
className="mention-link"
|
className="mention-link"
|
||||||
role="button"
|
|
||||||
tabIndex={0}
|
|
||||||
>
|
>
|
||||||
@Nick
|
@Nick
|
||||||
</a>
|
</span>
|
||||||
</ProfilePopoverController>
|
</ProfilePopoverController>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
`;
|
`;
|
||||||
@@ -134,16 +132,15 @@ exports[`components/AtMention should match snapshot when mentioning user contain
|
|||||||
<ProfilePopoverController
|
<ProfilePopoverController
|
||||||
returnFocus={[Function]}
|
returnFocus={[Function]}
|
||||||
src="/api/v4/users/abc3/image"
|
src="/api/v4/users/abc3/image"
|
||||||
triggerComponentClass=""
|
triggerComponentAs="button"
|
||||||
|
triggerComponentClass="style--none"
|
||||||
userId="abc3"
|
userId="abc3"
|
||||||
>
|
>
|
||||||
<a
|
<span
|
||||||
className="mention-link"
|
className="mention-link"
|
||||||
role="button"
|
|
||||||
tabIndex={0}
|
|
||||||
>
|
>
|
||||||
@Dot Matrix
|
@Dot Matrix
|
||||||
</a>
|
</span>
|
||||||
</ProfilePopoverController>
|
</ProfilePopoverController>
|
||||||
.
|
.
|
||||||
</Fragment>
|
</Fragment>
|
||||||
@@ -154,16 +151,15 @@ exports[`components/AtMention should match snapshot when mentioning user contain
|
|||||||
<ProfilePopoverController
|
<ProfilePopoverController
|
||||||
returnFocus={[Function]}
|
returnFocus={[Function]}
|
||||||
src="/api/v4/users/abc3/image"
|
src="/api/v4/users/abc3/image"
|
||||||
triggerComponentClass=""
|
triggerComponentAs="button"
|
||||||
|
triggerComponentClass="style--none"
|
||||||
userId="abc3"
|
userId="abc3"
|
||||||
>
|
>
|
||||||
<a
|
<span
|
||||||
className="mention-link"
|
className="mention-link"
|
||||||
role="button"
|
|
||||||
tabIndex={0}
|
|
||||||
>
|
>
|
||||||
@Dot Matrix
|
@Dot Matrix
|
||||||
</a>
|
</span>
|
||||||
</ProfilePopoverController>
|
</ProfilePopoverController>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
`;
|
`;
|
||||||
@@ -173,16 +169,15 @@ exports[`components/AtMention should match snapshot when mentioning user followe
|
|||||||
<ProfilePopoverController
|
<ProfilePopoverController
|
||||||
returnFocus={[Function]}
|
returnFocus={[Function]}
|
||||||
src="/api/v4/users/abc2/image"
|
src="/api/v4/users/abc2/image"
|
||||||
triggerComponentClass=""
|
triggerComponentAs="button"
|
||||||
|
triggerComponentClass="style--none"
|
||||||
userId="abc2"
|
userId="abc2"
|
||||||
>
|
>
|
||||||
<a
|
<span
|
||||||
className="mention-link"
|
className="mention-link"
|
||||||
role="button"
|
|
||||||
tabIndex={0}
|
|
||||||
>
|
>
|
||||||
@Nick
|
@Nick
|
||||||
</a>
|
</span>
|
||||||
</ProfilePopoverController>
|
</ProfilePopoverController>
|
||||||
...
|
...
|
||||||
</Fragment>
|
</Fragment>
|
||||||
@@ -193,16 +188,15 @@ exports[`components/AtMention should match snapshot when mentioning user with di
|
|||||||
<ProfilePopoverController
|
<ProfilePopoverController
|
||||||
returnFocus={[Function]}
|
returnFocus={[Function]}
|
||||||
src="/api/v4/users/abc2/image"
|
src="/api/v4/users/abc2/image"
|
||||||
triggerComponentClass=""
|
triggerComponentAs="button"
|
||||||
|
triggerComponentClass="style--none"
|
||||||
userId="abc2"
|
userId="abc2"
|
||||||
>
|
>
|
||||||
<a
|
<span
|
||||||
className="mention-link"
|
className="mention-link"
|
||||||
role="button"
|
|
||||||
tabIndex={0}
|
|
||||||
>
|
>
|
||||||
@user1
|
@user1
|
||||||
</a>
|
</span>
|
||||||
</ProfilePopoverController>
|
</ProfilePopoverController>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
`;
|
`;
|
||||||
@@ -212,16 +206,15 @@ exports[`components/AtMention should match snapshot when mentioning user with mi
|
|||||||
<ProfilePopoverController
|
<ProfilePopoverController
|
||||||
returnFocus={[Function]}
|
returnFocus={[Function]}
|
||||||
src="/api/v4/users/abc2/image"
|
src="/api/v4/users/abc2/image"
|
||||||
triggerComponentClass=""
|
triggerComponentAs="button"
|
||||||
|
triggerComponentClass="style--none"
|
||||||
userId="abc2"
|
userId="abc2"
|
||||||
>
|
>
|
||||||
<a
|
<span
|
||||||
className="mention-link"
|
className="mention-link"
|
||||||
role="button"
|
|
||||||
tabIndex={0}
|
|
||||||
>
|
>
|
||||||
@Nick
|
@Nick
|
||||||
</a>
|
</span>
|
||||||
</ProfilePopoverController>
|
</ProfilePopoverController>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -60,20 +60,19 @@ const AtMention = (props: Props) => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ProfilePopover
|
<ProfilePopover
|
||||||
triggerComponentClass={classNames({'mention--highlight': highlightMention})}
|
triggerComponentClass={classNames('style--none', {'mention--highlight': highlightMention})}
|
||||||
userId={user.id}
|
userId={user.id}
|
||||||
src={Client4.getProfilePictureUrl(user.id, user.last_picture_update)}
|
src={Client4.getProfilePictureUrl(user.id, user.last_picture_update)}
|
||||||
channelId={props.channelId}
|
channelId={props.channelId}
|
||||||
returnFocus={returnFocus}
|
returnFocus={returnFocus}
|
||||||
|
triggerComponentAs='button'
|
||||||
>
|
>
|
||||||
<a
|
<span
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className='mention-link'
|
className='mention-link'
|
||||||
role='button'
|
|
||||||
tabIndex={0}
|
|
||||||
>
|
>
|
||||||
{'@' + userDisplayName}
|
{'@' + userDisplayName}
|
||||||
</a>
|
</span>
|
||||||
</ProfilePopover>
|
</ProfilePopover>
|
||||||
{userMentionNameSuffix}
|
{userMentionNameSuffix}
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -40,27 +40,34 @@ exports[`components/drafts/panel/panel_body should have called handleFormattedTe
|
|||||||
<ProfilePopoverController
|
<ProfilePopoverController
|
||||||
channelId="channel_id"
|
channelId="channel_id"
|
||||||
src="/api/v4/users/user_id/image?_=0"
|
src="/api/v4/users/user_id/image?_=0"
|
||||||
triggerComponentClass="status-wrapper"
|
triggerComponentAs="button"
|
||||||
|
triggerComponentClass="status-wrapper style--none"
|
||||||
|
triggerComponentStyle={
|
||||||
|
Object {
|
||||||
|
"borderRadius": "50%",
|
||||||
|
"height": "32px",
|
||||||
|
"width": "32px",
|
||||||
|
}
|
||||||
|
}
|
||||||
userId="user_id"
|
userId="user_id"
|
||||||
username="username"
|
username="username"
|
||||||
>
|
>
|
||||||
<span
|
<button
|
||||||
aria-expanded="false"
|
aria-expanded="false"
|
||||||
aria-haspopup="dialog"
|
aria-haspopup="dialog"
|
||||||
className="status-wrapper"
|
className="status-wrapper style--none"
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
onKeyDown={[Function]}
|
onKeyDown={[Function]}
|
||||||
onKeyUp={[Function]}
|
onKeyUp={[Function]}
|
||||||
onMouseDown={[Function]}
|
onMouseDown={[Function]}
|
||||||
onPointerDown={[Function]}
|
onPointerDown={[Function]}
|
||||||
>
|
style={
|
||||||
<RoundButton
|
Object {
|
||||||
className="style--none"
|
"borderRadius": "50%",
|
||||||
size="md"
|
"height": "32px",
|
||||||
>
|
"width": "32px",
|
||||||
<button
|
}
|
||||||
className="RoundButton-dvlhqG gfRzmz style--none"
|
}
|
||||||
size="md"
|
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
className="profile-icon "
|
className="profile-icon "
|
||||||
@@ -79,8 +86,6 @@ exports[`components/drafts/panel/panel_body should have called handleFormattedTe
|
|||||||
/>
|
/>
|
||||||
</Avatar>
|
</Avatar>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
|
||||||
</RoundButton>
|
|
||||||
<Memo(StatusIcon)
|
<Memo(StatusIcon)
|
||||||
status="status"
|
status="status"
|
||||||
>
|
>
|
||||||
@@ -113,7 +118,7 @@ exports[`components/drafts/panel/panel_body should have called handleFormattedTe
|
|||||||
</span>
|
</span>
|
||||||
</StatusOfflineIcon>
|
</StatusOfflineIcon>
|
||||||
</Memo(StatusIcon)>
|
</Memo(StatusIcon)>
|
||||||
</span>
|
</button>
|
||||||
</ProfilePopoverController>
|
</ProfilePopoverController>
|
||||||
</ProfilePicture>
|
</ProfilePicture>
|
||||||
</div>
|
</div>
|
||||||
@@ -267,27 +272,34 @@ exports[`components/drafts/panel/panel_body should match snapshot 1`] = `
|
|||||||
<ProfilePopoverController
|
<ProfilePopoverController
|
||||||
channelId="channel_id"
|
channelId="channel_id"
|
||||||
src="/api/v4/users/user_id/image?_=0"
|
src="/api/v4/users/user_id/image?_=0"
|
||||||
triggerComponentClass="status-wrapper"
|
triggerComponentAs="button"
|
||||||
|
triggerComponentClass="status-wrapper style--none"
|
||||||
|
triggerComponentStyle={
|
||||||
|
Object {
|
||||||
|
"borderRadius": "50%",
|
||||||
|
"height": "32px",
|
||||||
|
"width": "32px",
|
||||||
|
}
|
||||||
|
}
|
||||||
userId="user_id"
|
userId="user_id"
|
||||||
username="username"
|
username="username"
|
||||||
>
|
>
|
||||||
<span
|
<button
|
||||||
aria-expanded="false"
|
aria-expanded="false"
|
||||||
aria-haspopup="dialog"
|
aria-haspopup="dialog"
|
||||||
className="status-wrapper"
|
className="status-wrapper style--none"
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
onKeyDown={[Function]}
|
onKeyDown={[Function]}
|
||||||
onKeyUp={[Function]}
|
onKeyUp={[Function]}
|
||||||
onMouseDown={[Function]}
|
onMouseDown={[Function]}
|
||||||
onPointerDown={[Function]}
|
onPointerDown={[Function]}
|
||||||
>
|
style={
|
||||||
<RoundButton
|
Object {
|
||||||
className="style--none"
|
"borderRadius": "50%",
|
||||||
size="md"
|
"height": "32px",
|
||||||
>
|
"width": "32px",
|
||||||
<button
|
}
|
||||||
className="RoundButton-dvlhqG gfRzmz style--none"
|
}
|
||||||
size="md"
|
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
className="profile-icon "
|
className="profile-icon "
|
||||||
@@ -306,8 +318,6 @@ exports[`components/drafts/panel/panel_body should match snapshot 1`] = `
|
|||||||
/>
|
/>
|
||||||
</Avatar>
|
</Avatar>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
|
||||||
</RoundButton>
|
|
||||||
<Memo(StatusIcon)
|
<Memo(StatusIcon)
|
||||||
status="status"
|
status="status"
|
||||||
>
|
>
|
||||||
@@ -340,7 +350,7 @@ exports[`components/drafts/panel/panel_body should match snapshot 1`] = `
|
|||||||
</span>
|
</span>
|
||||||
</StatusOfflineIcon>
|
</StatusOfflineIcon>
|
||||||
</Memo(StatusIcon)>
|
</Memo(StatusIcon)>
|
||||||
</span>
|
</button>
|
||||||
</ProfilePopoverController>
|
</ProfilePopoverController>
|
||||||
</ProfilePicture>
|
</ProfilePicture>
|
||||||
</div>
|
</div>
|
||||||
@@ -500,27 +510,34 @@ exports[`components/drafts/panel/panel_body should match snapshot for priority 1
|
|||||||
<ProfilePopoverController
|
<ProfilePopoverController
|
||||||
channelId="channel_id"
|
channelId="channel_id"
|
||||||
src="/api/v4/users/user_id/image?_=0"
|
src="/api/v4/users/user_id/image?_=0"
|
||||||
triggerComponentClass="status-wrapper"
|
triggerComponentAs="button"
|
||||||
|
triggerComponentClass="status-wrapper style--none"
|
||||||
|
triggerComponentStyle={
|
||||||
|
Object {
|
||||||
|
"borderRadius": "50%",
|
||||||
|
"height": "32px",
|
||||||
|
"width": "32px",
|
||||||
|
}
|
||||||
|
}
|
||||||
userId="user_id"
|
userId="user_id"
|
||||||
username="username"
|
username="username"
|
||||||
>
|
>
|
||||||
<span
|
<button
|
||||||
aria-expanded="false"
|
aria-expanded="false"
|
||||||
aria-haspopup="dialog"
|
aria-haspopup="dialog"
|
||||||
className="status-wrapper"
|
className="status-wrapper style--none"
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
onKeyDown={[Function]}
|
onKeyDown={[Function]}
|
||||||
onKeyUp={[Function]}
|
onKeyUp={[Function]}
|
||||||
onMouseDown={[Function]}
|
onMouseDown={[Function]}
|
||||||
onPointerDown={[Function]}
|
onPointerDown={[Function]}
|
||||||
>
|
style={
|
||||||
<RoundButton
|
Object {
|
||||||
className="style--none"
|
"borderRadius": "50%",
|
||||||
size="md"
|
"height": "32px",
|
||||||
>
|
"width": "32px",
|
||||||
<button
|
}
|
||||||
className="RoundButton-dvlhqG gfRzmz style--none"
|
}
|
||||||
size="md"
|
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
className="profile-icon "
|
className="profile-icon "
|
||||||
@@ -539,8 +556,6 @@ exports[`components/drafts/panel/panel_body should match snapshot for priority 1
|
|||||||
/>
|
/>
|
||||||
</Avatar>
|
</Avatar>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
|
||||||
</RoundButton>
|
|
||||||
<Memo(StatusIcon)
|
<Memo(StatusIcon)
|
||||||
status="status"
|
status="status"
|
||||||
>
|
>
|
||||||
@@ -573,7 +588,7 @@ exports[`components/drafts/panel/panel_body should match snapshot for priority 1
|
|||||||
</span>
|
</span>
|
||||||
</StatusOfflineIcon>
|
</StatusOfflineIcon>
|
||||||
</Memo(StatusIcon)>
|
</Memo(StatusIcon)>
|
||||||
</span>
|
</button>
|
||||||
</ProfilePopoverController>
|
</ProfilePopoverController>
|
||||||
</ProfilePicture>
|
</ProfilePicture>
|
||||||
</div>
|
</div>
|
||||||
@@ -790,27 +805,34 @@ exports[`components/drafts/panel/panel_body should match snapshot for requested_
|
|||||||
<ProfilePopoverController
|
<ProfilePopoverController
|
||||||
channelId="channel_id"
|
channelId="channel_id"
|
||||||
src="/api/v4/users/user_id/image?_=0"
|
src="/api/v4/users/user_id/image?_=0"
|
||||||
triggerComponentClass="status-wrapper"
|
triggerComponentAs="button"
|
||||||
|
triggerComponentClass="status-wrapper style--none"
|
||||||
|
triggerComponentStyle={
|
||||||
|
Object {
|
||||||
|
"borderRadius": "50%",
|
||||||
|
"height": "32px",
|
||||||
|
"width": "32px",
|
||||||
|
}
|
||||||
|
}
|
||||||
userId="user_id"
|
userId="user_id"
|
||||||
username="username"
|
username="username"
|
||||||
>
|
>
|
||||||
<span
|
<button
|
||||||
aria-expanded="false"
|
aria-expanded="false"
|
||||||
aria-haspopup="dialog"
|
aria-haspopup="dialog"
|
||||||
className="status-wrapper"
|
className="status-wrapper style--none"
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
onKeyDown={[Function]}
|
onKeyDown={[Function]}
|
||||||
onKeyUp={[Function]}
|
onKeyUp={[Function]}
|
||||||
onMouseDown={[Function]}
|
onMouseDown={[Function]}
|
||||||
onPointerDown={[Function]}
|
onPointerDown={[Function]}
|
||||||
>
|
style={
|
||||||
<RoundButton
|
Object {
|
||||||
className="style--none"
|
"borderRadius": "50%",
|
||||||
size="md"
|
"height": "32px",
|
||||||
>
|
"width": "32px",
|
||||||
<button
|
}
|
||||||
className="RoundButton-dvlhqG gfRzmz style--none"
|
}
|
||||||
size="md"
|
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
className="profile-icon "
|
className="profile-icon "
|
||||||
@@ -829,8 +851,6 @@ exports[`components/drafts/panel/panel_body should match snapshot for requested_
|
|||||||
/>
|
/>
|
||||||
</Avatar>
|
</Avatar>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
|
||||||
</RoundButton>
|
|
||||||
<Memo(StatusIcon)
|
<Memo(StatusIcon)
|
||||||
status="status"
|
status="status"
|
||||||
>
|
>
|
||||||
@@ -863,7 +883,7 @@ exports[`components/drafts/panel/panel_body should match snapshot for requested_
|
|||||||
</span>
|
</span>
|
||||||
</StatusOfflineIcon>
|
</StatusOfflineIcon>
|
||||||
</Memo(StatusIcon)>
|
</Memo(StatusIcon)>
|
||||||
</span>
|
</button>
|
||||||
</ProfilePopoverController>
|
</ProfilePopoverController>
|
||||||
</ProfilePicture>
|
</ProfilePicture>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -566,7 +566,6 @@ function PostComponent(props: Props) {
|
|||||||
channelId={post.channel_id}
|
channelId={post.channel_id}
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
role='application'
|
|
||||||
className={`post__content ${props.center ? 'center' : ''}`}
|
className={`post__content ${props.center ? 'center' : ''}`}
|
||||||
data-testid='postContent'
|
data-testid='postContent'
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -39,12 +39,16 @@ exports[`components/ProfilePicture should match snapshot, no user specified, ove
|
|||||||
exports[`components/ProfilePicture should match snapshot, profile and src, default props 1`] = `
|
exports[`components/ProfilePicture should match snapshot, profile and src, default props 1`] = `
|
||||||
<ProfilePopoverController
|
<ProfilePopoverController
|
||||||
src="http://example.com/image.png"
|
src="http://example.com/image.png"
|
||||||
triggerComponentClass="status-wrapper"
|
triggerComponentAs="button"
|
||||||
|
triggerComponentClass="status-wrapper style--none"
|
||||||
|
triggerComponentStyle={
|
||||||
|
Object {
|
||||||
|
"borderRadius": "50%",
|
||||||
|
"height": "32px",
|
||||||
|
"width": "32px",
|
||||||
|
}
|
||||||
|
}
|
||||||
userId="uid"
|
userId="uid"
|
||||||
>
|
|
||||||
<RoundButton
|
|
||||||
className="style--none"
|
|
||||||
size="md"
|
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
className="profile-icon "
|
className="profile-icon "
|
||||||
@@ -53,7 +57,6 @@ exports[`components/ProfilePicture should match snapshot, profile and src, defau
|
|||||||
url="http://example.com/emoji.png"
|
url="http://example.com/emoji.png"
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</RoundButton>
|
|
||||||
<Memo(StatusIcon)
|
<Memo(StatusIcon)
|
||||||
status="away"
|
status="away"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import styled from 'styled-components';
|
|
||||||
|
|
||||||
import ProfilePopover from 'components/profile_popover';
|
import ProfilePopover from 'components/profile_popover';
|
||||||
import StatusIcon from 'components/status_icon';
|
import StatusIcon from 'components/status_icon';
|
||||||
@@ -42,7 +41,7 @@ function ProfilePicture(props: Props) {
|
|||||||
if (props.userId) {
|
if (props.userId) {
|
||||||
return (
|
return (
|
||||||
<ProfilePopover
|
<ProfilePopover
|
||||||
triggerComponentClass={classNames('status-wrapper', props.wrapperClass)}
|
triggerComponentClass={classNames('status-wrapper style--none', props.wrapperClass)}
|
||||||
userId={props.userId}
|
userId={props.userId}
|
||||||
src={profileSrc}
|
src={profileSrc}
|
||||||
username={props.username}
|
username={props.username}
|
||||||
@@ -51,12 +50,14 @@ function ProfilePicture(props: Props) {
|
|||||||
overwriteIcon={props.overwriteIcon}
|
overwriteIcon={props.overwriteIcon}
|
||||||
overwriteName={props.overwriteName}
|
overwriteName={props.overwriteName}
|
||||||
fromWebhook={props.fromWebhook}
|
fromWebhook={props.fromWebhook}
|
||||||
|
triggerComponentAs='button'
|
||||||
|
triggerComponentStyle={{
|
||||||
|
borderRadius: '50%',
|
||||||
|
width: `${getAvatarWidth(props?.size ?? 'md')}px`,
|
||||||
|
height: `${getAvatarWidth(props?.size ?? 'md')}px`,
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<>
|
<>
|
||||||
<RoundButton
|
|
||||||
className='style--none'
|
|
||||||
size={props?.size ?? 'md'}
|
|
||||||
>
|
|
||||||
<span className={profileIconClass}>
|
<span className={profileIconClass}>
|
||||||
<Avatar
|
<Avatar
|
||||||
username={props.username}
|
username={props.username}
|
||||||
@@ -64,7 +65,6 @@ function ProfilePicture(props: Props) {
|
|||||||
url={props.src}
|
url={props.src}
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</RoundButton>
|
|
||||||
<StatusIcon status={props.status}/>
|
<StatusIcon status={props.status}/>
|
||||||
</>
|
</>
|
||||||
</ProfilePopover>
|
</ProfilePopover>
|
||||||
@@ -93,10 +93,4 @@ function ProfilePicture(props: Props) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const RoundButton = styled.button<{size: TAvatarSizeToken}>`
|
|
||||||
border-radius: 50%;
|
|
||||||
width: ${(p) => getAvatarWidth(p.size)}px;
|
|
||||||
height: ${(p) => getAvatarWidth(p.size)}px;
|
|
||||||
`;
|
|
||||||
|
|
||||||
export default ProfilePicture;
|
export default ProfilePicture;
|
||||||
|
|||||||
@@ -21,6 +21,15 @@ del .group-mention-link:focus {
|
|||||||
color: variables.$white;
|
color: variables.$white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mention-link {
|
||||||
|
color: var(--link-color);
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:focus {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.badge {
|
.badge {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
min-width: 10px;
|
min-width: 10px;
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user