* 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
* Include \def commands in command definitions
* Allow command name to be in CtrlSym
* Pull nodeIntersectsChange check out of branches
* Fix \def handling
* Add handling for \newenvironment and \renewenvironment
* Allow \def to have optional arguments
* :x
Revert "Add handling for \newenvironment and \renewenvironment"
This reverts commit a70d3a0a13ed552daf3b761893e3f8609f0b0fc8.
* Add let commands to defintions
* Add environment names to math preview
* Ignore let command definitions in autocomplete
* Move nodeIntersectsChange check back into each block
* Add childOfNodeWithType utility and use to get command names
* commandNameText -> commandName
* Only include environment definitions
* Rename documentEnvironmentNames to documentEnvironments
* EnvironmentName -> Environment
* Format
GitOrigin-RevId: 9c5d701423ae786e5ff91960b4bcd94cd35d21c8
* adding the li within ul to fix the accessibility issue from axe dev tools
* adding aria-label on the button
* adding a translation
GitOrigin-RevId: de46c7f1a71d7921b7ab88299441c50ef666cae2
* [fetch-utils] Fix FetchUtilsTests.js tests
* Cleanup between tests
* Define `AbortError`
* [fetch-utils] Add `expectConnectionCount` showcasing that the connection stays on when the stream is destroyed
* Revert "[fetch-utils] Add `expectConnectionCount` showcasing that the connection stays on when the stream is destroyed"
This reverts commit b10da7b3fc06a7345df8fd70f27fad70a478bbb4.
* [fetch-utils] Fix `supports abort signals` test
* [fetch-utils] Add tests "aborts the request when the request body is destroyed during transfer"
* [fetch-utils] Add extra waiting step before `expectRequestAborted`
* [fetch-utils] Add `while (!req?.destroyed) await wait(10)`
Unfortunately I couldn't find a better event to await.
To try with this to test flakiness
```
for i in {1..100}; do npm run test:unit || break; echo "Run $i completed"; done
```
* [fetch-utils] Replace arbitrary `wait(10)` by `this.server.waitForEvent('request-received')`
* [fetch-utils] Improve tests per PR comments
See https://github.com/overleaf/internal/pull/20210
1. Replace `waitForEvent` with `once`
2. Replace `waitForRequestAborted` by `expectRequestAborted`
3. Add comment in `expectRequestAborted` empty catch block
Non-flakiness rechecked with `for i in {1..100}; do npm run test:unit || break; echo "Run $i completed"; done`
* [fetch-utils] Add small wait before checking `lastReq === undefined`
Per https://github.com/overleaf/internal/pull/20210#discussion_r1743329462
GitOrigin-RevId: 5fe542e0a8e6011307e03237e2f81404d9a0e674