mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-14 10:04:38 +00:00
Merge pull request #20405 from overleaf/dp-fix-empty-state-position
Fix positioning of review panel empty state GitOrigin-RevId: d1c93e1a8bef59ad68e9f3e62106a949b7f9efdd
This commit is contained in:
parent
8ca24b104b
commit
08a6caab80
2 changed files with 38 additions and 37 deletions
services/web/frontend
js/features/review-panel-new/components
stylesheets/app/editor
|
@ -237,45 +237,47 @@ const ReviewPanelCurrentFile: FC = () => {
|
|||
}
|
||||
|
||||
return (
|
||||
<div ref={handleContainer}>
|
||||
{addCommentEntries.map(entry => {
|
||||
const { id, from, to, value, top } = entry
|
||||
return (
|
||||
<ReviewPanelAddComment
|
||||
key={id}
|
||||
from={from}
|
||||
to={to}
|
||||
value={value}
|
||||
top={top}
|
||||
/>
|
||||
)
|
||||
})}
|
||||
|
||||
<>
|
||||
{showEmptyState && <ReviewPanelEmptyState />}
|
||||
|
||||
{aggregatedRanges.changes.map(
|
||||
change =>
|
||||
positions.has(change.id) && (
|
||||
<ReviewPanelChange
|
||||
key={change.id}
|
||||
change={change}
|
||||
top={positions.get(change.id)}
|
||||
aggregate={aggregatedRanges.aggregates.get(change.id)}
|
||||
<div ref={handleContainer}>
|
||||
{addCommentEntries.map(entry => {
|
||||
const { id, from, to, value, top } = entry
|
||||
return (
|
||||
<ReviewPanelAddComment
|
||||
key={id}
|
||||
from={from}
|
||||
to={to}
|
||||
value={value}
|
||||
top={top}
|
||||
/>
|
||||
)
|
||||
)}
|
||||
})}
|
||||
|
||||
{aggregatedRanges.comments.map(
|
||||
comment =>
|
||||
positions.has(comment.id) && (
|
||||
<ReviewPanelComment
|
||||
key={comment.id}
|
||||
comment={comment}
|
||||
top={positions.get(comment.id)}
|
||||
/>
|
||||
)
|
||||
)}
|
||||
</div>
|
||||
{aggregatedRanges.changes.map(
|
||||
change =>
|
||||
positions.has(change.id) && (
|
||||
<ReviewPanelChange
|
||||
key={change.id}
|
||||
change={change}
|
||||
top={positions.get(change.id)}
|
||||
aggregate={aggregatedRanges.aggregates.get(change.id)}
|
||||
/>
|
||||
)
|
||||
)}
|
||||
|
||||
{aggregatedRanges.comments.map(
|
||||
comment =>
|
||||
positions.has(comment.id) && (
|
||||
<ReviewPanelComment
|
||||
key={comment.id}
|
||||
comment={comment}
|
||||
top={positions.get(comment.id)}
|
||||
/>
|
||||
)
|
||||
)}
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -350,11 +350,10 @@
|
|||
}
|
||||
|
||||
.review-panel-empty-state {
|
||||
position: absolute;
|
||||
position: fixed;
|
||||
width: var(--review-panel-width);
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue