Don't bother showing redundant tooltip on space menu (#11276)
parent
a62b1d1bec
commit
34532fbdd4
|
@ -45,7 +45,13 @@ import {
|
||||||
showCreateNewSubspace,
|
showCreateNewSubspace,
|
||||||
showSpaceInvite,
|
showSpaceInvite,
|
||||||
} from "../../../utils/space";
|
} from "../../../utils/space";
|
||||||
import { ChevronFace, ContextMenuTooltipButton, useContextMenu, MenuProps } from "../../structures/ContextMenu";
|
import {
|
||||||
|
ChevronFace,
|
||||||
|
ContextMenuTooltipButton,
|
||||||
|
useContextMenu,
|
||||||
|
MenuProps,
|
||||||
|
ContextMenuButton,
|
||||||
|
} from "../../structures/ContextMenu";
|
||||||
import { BetaPill } from "../beta/BetaCard";
|
import { BetaPill } from "../beta/BetaCard";
|
||||||
import IconizedContextMenu, {
|
import IconizedContextMenu, {
|
||||||
IconizedContextMenuOption,
|
IconizedContextMenuOption,
|
||||||
|
@ -390,21 +396,24 @@ const RoomListHeader: React.FC<IProps> = ({ onVisibilityChange }) => {
|
||||||
|
|
||||||
let contextMenuButton: JSX.Element = <div className="mx_RoomListHeader_contextLessTitle">{title}</div>;
|
let contextMenuButton: JSX.Element = <div className="mx_RoomListHeader_contextLessTitle">{title}</div>;
|
||||||
if (canShowMainMenu) {
|
if (canShowMainMenu) {
|
||||||
|
const commonProps = {
|
||||||
|
inputRef: mainMenuHandle,
|
||||||
|
onClick: openMainMenu,
|
||||||
|
isExpanded: mainMenuDisplayed,
|
||||||
|
className: "mx_RoomListHeader_contextMenuButton",
|
||||||
|
children: title,
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!!activeSpace) {
|
||||||
contextMenuButton = (
|
contextMenuButton = (
|
||||||
<ContextMenuTooltipButton
|
<ContextMenuButton
|
||||||
inputRef={mainMenuHandle}
|
{...commonProps}
|
||||||
onClick={openMainMenu}
|
label={_t("%(spaceName)s menu", { spaceName: spaceName ?? activeSpace.name })}
|
||||||
isExpanded={mainMenuDisplayed}
|
/>
|
||||||
className="mx_RoomListHeader_contextMenuButton"
|
|
||||||
title={
|
|
||||||
activeSpace
|
|
||||||
? _t("%(spaceName)s menu", { spaceName: spaceName ?? activeSpace.name })
|
|
||||||
: _t("Home options")
|
|
||||||
}
|
|
||||||
>
|
|
||||||
{title}
|
|
||||||
</ContextMenuTooltipButton>
|
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
contextMenuButton = <ContextMenuTooltipButton {...commonProps} title={_t("Home options")} />;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in New Issue