mirror of https://github.com/vector-im/riot-web
Use Compound tooltips on MessageTimestamp to improve UX of date time discovery (#11732)
* Use Compound tooltips on MessageTimestamp to improve UX of date time discovery Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update snapshot Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update snapshot Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>pull/28788/head^2
parent
27bb67bac5
commit
4605fd7396
|
@ -16,6 +16,7 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
import { Tooltip } from "@vector-im/compound-web";
|
||||||
|
|
||||||
import { formatFullDate, formatTime, formatFullTime, formatRelativeTime } from "../../../DateUtils";
|
import { formatFullDate, formatTime, formatFullTime, formatRelativeTime } from "../../../DateUtils";
|
||||||
|
|
||||||
|
@ -42,14 +43,11 @@ export default class MessageTimestamp extends React.Component<IProps> {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<span
|
<Tooltip label={formatFullDate(date, this.props.showTwelveHour)}>
|
||||||
className="mx_MessageTimestamp"
|
<span className="mx_MessageTimestamp" aria-hidden={true} aria-live="off">
|
||||||
title={formatFullDate(date, this.props.showTwelveHour)}
|
{timestamp}
|
||||||
aria-hidden={true}
|
</span>
|
||||||
aria-live="off"
|
</Tooltip>
|
||||||
>
|
|
||||||
{timestamp}
|
|
||||||
</span>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue