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

Use Compound tooltips on MessageTimestamp to improve UX of date time discovery #11732

Merged
merged 4 commits into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions src/components/views/messages/MessageTimestamp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ limitations under the License.
*/

import React from "react";
import { Tooltip } from "@vector-im/compound-web";

import { formatFullDate, formatTime, formatFullTime, formatRelativeTime } from "../../../DateUtils";

Expand All @@ -42,14 +43,11 @@ export default class MessageTimestamp extends React.Component<IProps> {
}

return (
<span
className="mx_MessageTimestamp"
title={formatFullDate(date, this.props.showTwelveHour)}
aria-hidden={true}
aria-live="off"
>
{timestamp}
</span>
<Tooltip label={formatFullDate(date, this.props.showTwelveHour)}>
<span className="mx_MessageTimestamp" aria-hidden={true} aria-live="off">
{timestamp}
</span>
</Tooltip>
);
}
}
Loading
Loading