Merge pull request #16278 from overleaf/ii-ide-page-prototype-review-panel-entry-hover

[web] Remove entry hover from review panel

GitOrigin-RevId: 6bcfb28e20d7a8826301c34499340b6a7d2745db
This commit is contained in:
ilkin-overleaf 2024-01-03 13:14:13 +02:00 committed by Copybot
parent 4fb2cbdf15
commit 20485b886f
5 changed files with 4 additions and 23 deletions

View file

@ -1153,7 +1153,6 @@ function useReviewPanelState(): ReviewPanelStateReactIde {
]
)
const [entryHover, setEntryHover] = useState(false)
const [isAddingComment, setIsAddingComment] = useState(false)
const [navHeight, setNavHeight] = useState(0)
const [toolbarHeight, setToolbarHeight] = useState(0)
@ -1503,7 +1502,6 @@ function useReviewPanelState(): ReviewPanelStateReactIde {
collapsed,
commentThreads,
entries,
entryHover,
isAddingComment,
loadingThreads,
nVisibleSelectedChanges,
@ -1531,7 +1529,6 @@ function useReviewPanelState(): ReviewPanelStateReactIde {
collapsed,
commentThreads,
entries,
entryHover,
isAddingComment,
loadingThreads,
nVisibleSelectedChanges,
@ -1578,7 +1575,6 @@ function useReviewPanelState(): ReviewPanelStateReactIde {
toggleTrackChangesForEveryone,
toggleTrackChangesForUser,
toggleTrackChangesForGuests,
setEntryHover,
setCollapsed,
setShouldCollapse,
setIsAddingComment,
@ -1607,7 +1603,6 @@ function useReviewPanelState(): ReviewPanelStateReactIde {
toggleTrackChangesForUser,
toggleTrackChangesForGuests,
setCollapsed,
setEntryHover,
setShouldCollapse,
setIsAddingComment,
setNavHeight,

View file

@ -4,14 +4,13 @@ const reviewPanelClasses = ['ol-cm-review-panel']
type ContainerProps = {
children?: React.ReactNode
classNames?: Record<string, boolean>
style?: React.CSSProperties
className?: string
}
function Container({ children, classNames, ...rest }: ContainerProps) {
function Container({ children, className, ...rest }: ContainerProps) {
return (
<div
className={classnames(...reviewPanelClasses, classNames)}
className={classnames(...reviewPanelClasses, className)}
{...rest}
data-testid="review-panel"
>

View file

@ -29,7 +29,6 @@ function CurrentFileContainer() {
permissions,
loadingThreads,
users,
entryHover,
nVisibleSelectedChanges: nChanges,
} = useReviewPanelValueContext()
const contentHeight = useCodeMirrorContentHeight()
@ -44,12 +43,7 @@ function CurrentFileContainer() {
}, [currentDocEntries])
return (
<Container
classNames={{
'rp-collapsed-displaying-entry': entryHover,
'rp-current-file-container': true,
}}
>
<Container className="rp-current-file-container">
<div className="review-panel-tools">
<Toolbar />
<Nav />

View file

@ -149,7 +149,6 @@ function useAngularReviewPanelState(): ReviewPanelState {
[submitReplyAngular]
)
const [entryHover, setEntryHover] = useState(false)
const [isAddingComment, setIsAddingComment] = useState(false)
const [navHeight, setNavHeight] = useState(0)
const [toolbarHeight, setToolbarHeight] = useState(0)
@ -161,7 +160,6 @@ function useAngularReviewPanelState(): ReviewPanelState {
collapsed,
commentThreads,
entries,
entryHover,
isAddingComment,
loadingThreads,
nVisibleSelectedChanges,
@ -189,7 +187,6 @@ function useAngularReviewPanelState(): ReviewPanelState {
collapsed,
commentThreads,
entries,
entryHover,
isAddingComment,
loadingThreads,
nVisibleSelectedChanges,
@ -236,7 +233,6 @@ function useAngularReviewPanelState(): ReviewPanelState {
toggleTrackChangesForEveryone,
toggleTrackChangesForUser,
toggleTrackChangesForGuests,
setEntryHover,
setCollapsed,
setShouldCollapse,
setIsAddingComment,
@ -265,7 +261,6 @@ function useAngularReviewPanelState(): ReviewPanelState {
toggleTrackChangesForUser,
toggleTrackChangesForGuests,
setCollapsed,
setEntryHover,
setShouldCollapse,
setIsAddingComment,
setNavHeight,

View file

@ -18,7 +18,6 @@ export interface ReviewPanelState {
collapsed: Record<DocId, boolean>
commentThreads: ReviewPanelCommentThreads
entries: ReviewPanelEntries
entryHover: boolean
isAddingComment: boolean
loadingThreads: boolean
nVisibleSelectedChanges: number
@ -78,7 +77,6 @@ export interface ReviewPanelState {
void | ReviewPanelDocEntries[]
>
submitNewComment: (content: string) => void
setEntryHover: React.Dispatch<React.SetStateAction<Value<'entryHover'>>>
setIsAddingComment: React.Dispatch<
React.SetStateAction<Value<'isAddingComment'>>
>