mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 20:03:43 -05:00
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:
parent
4fb2cbdf15
commit
20485b886f
5 changed files with 4 additions and 23 deletions
|
@ -1153,7 +1153,6 @@ function useReviewPanelState(): ReviewPanelStateReactIde {
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
const [entryHover, setEntryHover] = useState(false)
|
|
||||||
const [isAddingComment, setIsAddingComment] = useState(false)
|
const [isAddingComment, setIsAddingComment] = useState(false)
|
||||||
const [navHeight, setNavHeight] = useState(0)
|
const [navHeight, setNavHeight] = useState(0)
|
||||||
const [toolbarHeight, setToolbarHeight] = useState(0)
|
const [toolbarHeight, setToolbarHeight] = useState(0)
|
||||||
|
@ -1503,7 +1502,6 @@ function useReviewPanelState(): ReviewPanelStateReactIde {
|
||||||
collapsed,
|
collapsed,
|
||||||
commentThreads,
|
commentThreads,
|
||||||
entries,
|
entries,
|
||||||
entryHover,
|
|
||||||
isAddingComment,
|
isAddingComment,
|
||||||
loadingThreads,
|
loadingThreads,
|
||||||
nVisibleSelectedChanges,
|
nVisibleSelectedChanges,
|
||||||
|
@ -1531,7 +1529,6 @@ function useReviewPanelState(): ReviewPanelStateReactIde {
|
||||||
collapsed,
|
collapsed,
|
||||||
commentThreads,
|
commentThreads,
|
||||||
entries,
|
entries,
|
||||||
entryHover,
|
|
||||||
isAddingComment,
|
isAddingComment,
|
||||||
loadingThreads,
|
loadingThreads,
|
||||||
nVisibleSelectedChanges,
|
nVisibleSelectedChanges,
|
||||||
|
@ -1578,7 +1575,6 @@ function useReviewPanelState(): ReviewPanelStateReactIde {
|
||||||
toggleTrackChangesForEveryone,
|
toggleTrackChangesForEveryone,
|
||||||
toggleTrackChangesForUser,
|
toggleTrackChangesForUser,
|
||||||
toggleTrackChangesForGuests,
|
toggleTrackChangesForGuests,
|
||||||
setEntryHover,
|
|
||||||
setCollapsed,
|
setCollapsed,
|
||||||
setShouldCollapse,
|
setShouldCollapse,
|
||||||
setIsAddingComment,
|
setIsAddingComment,
|
||||||
|
@ -1607,7 +1603,6 @@ function useReviewPanelState(): ReviewPanelStateReactIde {
|
||||||
toggleTrackChangesForUser,
|
toggleTrackChangesForUser,
|
||||||
toggleTrackChangesForGuests,
|
toggleTrackChangesForGuests,
|
||||||
setCollapsed,
|
setCollapsed,
|
||||||
setEntryHover,
|
|
||||||
setShouldCollapse,
|
setShouldCollapse,
|
||||||
setIsAddingComment,
|
setIsAddingComment,
|
||||||
setNavHeight,
|
setNavHeight,
|
||||||
|
|
|
@ -4,14 +4,13 @@ const reviewPanelClasses = ['ol-cm-review-panel']
|
||||||
|
|
||||||
type ContainerProps = {
|
type ContainerProps = {
|
||||||
children?: React.ReactNode
|
children?: React.ReactNode
|
||||||
classNames?: Record<string, boolean>
|
className?: string
|
||||||
style?: React.CSSProperties
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function Container({ children, classNames, ...rest }: ContainerProps) {
|
function Container({ children, className, ...rest }: ContainerProps) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={classnames(...reviewPanelClasses, classNames)}
|
className={classnames(...reviewPanelClasses, className)}
|
||||||
{...rest}
|
{...rest}
|
||||||
data-testid="review-panel"
|
data-testid="review-panel"
|
||||||
>
|
>
|
||||||
|
|
|
@ -29,7 +29,6 @@ function CurrentFileContainer() {
|
||||||
permissions,
|
permissions,
|
||||||
loadingThreads,
|
loadingThreads,
|
||||||
users,
|
users,
|
||||||
entryHover,
|
|
||||||
nVisibleSelectedChanges: nChanges,
|
nVisibleSelectedChanges: nChanges,
|
||||||
} = useReviewPanelValueContext()
|
} = useReviewPanelValueContext()
|
||||||
const contentHeight = useCodeMirrorContentHeight()
|
const contentHeight = useCodeMirrorContentHeight()
|
||||||
|
@ -44,12 +43,7 @@ function CurrentFileContainer() {
|
||||||
}, [currentDocEntries])
|
}, [currentDocEntries])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container
|
<Container className="rp-current-file-container">
|
||||||
classNames={{
|
|
||||||
'rp-collapsed-displaying-entry': entryHover,
|
|
||||||
'rp-current-file-container': true,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<div className="review-panel-tools">
|
<div className="review-panel-tools">
|
||||||
<Toolbar />
|
<Toolbar />
|
||||||
<Nav />
|
<Nav />
|
||||||
|
|
|
@ -149,7 +149,6 @@ function useAngularReviewPanelState(): ReviewPanelState {
|
||||||
[submitReplyAngular]
|
[submitReplyAngular]
|
||||||
)
|
)
|
||||||
|
|
||||||
const [entryHover, setEntryHover] = useState(false)
|
|
||||||
const [isAddingComment, setIsAddingComment] = useState(false)
|
const [isAddingComment, setIsAddingComment] = useState(false)
|
||||||
const [navHeight, setNavHeight] = useState(0)
|
const [navHeight, setNavHeight] = useState(0)
|
||||||
const [toolbarHeight, setToolbarHeight] = useState(0)
|
const [toolbarHeight, setToolbarHeight] = useState(0)
|
||||||
|
@ -161,7 +160,6 @@ function useAngularReviewPanelState(): ReviewPanelState {
|
||||||
collapsed,
|
collapsed,
|
||||||
commentThreads,
|
commentThreads,
|
||||||
entries,
|
entries,
|
||||||
entryHover,
|
|
||||||
isAddingComment,
|
isAddingComment,
|
||||||
loadingThreads,
|
loadingThreads,
|
||||||
nVisibleSelectedChanges,
|
nVisibleSelectedChanges,
|
||||||
|
@ -189,7 +187,6 @@ function useAngularReviewPanelState(): ReviewPanelState {
|
||||||
collapsed,
|
collapsed,
|
||||||
commentThreads,
|
commentThreads,
|
||||||
entries,
|
entries,
|
||||||
entryHover,
|
|
||||||
isAddingComment,
|
isAddingComment,
|
||||||
loadingThreads,
|
loadingThreads,
|
||||||
nVisibleSelectedChanges,
|
nVisibleSelectedChanges,
|
||||||
|
@ -236,7 +233,6 @@ function useAngularReviewPanelState(): ReviewPanelState {
|
||||||
toggleTrackChangesForEveryone,
|
toggleTrackChangesForEveryone,
|
||||||
toggleTrackChangesForUser,
|
toggleTrackChangesForUser,
|
||||||
toggleTrackChangesForGuests,
|
toggleTrackChangesForGuests,
|
||||||
setEntryHover,
|
|
||||||
setCollapsed,
|
setCollapsed,
|
||||||
setShouldCollapse,
|
setShouldCollapse,
|
||||||
setIsAddingComment,
|
setIsAddingComment,
|
||||||
|
@ -265,7 +261,6 @@ function useAngularReviewPanelState(): ReviewPanelState {
|
||||||
toggleTrackChangesForUser,
|
toggleTrackChangesForUser,
|
||||||
toggleTrackChangesForGuests,
|
toggleTrackChangesForGuests,
|
||||||
setCollapsed,
|
setCollapsed,
|
||||||
setEntryHover,
|
|
||||||
setShouldCollapse,
|
setShouldCollapse,
|
||||||
setIsAddingComment,
|
setIsAddingComment,
|
||||||
setNavHeight,
|
setNavHeight,
|
||||||
|
|
|
@ -18,7 +18,6 @@ export interface ReviewPanelState {
|
||||||
collapsed: Record<DocId, boolean>
|
collapsed: Record<DocId, boolean>
|
||||||
commentThreads: ReviewPanelCommentThreads
|
commentThreads: ReviewPanelCommentThreads
|
||||||
entries: ReviewPanelEntries
|
entries: ReviewPanelEntries
|
||||||
entryHover: boolean
|
|
||||||
isAddingComment: boolean
|
isAddingComment: boolean
|
||||||
loadingThreads: boolean
|
loadingThreads: boolean
|
||||||
nVisibleSelectedChanges: number
|
nVisibleSelectedChanges: number
|
||||||
|
@ -78,7 +77,6 @@ export interface ReviewPanelState {
|
||||||
void | ReviewPanelDocEntries[]
|
void | ReviewPanelDocEntries[]
|
||||||
>
|
>
|
||||||
submitNewComment: (content: string) => void
|
submitNewComment: (content: string) => void
|
||||||
setEntryHover: React.Dispatch<React.SetStateAction<Value<'entryHover'>>>
|
|
||||||
setIsAddingComment: React.Dispatch<
|
setIsAddingComment: React.Dispatch<
|
||||||
React.SetStateAction<Value<'isAddingComment'>>
|
React.SetStateAction<Value<'isAddingComment'>>
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in a new issue