overleaf/services/web/frontend/stylesheets/app/editor
David a323f3af75 Implement a floating "Add comment" button for the redesigned review panel (#19891)
* Implement floating Add comment button

* Fix comment typo

* Remove unused imports

* Make tooltip always appear above cursor

Co-authored-by: Domagoj Kriskovic <dom.kriskovic@overleaf.com>

* Refactor how new comment form is positioned

* Add missing file

* Create new map when rendering positions

* Use codemirror state to manage ranges and allow for mutliple in-progress comments

* Memoise sorting

* Create new ranges map each time it is changed

* Add back mutation observer

* Only allow single tooltip

* Fix typo

* Convert state field to store a single tooltip

* Make add comment tooltip content a react component

* Refactor to remove usages of !important

* Use RangeSet to keep track of new comment ranges

* Fix logic broken in rebase

* Map ranges through document changes

* Add decorations for in-progress comments

* Use set-review-panel-open rather than an editor event to open review panel

* Implement new designs for add comment form

* Add padding to textarea

* Fix bug where comment was being submitted for incorrect range

* Add missing key to ReviewPanelAddComment

* Store new comment ranges as a DecorationSet

* Small refactor to how ReviewPanelAddCommens are rendered

* Make op prop to ReviewPanelEntry required

* Add handling for disabling of add comemnt form buttons

* Move viewer check inside AddCommentTooltip

* Ensure that add comment button doesn't reshow when collaborators edit the document

* Remove unneeded op check in ReviewPanelEntry

* Update services/web/frontend/js/features/review-panel-new/components/review-panel-add-comment.tsx

Co-authored-by: Domagoj Kriskovic <dom.kriskovic@overleaf.com>

---------

Co-authored-by: Domagoj Kriskovic <dom.kriskovic@overleaf.com>
GitOrigin-RevId: 3110845f6a557310f3bf72014689e2f2ab53e966
2024-09-17 08:04:58 +00:00
..
chat.less
compile-button.less Fix stripe alignment on Recompile button (#16643) 2024-01-24 09:04:11 +00:00
dictionary.less
error-boundary.less Add error boundary to the project dashboard list 2023-07-17 10:24:38 +00:00
figure-modal.less Merge pull request #17373 from overleaf/jpa-figure-modal-options 2024-03-06 17:27:32 +00:00
file-tree.less Fix image upload modal dropzone overflow (#20102) 2024-09-04 08:05:02 +00:00
file-view.less Add PDF file preview (#15503) 2023-11-06 09:03:59 +00:00
history-react.less Merge pull request #20233 from overleaf/mj-restore-promo 2024-09-09 08:05:01 +00:00
history-v2.less
history.less
hotkeys.less
ide-react.less Merge pull request #20300 from overleaf/mj-synctex-button-cursor 2024-09-06 08:05:39 +00:00
left-menu.less Merge pull request #18818 from overleaf/revert-18816-revert-18815-revert-18671-mj-left-modal 2024-06-11 08:04:30 +00:00
logs.less Merge pull request #17525 from overleaf/ae-upgrade-prettier 2024-03-26 09:04:05 +00:00
math-preview.less Merge pull request #20001 from overleaf/dp-math-preview-split-test-badge 2024-08-20 08:04:31 +00:00
online-users.less Merge pull request #20205 from overleaf/ii-bs5-ide-header 2024-09-04 08:06:00 +00:00
outline.less [ide-react] Improve file tree and outline components in the editor sidebar (#16225) 2023-12-18 09:03:53 +00:00
pdf.less Merge pull request #19390 from overleaf/dp-pdf-tools-teardown 2024-07-22 08:04:22 +00:00
publish-modal.less
publish-template.less
review-panel-new.less Implement a floating "Add comment" button for the redesigned review panel (#19891) 2024-09-17 08:04:58 +00:00
review-panel.less Add review panel context providers and components (#19490) 2024-08-13 08:04:20 +00:00
search.less
share.less Merge pull request #20156 from overleaf/rh-share-modal-dropdown-fix 2024-09-04 08:04:39 +00:00
table-generator-column-width-modal.less Merge pull request #16048 from overleaf/mj-table-column-width 2024-01-19 09:04:28 +00:00
toolbar.less Merge pull request #20231 from overleaf/ii-bs5-ide-header-light 2024-09-09 08:05:10 +00:00