Merge pull request #21439 from overleaf/dk-accept-reject-all-tooltip

Added tooltips to "Accept all" and "Reject all" options

GitOrigin-RevId: 62887e4e26964119cbb2c2aa140565c46aba94fe
This commit is contained in:
David 2024-10-28 15:39:02 +00:00 committed by Copybot
parent 7c613cdceb
commit ef90950cd3
3 changed files with 22 additions and 14 deletions

View file

@ -29,6 +29,7 @@ import {
} from '../context/ranges-context'
import { isInsertOperation } from '@/utils/operations'
import { isCursorNearViewportEdge } from '@/features/source-editor/utils/is-cursor-near-edge'
import OLTooltip from '@/features/ui/components/ol/ol-tooltip'
const ReviewTooltipMenu: FC = () => {
const state = useCodeMirrorStateContext()
@ -129,18 +130,23 @@ const ReviewTooltipMenuContent: FC<{
{showChangesButtons && (
<>
<div className="review-tooltip-menu-divider" />
<OLTooltip id="accept-all-changes" description={t('accept_all')}>
<button
className="review-tooltip-menu-button"
onClick={acceptChangesHandler}
>
<MaterialIcon type="check" />
</button>
</OLTooltip>
<OLTooltip id="reject-all-changes" description={t('reject_all')}>
<button
className="review-tooltip-menu-button"
onClick={rejectChangesHandler}
>
<MaterialIcon type="clear" />
</button>
</OLTooltip>
</>
)}
</div>

View file

@ -621,10 +621,11 @@
.review-panel-entry-hover {
.review-panel-entry-content {
display: initial;
display: flex;
position: absolute;
left: -200px;
top: 0;
padding: @spacing-04;
}
}

View file

@ -612,10 +612,11 @@
.review-panel-entry-hover {
.review-panel-entry-content {
display: initial;
display: flex;
position: absolute;
left: -200px;
top: 0;
padding: var(--spacing-04);
}
}