Commit graph

18 commits

Author SHA1 Message Date
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
Tim Down
9ca81a72af Merge pull request #13218 from overleaf/td-history-update-change-list-tests
History migration: Update change list fixtures to ensure file diff request happens

GitOrigin-RevId: 5ec7b4389bc4d7f1343f9e3d26c0bcb7e4585ab5
2023-05-26 08:04:38 +00:00
Tim Down
66dc566752 Merge pull request #13039 from overleaf/td-history-auto-select-file-ignore-binary
History migration: Ignore binary files when auto-selecting file to display in history view

GitOrigin-RevId: 7d2a314cdb3d54e4e2292a95e7633e3829ea931f
2023-05-26 08:04:29 +00:00
Alf Eaton
5827c6f05c Merge pull request #13208 from overleaf/td-history-fix-change-list-test
History migration: Skip change list tests temporarily

GitOrigin-RevId: 38cdc3c42c8eafbada75c83503afb523b5d93199
2023-05-25 08:05:43 +00:00
ilkin-overleaf
454f8f80c2 Merge pull request #13117 from overleaf/ii-history-react-changes-list-tests
[web] Add changes list tests

GitOrigin-RevId: 5a4e1ea647d737dc761e4258002e6507c76e95a9
2023-05-23 08:05:27 +00:00
Tim Down
fd8557ef39 Merge pull request #13159 from overleaf/td-history-comparison-text-icon-tweaks
History migration: Icon and text changes to version comparison, switch order of from and to

GitOrigin-RevId: e31db255c55caf15481ed0237875e637c0ac0861
2023-05-23 08:04:15 +00:00
Tim Down
f8a2d85126 Merge pull request #12917 from overleaf/td-history-highlight-tooltip-improvements
History migration: Rework change marker tooltips to match Angular version behaviour

GitOrigin-RevId: c34e42db6c310521d04690de41f3bb81c219bfbc
2023-05-10 08:04:18 +00:00
Tim Down
a0e3379c86 Merge pull request #12939 from overleaf/td-history-more-update-scroll-amount
History migration: More update button scrolls next change to the centre

GitOrigin-RevId: 29d41a046f7110c246a0b9c784dedf6b148ea298
2023-05-05 08:04:53 +00:00
Tim Down
da916c9c13 Merge pull request #12906 from overleaf/td-history-fix-labels-test
Expect correct number of labels in history version list test

GitOrigin-RevId: 2a56b21c7359aad5111a2a7879f31fb5e7c6b73d
2023-05-02 19:45:40 +00:00
Tim Down
70bae34bd8 Add paywall to React history view (#12849)
* Implement history view paywall

* Add tests and some CSS fallbacks

* Make additional faded version above paywall non-clickable

* Change isFaded to faded for consistency

* Remove unused import

* Add missing attribute

* SHow all labels in free tier

* Address review comments

* Change Boolean conversion

Co-authored-by: ilkin-overleaf <100852799+ilkin-overleaf@users.noreply.github.com>

* Make adding or deleting a label show up in version list again

* Refactor to use visibleUpdateCount rather than maintaining two separate update arrays

* Removed unused import

* Use data-testid instead on class

* Round gradient values

* Correct test selector

---------

Co-authored-by: ilkin-overleaf <100852799+ilkin-overleaf@users.noreply.github.com>
GitOrigin-RevId: a2b021f3f4d3b9eb1358edb2ee4aa7db1bc7240e
2023-05-02 19:44:39 +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
ilkin-overleaf
0895e33235 Merge pull request #12773 from overleaf/ii-history-react-changes-list-dropdown
[web] Actions dropdown history migration

GitOrigin-RevId: 6b7055501c5eb1529b1794db92bb9f5f3faa6648
2023-04-26 08:05:24 +00:00
Tim Down
bf076a8c97 Merge pull request #12721 from overleaf/td-history-improve-diff-highlight
Add markers for addition and deletion on empty lines in history diff

GitOrigin-RevId: 62e329da8bc055ee922854b837fe9465d724402e
2023-04-25 08:06:14 +00:00
M Fahru
4dec157e08 Implement history react toolbar UI (#12530)
There are two different UI in this PR: `comparing` and `viewing` mode.

- For `comparing`, the user would be shown two separate date. It uses the `UpdateRange` object and this PR adds a timestamp to both `fromV` and `toV` of the object type.
- For `viewing`, the user would only be shown one date since `viewing` mode means viewing a specific update version.

Some other notable changes:

- Move `diff` state to `diff-view.tsx`, which contains `main.tsx` (main editor history view) and `toolbar.tsx` as its children
- refactor `autoSelectFile` by passing `updateRange.toV` directly
- refactor `updateIsSelected` by passing an object that contains `fromV` and `toV` instead of passing `update

There's also a cypress test for both the `viewing` mode and `comparing` mode in this PR.

GitOrigin-RevId: ba54f073f3479c55a39eb6b2932ea7faff78dddc
2023-04-21 08:03:39 +00:00
Tim Down
5f5e07a334 Merge pull request #12668 from overleaf/td-history-scroll-to-first-change
Scroll to first change in history document diff viewer

GitOrigin-RevId: e135877ca440c5eb2732890e8723d9098444727f
2023-04-19 08:03:28 +00:00
Alf Eaton
f205d1f31d Merge pull request #12621 from overleaf/ii-history-react-delete-labels
[web] Delete history tags

GitOrigin-RevId: 0a2846bbb3e99ef632b9192a9f8c04f702645506
2023-04-19 08:02:47 +00:00
Tim Down
38998afa8e Implement history diff viewer buttons (#12439)
GitOrigin-RevId: 0ed8eb8568783b4938188a86c4ee75c767e6d713
2023-04-17 08:05:41 +00:00
ilkin-overleaf
867b37b76f Merge pull request #12417 from overleaf/ii-history-react-toggle-switch
[web] Toggle switch history migration

GitOrigin-RevId: c0812d03d576bc66dd8878fa80d4ac18dd8576d0
2023-03-30 08:04:22 +00:00