overleaf/services/web/frontend/js/shared/context
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
..
mock Merge pull request #13485 from overleaf/msm-share-modal-fetch-tokens 2023-07-17 10:48:10 +00:00
types [web] Enforce collaborator limit (#19619) 2024-08-22 14:01:25 +00:00
detach-compile-context.tsx Add compile log rule deltas to the compile-log-entries event (#19169) 2024-07-02 08:04:48 +00:00
detach-context.tsx Merge pull request #14709 from overleaf/ae-context-typescript 2024-01-29 09:03:04 +00:00
editor-context.tsx [web] Share modal shows downgraded editors (#20015) 2024-08-27 08:04:49 +00:00
file-tree-data-context.tsx Merge pull request #20057 from overleaf/jpa-readonly-tuning 2024-08-23 08:04:48 +00:00
ide-context.tsx Remove Angular (#17534) 2024-06-06 08:04:09 +00:00
layout-context.tsx Implement a floating "Add comment" button for the redesigned review panel (#19891) 2024-09-17 08:04:58 +00:00
local-compile-context.tsx Only record error log deltas for the same rootDocId (#19251) 2024-07-05 08:04:19 +00:00
project-context.tsx Merge pull request #18861 from overleaf/rh-editor-limit-exceeded 2024-06-25 08:04:46 +00:00
split-test-context.tsx [web] Use React hooks to get split-test variants instead of getSplitTestVariant (getMeta) (#18133) 2024-05-01 08:04:55 +00:00
user-context.tsx Memoize FileTree and outline toggle button components (#16776) 2024-02-02 09:03:08 +00:00
user-settings-context.tsx Merge pull request #19528 from overleaf/dp-equation-preview 2024-07-25 08:05:04 +00:00