* rename revert file to restore file
* rename file/function name
* rename split test
* fix formatting
* do not rename split test name
* fix typo
GitOrigin-RevId: e4e2eae622a270b3b6483348f441ddd424623f81
* [web] Show confirmation modal when reverting a file
* only show Revert file in ui even if deleted
* format:fix
* using the same message for every revert
* replace "document" with "file" in confirm dialog
* remove "pull-left" class
* fix split test name
GitOrigin-RevId: ab5937b9a0570cd1fdbe5d71eda0a16ae539dc66
History migration: Split updates and file diff loading states, move file restore load state out of context
GitOrigin-RevId: a994a1bdc8168043f045aaa3b7708bfce994d505
* 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
On history react, when the initial screen has been loaded, no default pathname is selected. This PR adds logic for selecting default pathname and getting the diff for that pathname.
Also, add some other small changes, the notable ones are:
- Refactor some type naming and file structure related to the history file tree
- Refactor file tree selectable hooks (merge selectable context provider into the main provider)
- prevent clicking on the same file tree item by checking the current pathname before invoking the handler function
GitOrigin-RevId: 73c36e9ed918ae3d92dd47108fbe8542a7571bdd