overleaf/services/web/test/frontend
M Fahru 0648b8aa6c Implement deleted file restore for history react (#12753)
* Add strikethrough to deleted file tree item in history file tree

* Add "restore file" button on toolbar if the selected file have a `removed` operation.

* Implement "restore file" functionality on removed file:

- Refactor the `Selection` object in history context value since we need the `deletedAtV` data which currently is not passed through the state.
- Refactor and clean up file tree type system to support passing through the whole `FileDiff` object for getting the `deletedAtV` data which only appear on `removed` operation
- Implement `postJSON` with file restoration API and pass it on restore file onClick handler at toolbar

* Implement loading behaviour while restoring file is inflight:

- Add `loadingRestoreFile` to `LoadingState`
- Change restore file button to `Restoring...` when in loading state.

* Refactor:

- Rename `DiffOperation` to `FileOperation`
- Extract `isFileRemoved` and `isFileRenamed` to its own file
- Extract `Toolbar` components into small files

GitOrigin-RevId: 2e32ebd2165f73fc6533ff282a9c084162efd682
2023-04-28 08:04:59 +00:00
..
components Merge pull request #12176 from overleaf/ae-syntex-tests 2023-03-14 09:04:14 +00:00
features Implement deleted file restore for history react (#12753) 2023-04-28 08:04:59 +00:00
helpers Show preview for PDF image (#11793) 2023-02-17 09:04:35 +00:00
ide Refactor log parser tests 2022-06-22 08:04:49 +00:00
infrastructure Merge pull request #7941 from overleaf/msm-use-async-typing-fix 2022-05-19 08:04:13 +00:00
shared Improve compile request mocking in Cypress tests (#12095) 2023-03-07 09:05:25 +00:00
utils Merge pull request #4305 from overleaf/jpa-fix-undef 2021-07-14 12:40:42 +00:00
bootstrap.js Remove sysend dependency (#10852) 2023-01-10 09:04:37 +00:00
prop-types.test.js Merge pull request #5709 from overleaf/ae-fail-prop-types-tests 2021-11-16 09:02:54 +00:00