Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Make right as default tooltip placement
Browse files Browse the repository at this point in the history
  • Loading branch information
florianduros committed Apr 29, 2024
1 parent b16b717 commit 0a6e875
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/components/views/elements/AccessibleButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ const AccessibleButton = forwardRef(function <T extends keyof JSX.IntrinsicEleme
triggerOnMouseDown,
title,
caption,
placement,
placement = "right",
onTooltipOpenChange,
...restProps
}: Props<T>,
Expand Down
1 change: 0 additions & 1 deletion src/components/views/elements/CopyableText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ const CopyableText: React.FC<IProps> = ({ children, getTextToCopy, border = true
onTooltipOpenChange={(open) => {
if (!open) onHideTooltip();
}}
placement="right"
/>
</div>
);
Expand Down
6 changes: 0 additions & 6 deletions src/components/views/elements/ImageView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -517,15 +517,13 @@ export default class ImageView extends React.Component<IProps, IState> {
className="mx_ImageView_button mx_ImageView_button_zoomOut"
title={_t("action|zoom_out")}
onClick={this.onZoomOutClick}
placement="right"
/>
);
const zoomInButton = (
<AccessibleButton
className="mx_ImageView_button mx_ImageView_button_zoomIn"
title={_t("action|zoom_in")}
onClick={this.onZoomInClick}
placement="right"
/>
);

Expand Down Expand Up @@ -559,26 +557,22 @@ export default class ImageView extends React.Component<IProps, IState> {
className="mx_ImageView_button mx_ImageView_button_rotateCCW"
title={_t("lightbox|rotate_left")}
onClick={this.onRotateCounterClockwiseClick}
placement="right"
/>
<AccessibleButton
className="mx_ImageView_button mx_ImageView_button_rotateCW"
title={_t("lightbox|rotate_right")}
onClick={this.onRotateClockwiseClick}
placement="right"
/>
<AccessibleButton
className="mx_ImageView_button mx_ImageView_button_download"
title={_t("action|download")}
onClick={this.onDownloadClick}
placement="right"
/>
{contextMenuButton}
<AccessibleButton
className="mx_ImageView_button mx_ImageView_button_close"
title={_t("action|close")}
onClick={this.props.onFinished}
placement="right"
/>
{this.renderContextMenu()}
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/elements/SSOButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ const SSOButton: React.FC<ISSOButtonProps> = ({
if (mini) {
// TODO fallback icon
return (
<AccessibleButton {...props} title={label} className={classes} onClick={onClick} placement="right">
<AccessibleButton {...props} title={label} className={classes} onClick={onClick}>
{icon}
</AccessibleButton>
);
Expand Down
1 change: 0 additions & 1 deletion src/components/views/elements/ToggleSwitch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ export default ({ checked, disabled = false, onChange, title, tooltip, ...props
aria-checked={checked}
aria-disabled={disabled}
title={tooltip}
placement="right"
>
<div className="mx_ToggleSwitch_ball" />
</AccessibleButton>
Expand Down

0 comments on commit 0a6e875

Please sign in to comment.