Commit graph

19 commits

Author SHA1 Message Date
Jimmy Domagala-Tang
9759a29d75 Merge pull request #14703 from overleaf/jdt-collapse-history-folders
collapse folders with no changes in history view

GitOrigin-RevId: 120845bfb3d645ab9ebb287b00516b5a0f6666c0
2023-09-25 08:05:03 +00:00
ilkin-overleaf
b05f8ad7e7 Merge pull request #14339 from overleaf/ii-filetree-empty-space-click-3
[web] Select project root folder improvements

GitOrigin-RevId: 48b80f26adf239215bf04d3db95a61ef35b5cf77
2023-08-18 12:11:06 +00:00
ilkin-overleaf
d8e2c10257 Merge pull request #14291 from overleaf/ii-filetree-empty-space-click-2
Select project root folder

GitOrigin-RevId: 146bf9dcbfbd037c51529b80104495bd95922471
2023-08-15 08:03:22 +00:00
ilkin-overleaf
738ff5e63c Revert filetree empty space click (#14283)
GitOrigin-RevId: e019f88631e91ffefd71cae145b5355372f12df7
2023-08-14 08:05:26 +00:00
Alf Eaton
3ae32f8332 Merge pull request #14197 from overleaf/ii-filetree-empty-space-click
[web] Select project root folder

GitOrigin-RevId: 78272a6af16879e9c71c9167ba066c258b0ff7b7
2023-08-14 08:04:41 +00:00
ilkin-overleaf
bb815268f2 Merge pull request #13146 from overleaf/ii-history-react-save-last-selected-file-in-local-storage
[web] Save lastly selected file in the file tree

GitOrigin-RevId: 4b4dcdcb1340e253d4cd2003280f67385975d664
2023-05-31 08:04:59 +00:00
Alf Eaton
510e686b7b Upgrade ESLint plugins (#13153)
GitOrigin-RevId: 9cd0b4429a9c2b3df9c18957aef21ef021e5fdfd
2023-05-25 08:05:34 +00:00
June Kelly
6c2bc2fe8b Merge pull request #13068 from overleaf/td-history-renamed-file-auto-select
History migration: Fix bug that prevents renamed files being automatically selected

GitOrigin-RevId: ce127b218d1eb472fe7b35467a17549f3db4bfb7
2023-05-17 08:03:58 +00:00
ilkin-overleaf
aea43cee29 Merge pull request #12999 from overleaf/ii-history-react-file-tree-optimisation
[web] History file tree list items optimisation

GitOrigin-RevId: b5e9b72b7df857479db3b2a276e6c064d8f9427a
2023-05-10 08:04:34 +00:00
M Fahru
c19fa74aa4 In history react file tree, always show badge (stick to the right side) and truncate long filename with ellipsis (#12897)
GitOrigin-RevId: 2e982f03b7a60e506f061a2c5bf1ab3d93dfccf5
2023-05-09 08:05:08 +00:00
June Kelly
7d1d34726e Merge pull request #12914 from overleaf/mf-sort-file-tree-history-react
Sort react history file tree items with the same rule as the angular history file tree

GitOrigin-RevId: da3d3195fff1f5b05b232b329fc3cf38a65743f6
2023-05-05 08:04:04 +00:00
Tim Down
a19dffeac2 Merge pull request #12877 from overleaf/td-history-file-tree-keyboard
History migration: Only activate document in file tree for space and enter keys

GitOrigin-RevId: 166a9ba36b1f19cd4e50d0e6f63ce04b164512cf
2023-05-02 19:45:14 +00:00
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
M Fahru
08d2eea47a Decouple history-file-tree styling out of editor file tree:
- Extract/duplicate the style from editor file tree (only extract styling that's being used in history file tree)
- Change some of the class name to avoid duplicated class name from the editor file tree
- Revert change to editor file tree since it has been moved to history file tree

GitOrigin-RevId: 6c3b20080c9b428363024db622f60e3540d919e6
2023-04-21 08:03:36 +00:00
Ilkin Ismailov
dd5509b16f add sm size to badge
GitOrigin-RevId: 4e69d582ce770abcff10f3a6b34662f4873fc224
2023-04-21 08:03:33 +00:00
M Fahru
8212b686c6 Implement new style for history file tree badge
GitOrigin-RevId: 6221bc00e5aecf49fd3f2657128d1e9a2d4e648b
2023-04-21 08:03:30 +00:00
M Fahru
fb6746a887 Add default pathname logic on history react file tree (#12505)
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
2023-04-12 08:04:58 +00:00
M Fahru
17a98d756e Add badges UI to history react file tree (#12479)
GitOrigin-RevId: 52c45b72110e01bb193139654fa9385cb9b9e489
2023-04-05 08:03:05 +00:00
M Fahru
9a55bbf325 Port editor react file tree to history file tree (#12453)
This new history file tree is mostly copied from the editor file tree, with some of the features stripped away:

1. Remove multiple selections
2. Remove drag and drop ability
3. Remove the ability to rename files & folders
4. No more right-click hijacking (context menu)
5. No more triple dots menu on a file tree item shown
6. No file references, since history doesn't have the data to differentiate between real files and linked file
7. etc (some other small changes that are not too important to be listed)

Other notable changes:

1. Simplify the selectable provider (the only context provider being copied from react file tree)
2. Convert to typescript

GitOrigin-RevId: 1017e545b2bd99775e01307a9b7eac2daf454014
2023-04-04 08:05:30 +00:00