overleaf/services/web/frontend/js/features
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
..
algolia-search
bookmarkable-tab
chat
clone-project-modal
contact-form
cookie-banner
dictionary
editor-left-menu
editor-navigation-toolbar [cm6] Improve alignment of review panel elements (#12710) 2023-04-25 08:05:02 +00:00
event-tracking
fallback-image
faq-search
file-tree Merge pull request #12765 from overleaf/dk-fix-create-folder-name 2023-04-27 08:05:00 +00:00
file-view
form-helpers
group-management
history Implement deleted file restore for history react (#12753) 2023-04-28 08:04:59 +00:00
hotkeys-modal
link-helpers
mathjax
multi-submit
onboarding
outline
pdf-preview
plans
preview
project-list
settings Merge pull request #12698 from overleaf/jk-full-stops 2023-04-26 08:04:30 +00:00
share-project-modal
source-editor add 'Ace removal' notification (#12800) 2023-04-28 08:04:19 +00:00
subscription
user-content-domain-access-check
utils
word-count-modal