Skip to content
Snippets Groups Projects
Unverified Commit 94390fb5 authored by Maz Ameli's avatar Maz Ameli Committed by GitHub
Browse files

clean up revision history and add a tooltip (#23654)

parent 3caf7388
No related branches found
No related tags found
No related merge requests found
......@@ -2,8 +2,10 @@ import React, { useMemo } from "react";
import PropTypes from "prop-types";
import _ from "underscore";
import { getRelativeTime } from "metabase/lib/time";
import { t } from "ttag";
import Button from "metabase/core/components/Button";
import Tooltip from "metabase/components/Tooltip";
import {
TimelineContainer,
......@@ -87,13 +89,15 @@ function Timeline({
<ItemHeader>
{title}
{isRevertable && revertFn && (
<Button
icon="revert"
onlyIcon
borderless
onClick={() => revertFn(revision)}
data-testid="question-revert-button"
/>
<Tooltip tooltip={t`Revert to this version`}>
<Button
icon="revert"
onlyIcon
borderless
onClick={() => revertFn(revision)}
data-testid="question-revert-button"
/>
</Tooltip>
)}
</ItemHeader>
<Timestamp datetime={timestamp}>{formattedTimestamp}</Timestamp>
......
......@@ -16,7 +16,7 @@ export const TimelineItem = styled.li`
transform: translateX(-${props => props.leftShift}px);
white-space: pre-line;
width: 100%;
margin-bottom: 1rem;
margin-bottom: 1.5rem;
`;
export const ItemIcon = styled(Icon)`
......@@ -57,5 +57,4 @@ export const Border = styled.div`
top: ${props => props.borderShift}px;
left: ${props => props.borderShift}px;
bottom: calc(-1rem - ${props => props.borderShift}px);
border-left: 1px solid ${color("border")};
`;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment