Upgrade to latest compound-web package (#84)

* Upgrade to latest compound-web package

* Use a custom render function for jest tests

This way we don't need to manually wrap our components with
<TooltipProvider>

* Pin wrap-ansi to fix broken yarn install

* Add playwright helper to find tooltip from element

and use it in the failing test

* Exclude floating-ui divs/spans from axe testing

This is rendered outside .MatrixChat by compound and contains all the
tooltips.

* Wrap outermost components with TooltipProvider

* Remove onChange and use onSelect for toggle

* Fix jest tests and update snapshots

* Use vector-im/matrix-wysiwig

---------

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
R Midhun Suresh 2024-10-14 21:41:58 +05:30 committed by GitHub
parent 3bc0439fd2
commit 91e84f7951
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
389 changed files with 1261 additions and 1084 deletions

View file

@ -25,6 +25,7 @@ exports[`<PinnedEventTile /> should render pinned event 1`] = `
class="mx_PinnedEventTile_top"
>
<span
aria-labelledby="floating-ui-1"
class="mx_PinnedEventTile_sender mx_Username_color2"
>
@alice:server.org
@ -100,6 +101,7 @@ exports[`<PinnedEventTile /> should render pinned event with thread info 1`] = `
class="mx_PinnedEventTile_top"
>
<span
aria-labelledby="floating-ui-6"
class="mx_PinnedEventTile_sender mx_Username_color2"
>
@alice:server.org
@ -194,7 +196,7 @@ exports[`<PinnedEventTile /> should render the menu with all the options 1`] = `
tabindex="-1"
>
<button
class="_item_1gwvj_17 _interactive_1gwvj_36"
class="_item_8j2l6_17 _interactive_8j2l6_35"
data-kind="primary"
data-orientation="vertical"
data-radix-collection-item=""
@ -203,7 +205,7 @@ exports[`<PinnedEventTile /> should render the menu with all the options 1`] = `
>
<svg
aria-hidden="true"
class="_icon_1gwvj_44"
class="_icon_8j2l6_43"
fill="currentColor"
height="24"
viewBox="0 0 24 24"
@ -215,13 +217,13 @@ exports[`<PinnedEventTile /> should render the menu with all the options 1`] = `
/>
</svg>
<span
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 _label_1gwvj_53"
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 _label_8j2l6_52"
>
View in timeline
</span>
<svg
aria-hidden="true"
class="_nav-hint_1gwvj_60"
class="_nav-hint_8j2l6_59"
fill="currentColor"
height="24"
viewBox="8 0 8 24"
@ -234,7 +236,7 @@ exports[`<PinnedEventTile /> should render the menu with all the options 1`] = `
</svg>
</button>
<button
class="_item_1gwvj_17 _interactive_1gwvj_36"
class="_item_8j2l6_17 _interactive_8j2l6_35"
data-kind="primary"
data-orientation="vertical"
data-radix-collection-item=""
@ -243,7 +245,7 @@ exports[`<PinnedEventTile /> should render the menu with all the options 1`] = `
>
<svg
aria-hidden="true"
class="_icon_1gwvj_44"
class="_icon_8j2l6_43"
fill="currentColor"
height="24"
viewBox="0 0 24 24"
@ -260,13 +262,13 @@ exports[`<PinnedEventTile /> should render the menu with all the options 1`] = `
/>
</svg>
<span
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 _label_1gwvj_53"
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 _label_8j2l6_52"
>
Unpin
</span>
<svg
aria-hidden="true"
class="_nav-hint_1gwvj_60"
class="_nav-hint_8j2l6_59"
fill="currentColor"
height="24"
viewBox="8 0 8 24"
@ -279,7 +281,7 @@ exports[`<PinnedEventTile /> should render the menu with all the options 1`] = `
</svg>
</button>
<button
class="_item_1gwvj_17 _interactive_1gwvj_36"
class="_item_8j2l6_17 _interactive_8j2l6_35"
data-kind="primary"
data-orientation="vertical"
data-radix-collection-item=""
@ -288,7 +290,7 @@ exports[`<PinnedEventTile /> should render the menu with all the options 1`] = `
>
<svg
aria-hidden="true"
class="_icon_1gwvj_44"
class="_icon_8j2l6_43"
fill="currentColor"
height="24"
viewBox="0 0 24 24"
@ -300,13 +302,13 @@ exports[`<PinnedEventTile /> should render the menu with all the options 1`] = `
/>
</svg>
<span
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 _label_1gwvj_53"
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 _label_8j2l6_52"
>
Forward
</span>
<svg
aria-hidden="true"
class="_nav-hint_1gwvj_60"
class="_nav-hint_8j2l6_59"
fill="currentColor"
height="24"
viewBox="8 0 8 24"
@ -325,7 +327,7 @@ exports[`<PinnedEventTile /> should render the menu with all the options 1`] = `
role="separator"
/>
<button
class="_item_1gwvj_17 _interactive_1gwvj_36"
class="_item_8j2l6_17 _interactive_8j2l6_35"
data-kind="critical"
data-orientation="vertical"
data-radix-collection-item=""
@ -334,7 +336,7 @@ exports[`<PinnedEventTile /> should render the menu with all the options 1`] = `
>
<svg
aria-hidden="true"
class="_icon_1gwvj_44"
class="_icon_8j2l6_43"
fill="currentColor"
height="24"
viewBox="0 0 24 24"
@ -346,13 +348,13 @@ exports[`<PinnedEventTile /> should render the menu with all the options 1`] = `
/>
</svg>
<span
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 _label_1gwvj_53"
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 _label_8j2l6_52"
>
Delete
</span>
<svg
aria-hidden="true"
class="_nav-hint_1gwvj_60"
class="_nav-hint_8j2l6_59"
fill="currentColor"
height="24"
viewBox="8 0 8 24"
@ -385,7 +387,7 @@ exports[`<PinnedEventTile /> should render the menu without unpin and delete 1`]
tabindex="-1"
>
<button
class="_item_1gwvj_17 _interactive_1gwvj_36"
class="_item_8j2l6_17 _interactive_8j2l6_35"
data-kind="primary"
data-orientation="vertical"
data-radix-collection-item=""
@ -394,7 +396,7 @@ exports[`<PinnedEventTile /> should render the menu without unpin and delete 1`]
>
<svg
aria-hidden="true"
class="_icon_1gwvj_44"
class="_icon_8j2l6_43"
fill="currentColor"
height="24"
viewBox="0 0 24 24"
@ -406,13 +408,13 @@ exports[`<PinnedEventTile /> should render the menu without unpin and delete 1`]
/>
</svg>
<span
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 _label_1gwvj_53"
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 _label_8j2l6_52"
>
View in timeline
</span>
<svg
aria-hidden="true"
class="_nav-hint_1gwvj_60"
class="_nav-hint_8j2l6_59"
fill="currentColor"
height="24"
viewBox="8 0 8 24"
@ -425,7 +427,7 @@ exports[`<PinnedEventTile /> should render the menu without unpin and delete 1`]
</svg>
</button>
<button
class="_item_1gwvj_17 _interactive_1gwvj_36"
class="_item_8j2l6_17 _interactive_8j2l6_35"
data-kind="primary"
data-orientation="vertical"
data-radix-collection-item=""
@ -434,7 +436,7 @@ exports[`<PinnedEventTile /> should render the menu without unpin and delete 1`]
>
<svg
aria-hidden="true"
class="_icon_1gwvj_44"
class="_icon_8j2l6_43"
fill="currentColor"
height="24"
viewBox="0 0 24 24"
@ -446,13 +448,13 @@ exports[`<PinnedEventTile /> should render the menu without unpin and delete 1`]
/>
</svg>
<span
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 _label_1gwvj_53"
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 _label_8j2l6_52"
>
Forward
</span>
<svg
aria-hidden="true"
class="_nav-hint_1gwvj_60"
class="_nav-hint_8j2l6_59"
fill="currentColor"
height="24"
viewBox="8 0 8 24"