mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
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:
parent
7c613cdceb
commit
ef90950cd3
3 changed files with 22 additions and 14 deletions
|
@ -29,6 +29,7 @@ import {
|
||||||
} from '../context/ranges-context'
|
} from '../context/ranges-context'
|
||||||
import { isInsertOperation } from '@/utils/operations'
|
import { isInsertOperation } from '@/utils/operations'
|
||||||
import { isCursorNearViewportEdge } from '@/features/source-editor/utils/is-cursor-near-edge'
|
import { isCursorNearViewportEdge } from '@/features/source-editor/utils/is-cursor-near-edge'
|
||||||
|
import OLTooltip from '@/features/ui/components/ol/ol-tooltip'
|
||||||
|
|
||||||
const ReviewTooltipMenu: FC = () => {
|
const ReviewTooltipMenu: FC = () => {
|
||||||
const state = useCodeMirrorStateContext()
|
const state = useCodeMirrorStateContext()
|
||||||
|
@ -129,18 +130,23 @@ const ReviewTooltipMenuContent: FC<{
|
||||||
{showChangesButtons && (
|
{showChangesButtons && (
|
||||||
<>
|
<>
|
||||||
<div className="review-tooltip-menu-divider" />
|
<div className="review-tooltip-menu-divider" />
|
||||||
<button
|
<OLTooltip id="accept-all-changes" description={t('accept_all')}>
|
||||||
className="review-tooltip-menu-button"
|
<button
|
||||||
onClick={acceptChangesHandler}
|
className="review-tooltip-menu-button"
|
||||||
>
|
onClick={acceptChangesHandler}
|
||||||
<MaterialIcon type="check" />
|
>
|
||||||
</button>
|
<MaterialIcon type="check" />
|
||||||
<button
|
</button>
|
||||||
className="review-tooltip-menu-button"
|
</OLTooltip>
|
||||||
onClick={rejectChangesHandler}
|
|
||||||
>
|
<OLTooltip id="reject-all-changes" description={t('reject_all')}>
|
||||||
<MaterialIcon type="clear" />
|
<button
|
||||||
</button>
|
className="review-tooltip-menu-button"
|
||||||
|
onClick={rejectChangesHandler}
|
||||||
|
>
|
||||||
|
<MaterialIcon type="clear" />
|
||||||
|
</button>
|
||||||
|
</OLTooltip>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -621,10 +621,11 @@
|
||||||
|
|
||||||
.review-panel-entry-hover {
|
.review-panel-entry-hover {
|
||||||
.review-panel-entry-content {
|
.review-panel-entry-content {
|
||||||
display: initial;
|
display: flex;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: -200px;
|
left: -200px;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
padding: @spacing-04;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -612,10 +612,11 @@
|
||||||
|
|
||||||
.review-panel-entry-hover {
|
.review-panel-entry-hover {
|
||||||
.review-panel-entry-content {
|
.review-panel-entry-content {
|
||||||
display: initial;
|
display: flex;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: -200px;
|
left: -200px;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
padding: var(--spacing-04);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue