Fix AppTile context menu not always showing up when it has options (#11358)

* Fix AppTile context menu not always showing up when it has options

* Comment

* Update snapshots
This commit is contained in:
Michael Telatynski 2023-08-03 10:23:20 +01:00 committed by GitHub
parent 05b88d99ed
commit 755f8d7ab0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 41 additions and 1 deletions

View file

@ -134,8 +134,9 @@ export default class AppTile extends React.Component<IProps, IState> {
private dispatcherRef?: string; private dispatcherRef?: string;
private unmounted = false; private unmounted = false;
public constructor(props: IProps) { public constructor(props: IProps, context: ContextType<typeof MatrixClientContext>) {
super(props); super(props);
this.context = context; // XXX: workaround for lack of `declare` support on `public context!:` definition
// Tiles in miniMode are floating, and therefore not docked // Tiles in miniMode are floating, and therefore not docked
if (!this.props.miniMode) { if (!this.props.miniMode) {

View file

@ -139,6 +139,19 @@ exports[`AppTile for a pinned widget should render 1`] = `
class="mx_Icon mx_Icon_12" class="mx_Icon mx_Icon_12"
/> />
</div> </div>
<div
aria-expanded="false"
aria-haspopup="true"
aria-label="Options"
class="mx_AccessibleButton mx_AppTileMenuBar_widgets_button"
role="button"
tabindex="0"
title="Options"
>
<div
class="mx_Icon mx_Icon_12"
/>
</div>
</span> </span>
</div> </div>
<div <div
@ -201,6 +214,19 @@ exports[`AppTile for a pinned widget should render permission request 1`] = `
class="mx_Icon mx_Icon_12" class="mx_Icon mx_Icon_12"
/> />
</div> </div>
<div
aria-expanded="false"
aria-haspopup="true"
aria-label="Options"
class="mx_AccessibleButton mx_AppTileMenuBar_widgets_button"
role="button"
tabindex="0"
title="Options"
>
<div
class="mx_Icon mx_Icon_12"
/>
</div>
</span> </span>
</div> </div>
<div <div
@ -341,6 +367,19 @@ exports[`AppTile preserves non-persisted widget on container move 1`] = `
class="mx_Icon mx_Icon_12" class="mx_Icon mx_Icon_12"
/> />
</div> </div>
<div
aria-expanded="false"
aria-haspopup="true"
aria-label="Options"
class="mx_AccessibleButton mx_AppTileMenuBar_widgets_button"
role="button"
tabindex="0"
title="Options"
>
<div
class="mx_Icon mx_Icon_12"
/>
</div>
</span> </span>
</div> </div>
<div <div