mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-23 06:10:25 +03:00
1e3320da1e
* Prevent sender name to overflow pinned event tile * Add tooltip to display the sender name
388 lines
11 KiB
Text
388 lines
11 KiB
Text
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`<PinnedEventTile /> should render pinned event 1`] = `
|
|
<div>
|
|
<div
|
|
class="mx_PinnedEventTile"
|
|
role="listitem"
|
|
>
|
|
<div>
|
|
<span
|
|
class="_avatar_mcap2_17 mx_BaseAvatar mx_PinnedEventTile_senderAvatar _avatar-imageless_mcap2_61"
|
|
data-color="2"
|
|
data-testid="avatar-img"
|
|
data-type="round"
|
|
role="presentation"
|
|
style="--cpd-avatar-size: 32px;"
|
|
>
|
|
a
|
|
</span>
|
|
</div>
|
|
<div
|
|
class="mx_PinnedEventTile_wrapper"
|
|
>
|
|
<div
|
|
class="mx_PinnedEventTile_top"
|
|
>
|
|
<span
|
|
class="mx_PinnedEventTile_sender mx_Username_color2"
|
|
>
|
|
@alice:server.org
|
|
</span>
|
|
<button
|
|
aria-disabled="false"
|
|
aria-expanded="false"
|
|
aria-haspopup="menu"
|
|
aria-label="Open menu"
|
|
class="_icon-button_bh2qc_17"
|
|
data-state="closed"
|
|
id="radix-0"
|
|
role="button"
|
|
style="--cpd-icon-button-size: 24px;"
|
|
tabindex="0"
|
|
type="button"
|
|
>
|
|
<div
|
|
class="_indicator-icon_133tf_26"
|
|
style="--cpd-icon-button-size: 100%;"
|
|
>
|
|
<div />
|
|
</div>
|
|
</button>
|
|
</div>
|
|
<div
|
|
class="mx_MTextBody mx_EventTile_content"
|
|
>
|
|
<div
|
|
class="mx_EventTile_body translate"
|
|
dir="auto"
|
|
>
|
|
First pinned message
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
`;
|
|
|
|
exports[`<PinnedEventTile /> should render pinned event with thread info 1`] = `
|
|
<div>
|
|
<div
|
|
class="mx_PinnedEventTile"
|
|
role="listitem"
|
|
>
|
|
<div>
|
|
<span
|
|
class="_avatar_mcap2_17 mx_BaseAvatar mx_PinnedEventTile_senderAvatar _avatar-imageless_mcap2_61"
|
|
data-color="2"
|
|
data-testid="avatar-img"
|
|
data-type="round"
|
|
role="presentation"
|
|
style="--cpd-avatar-size: 32px;"
|
|
>
|
|
a
|
|
</span>
|
|
</div>
|
|
<div
|
|
class="mx_PinnedEventTile_wrapper"
|
|
>
|
|
<div
|
|
class="mx_PinnedEventTile_top"
|
|
>
|
|
<span
|
|
class="mx_PinnedEventTile_sender mx_Username_color2"
|
|
>
|
|
@alice:server.org
|
|
</span>
|
|
<button
|
|
aria-disabled="false"
|
|
aria-expanded="false"
|
|
aria-haspopup="menu"
|
|
aria-label="Open menu"
|
|
class="_icon-button_bh2qc_17"
|
|
data-state="closed"
|
|
id="radix-2"
|
|
role="button"
|
|
style="--cpd-icon-button-size: 24px;"
|
|
tabindex="0"
|
|
type="button"
|
|
>
|
|
<div
|
|
class="_indicator-icon_133tf_26"
|
|
style="--cpd-icon-button-size: 100%;"
|
|
>
|
|
<div />
|
|
</div>
|
|
</button>
|
|
</div>
|
|
<div
|
|
class="mx_MTextBody mx_EventTile_content"
|
|
>
|
|
<div
|
|
class="mx_EventTile_body translate"
|
|
dir="auto"
|
|
>
|
|
First pinned message
|
|
</div>
|
|
</div>
|
|
<div
|
|
class="mx_PinnedEventTile_thread"
|
|
>
|
|
<div />
|
|
<span>
|
|
Reply to a
|
|
<button
|
|
type="button"
|
|
>
|
|
thread message
|
|
</button>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
`;
|
|
|
|
exports[`<PinnedEventTile /> should render the menu with all the options 1`] = `
|
|
<div
|
|
aria-label="Open menu"
|
|
aria-labelledby="radix-8"
|
|
aria-orientation="vertical"
|
|
class="_menu_1x5h1_17"
|
|
data-align="start"
|
|
data-orientation="vertical"
|
|
data-radix-menu-content=""
|
|
data-side="right"
|
|
data-state="open"
|
|
dir="ltr"
|
|
id="radix-9"
|
|
role="menu"
|
|
style="outline: none; --radix-dropdown-menu-content-transform-origin: var(--radix-popper-transform-origin); --radix-dropdown-menu-content-available-width: var(--radix-popper-available-width); --radix-dropdown-menu-content-available-height: var(--radix-popper-available-height); --radix-dropdown-menu-trigger-width: var(--radix-popper-anchor-width); --radix-dropdown-menu-trigger-height: var(--radix-popper-anchor-height); pointer-events: auto;"
|
|
tabindex="-1"
|
|
>
|
|
<button
|
|
class="_item_1gwvj_17 _interactive_1gwvj_36"
|
|
data-kind="primary"
|
|
data-orientation="vertical"
|
|
data-radix-collection-item=""
|
|
role="menuitem"
|
|
tabindex="-1"
|
|
>
|
|
<div
|
|
aria-hidden="true"
|
|
class="_icon_1gwvj_44"
|
|
height="24"
|
|
width="24"
|
|
/>
|
|
<span
|
|
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 _label_1gwvj_53"
|
|
>
|
|
View in timeline
|
|
</span>
|
|
<svg
|
|
aria-hidden="true"
|
|
class="_nav-hint_1gwvj_60"
|
|
fill="currentColor"
|
|
height="24"
|
|
viewBox="8 0 8 24"
|
|
width="8"
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
>
|
|
<path
|
|
d="M8.7 17.3a.948.948 0 0 1-.275-.7.95.95 0 0 1 .275-.7l3.9-3.9-3.9-3.9a.948.948 0 0 1-.275-.7.95.95 0 0 1 .275-.7.948.948 0 0 1 .7-.275.95.95 0 0 1 .7.275l4.6 4.6c.1.1.17.208.213.325.041.117.062.242.062.375s-.02.258-.063.375a.877.877 0 0 1-.212.325l-4.6 4.6a.948.948 0 0 1-.7.275.948.948 0 0 1-.7-.275Z"
|
|
/>
|
|
</svg>
|
|
</button>
|
|
<button
|
|
class="_item_1gwvj_17 _interactive_1gwvj_36"
|
|
data-kind="primary"
|
|
data-orientation="vertical"
|
|
data-radix-collection-item=""
|
|
role="menuitem"
|
|
tabindex="-1"
|
|
>
|
|
<div
|
|
aria-hidden="true"
|
|
class="_icon_1gwvj_44"
|
|
height="24"
|
|
width="24"
|
|
/>
|
|
<span
|
|
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 _label_1gwvj_53"
|
|
>
|
|
Unpin
|
|
</span>
|
|
<svg
|
|
aria-hidden="true"
|
|
class="_nav-hint_1gwvj_60"
|
|
fill="currentColor"
|
|
height="24"
|
|
viewBox="8 0 8 24"
|
|
width="8"
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
>
|
|
<path
|
|
d="M8.7 17.3a.948.948 0 0 1-.275-.7.95.95 0 0 1 .275-.7l3.9-3.9-3.9-3.9a.948.948 0 0 1-.275-.7.95.95 0 0 1 .275-.7.948.948 0 0 1 .7-.275.95.95 0 0 1 .7.275l4.6 4.6c.1.1.17.208.213.325.041.117.062.242.062.375s-.02.258-.063.375a.877.877 0 0 1-.212.325l-4.6 4.6a.948.948 0 0 1-.7.275.948.948 0 0 1-.7-.275Z"
|
|
/>
|
|
</svg>
|
|
</button>
|
|
<button
|
|
class="_item_1gwvj_17 _interactive_1gwvj_36"
|
|
data-kind="primary"
|
|
data-orientation="vertical"
|
|
data-radix-collection-item=""
|
|
role="menuitem"
|
|
tabindex="-1"
|
|
>
|
|
<div
|
|
aria-hidden="true"
|
|
class="_icon_1gwvj_44"
|
|
height="24"
|
|
width="24"
|
|
/>
|
|
<span
|
|
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 _label_1gwvj_53"
|
|
>
|
|
Forward
|
|
</span>
|
|
<svg
|
|
aria-hidden="true"
|
|
class="_nav-hint_1gwvj_60"
|
|
fill="currentColor"
|
|
height="24"
|
|
viewBox="8 0 8 24"
|
|
width="8"
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
>
|
|
<path
|
|
d="M8.7 17.3a.948.948 0 0 1-.275-.7.95.95 0 0 1 .275-.7l3.9-3.9-3.9-3.9a.948.948 0 0 1-.275-.7.95.95 0 0 1 .275-.7.948.948 0 0 1 .7-.275.95.95 0 0 1 .7.275l4.6 4.6c.1.1.17.208.213.325.041.117.062.242.062.375s-.02.258-.063.375a.877.877 0 0 1-.212.325l-4.6 4.6a.948.948 0 0 1-.7.275.948.948 0 0 1-.7-.275Z"
|
|
/>
|
|
</svg>
|
|
</button>
|
|
<div
|
|
class="_separator_144s5_17"
|
|
data-kind="primary"
|
|
data-orientation="horizontal"
|
|
role="separator"
|
|
/>
|
|
<button
|
|
class="_item_1gwvj_17 _interactive_1gwvj_36"
|
|
data-kind="critical"
|
|
data-orientation="vertical"
|
|
data-radix-collection-item=""
|
|
role="menuitem"
|
|
tabindex="-1"
|
|
>
|
|
<div
|
|
aria-hidden="true"
|
|
class="_icon_1gwvj_44"
|
|
height="24"
|
|
width="24"
|
|
/>
|
|
<span
|
|
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 _label_1gwvj_53"
|
|
>
|
|
Delete
|
|
</span>
|
|
<svg
|
|
aria-hidden="true"
|
|
class="_nav-hint_1gwvj_60"
|
|
fill="currentColor"
|
|
height="24"
|
|
viewBox="8 0 8 24"
|
|
width="8"
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
>
|
|
<path
|
|
d="M8.7 17.3a.948.948 0 0 1-.275-.7.95.95 0 0 1 .275-.7l3.9-3.9-3.9-3.9a.948.948 0 0 1-.275-.7.95.95 0 0 1 .275-.7.948.948 0 0 1 .7-.275.95.95 0 0 1 .7.275l4.6 4.6c.1.1.17.208.213.325.041.117.062.242.062.375s-.02.258-.063.375a.877.877 0 0 1-.212.325l-4.6 4.6a.948.948 0 0 1-.7.275.948.948 0 0 1-.7-.275Z"
|
|
/>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
`;
|
|
|
|
exports[`<PinnedEventTile /> should render the menu without unpin and delete 1`] = `
|
|
<div
|
|
aria-label="Open menu"
|
|
aria-labelledby="radix-4"
|
|
aria-orientation="vertical"
|
|
class="_menu_1x5h1_17"
|
|
data-align="start"
|
|
data-orientation="vertical"
|
|
data-radix-menu-content=""
|
|
data-side="right"
|
|
data-state="open"
|
|
dir="ltr"
|
|
id="radix-5"
|
|
role="menu"
|
|
style="outline: none; --radix-dropdown-menu-content-transform-origin: var(--radix-popper-transform-origin); --radix-dropdown-menu-content-available-width: var(--radix-popper-available-width); --radix-dropdown-menu-content-available-height: var(--radix-popper-available-height); --radix-dropdown-menu-trigger-width: var(--radix-popper-anchor-width); --radix-dropdown-menu-trigger-height: var(--radix-popper-anchor-height); pointer-events: auto;"
|
|
tabindex="-1"
|
|
>
|
|
<button
|
|
class="_item_1gwvj_17 _interactive_1gwvj_36"
|
|
data-kind="primary"
|
|
data-orientation="vertical"
|
|
data-radix-collection-item=""
|
|
role="menuitem"
|
|
tabindex="-1"
|
|
>
|
|
<div
|
|
aria-hidden="true"
|
|
class="_icon_1gwvj_44"
|
|
height="24"
|
|
width="24"
|
|
/>
|
|
<span
|
|
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 _label_1gwvj_53"
|
|
>
|
|
View in timeline
|
|
</span>
|
|
<svg
|
|
aria-hidden="true"
|
|
class="_nav-hint_1gwvj_60"
|
|
fill="currentColor"
|
|
height="24"
|
|
viewBox="8 0 8 24"
|
|
width="8"
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
>
|
|
<path
|
|
d="M8.7 17.3a.948.948 0 0 1-.275-.7.95.95 0 0 1 .275-.7l3.9-3.9-3.9-3.9a.948.948 0 0 1-.275-.7.95.95 0 0 1 .275-.7.948.948 0 0 1 .7-.275.95.95 0 0 1 .7.275l4.6 4.6c.1.1.17.208.213.325.041.117.062.242.062.375s-.02.258-.063.375a.877.877 0 0 1-.212.325l-4.6 4.6a.948.948 0 0 1-.7.275.948.948 0 0 1-.7-.275Z"
|
|
/>
|
|
</svg>
|
|
</button>
|
|
<button
|
|
class="_item_1gwvj_17 _interactive_1gwvj_36"
|
|
data-kind="primary"
|
|
data-orientation="vertical"
|
|
data-radix-collection-item=""
|
|
role="menuitem"
|
|
tabindex="-1"
|
|
>
|
|
<div
|
|
aria-hidden="true"
|
|
class="_icon_1gwvj_44"
|
|
height="24"
|
|
width="24"
|
|
/>
|
|
<span
|
|
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 _label_1gwvj_53"
|
|
>
|
|
Forward
|
|
</span>
|
|
<svg
|
|
aria-hidden="true"
|
|
class="_nav-hint_1gwvj_60"
|
|
fill="currentColor"
|
|
height="24"
|
|
viewBox="8 0 8 24"
|
|
width="8"
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
>
|
|
<path
|
|
d="M8.7 17.3a.948.948 0 0 1-.275-.7.95.95 0 0 1 .275-.7l3.9-3.9-3.9-3.9a.948.948 0 0 1-.275-.7.95.95 0 0 1 .275-.7.948.948 0 0 1 .7-.275.95.95 0 0 1 .7.275l4.6 4.6c.1.1.17.208.213.325.041.117.062.242.062.375s-.02.258-.063.375a.877.877 0 0 1-.212.325l-4.6 4.6a.948.948 0 0 1-.7.275.948.948 0 0 1-.7-.275Z"
|
|
/>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
`;
|