Commit graph

25 commits

Author SHA1 Message Date
Alf Eaton
0c81bccfca Ensure that translation values are correctly escaped (#15252)
GitOrigin-RevId: 5a38b4c01921fd4d95dbdb7b9e756443fdb00b80
2023-10-20 08:03:31 +00:00
Tim Down
dbe5c9732b Merge pull request #14829 from overleaf/td-history-scroll-editor-tab
History view: prevent scroll to top of document diff viewer when editing in another tab

GitOrigin-RevId: d94da63fdb8e76203a1a2cc5729188a9d28e0be5
2023-09-21 08:04:00 +00:00
Jimmy Domagala-Tang
ab4f0d6c5f Merge pull request #14866 from overleaf/jdt-hist-rename-test
fix: rename the history view split test so we can reroll it
GitOrigin-RevId: fd42fab5b6fd715b89688b401596962453b1d002
2023-09-19 08:04:10 +00:00
Tim Down
9db3230e97 Merge pull request #13309 from overleaf/td-history-font-size-setting
History migration: use font size, font family and line height from user settings in document diff viewer

GitOrigin-RevId: 59a0bfe3fa0403a971b7a9b0d5aba2ce37d976c8
2023-07-17 10:23:52 +00:00
Tim Down
f57c87a2a8 Merge pull request #13227 from overleaf/td-history-keyboard-scroll-diff-viewer
History migration: Add tabindex to document diff viewer to allow keyboard scrolling

GitOrigin-RevId: 95a0be27fa710a4f81e5944432b6b108e529634f
2023-07-17 10:23:42 +00:00
Tim Down
a74eecd110 Merge pull request #13259 from overleaf/td-history-survey-link
History migration: Add beta badge to history toolbar

GitOrigin-RevId: e5c818953a7d41c31018a2d39c3937d70c057f8c
2023-06-01 08:04:24 +00:00
Tim Down
ccacd4cab7 History migration: Abort previous GET requests (#12893)
GitOrigin-RevId: ad72d526bf7cdfa91b00025b58205d9a5b4cc62f
2023-05-25 08:04:15 +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
ebbb4fd6d0 Merge pull request #13093 from overleaf/td-history-cm6-translations
History migration: Use translatable strings in history diff highlight tooltips

GitOrigin-RevId: 90c127b792c116c5805ee191b80564eb763cee44
2023-05-17 12:05:12 +00:00
Tim Down
5078f8ab43 Merge pull request #12962 from overleaf/td-history-loading-state-fix
History migration: Split updates and file diff loading states, move file restore load state out of context

GitOrigin-RevId: a994a1bdc8168043f045aaa3b7708bfce994d505
2023-05-10 08:04:59 +00:00
Tim Down
cf05b4a3d1 Merge pull request #12969 from overleaf/td-history-prevent-flashes
History migration: Prevent flash of previous document in document diff viewer when switching document

GitOrigin-RevId: dae99c13779006b61eb018772295376320770d3b
2023-05-10 08:04:26 +00:00
Tim Down
27457133e4 Merge pull request #12873 from overleaf/td-history-loading-improvements
History migration: Improve loading logic and display for loading file diffs

GitOrigin-RevId: 9d20c4632e6a804cb21e6fffd52faa88bc03f01a
2023-05-05 08:04:45 +00:00
Tim Down
95646a1bd5 Merge pull request #12936 from overleaf/td-history-diff-viewer-fixed-font
History migration: Use fixed font, text size, line height and theme in document diff viewer

GitOrigin-RevId: 9f86be609e0fe72ca41429bae9db03e047952c08
2023-05-05 08:04:37 +00:00
Tim Down
76103eb77f Merge pull request #12874 from overleaf/td-history-binary-file
History migration: Show alert for binary file preview

GitOrigin-RevId: f30e4946ce9f873661055b8a096c6aba7ab08e2d
2023-05-02 19:45:22 +00:00
Tim Down
1fb921de99 History migration: Add error handling for all history requests (#12872)
* Add error handling for all history requests

* Remove comment

GitOrigin-RevId: 528dc98a0fc4ab523f8536274996c4166be45064
2023-05-02 19:44:48 +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
Tim Down
afd1195902 Add infinite scrolling to history versions list (#12752)
* Add infinite scrolling to change list, add spinner while doing initial updates load, refactor updates state

* Update type in tests

* Update types

* Using LoadingSpinner component

* Remove redundant imports

GitOrigin-RevId: 98c7eae8edbc4d10d7107d825045edfc4159494f
2023-04-25 08:06:22 +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
Tim Down
99e1ff0804 Merge pull request #12644 from overleaf/td-history-compare
Initial implementation of comparing history versions

GitOrigin-RevId: 890e270d6e41856a79689ab41ccfbde25c4703ba
2023-04-19 08:03:25 +00:00
Tim Down
38998afa8e Implement history diff viewer buttons (#12439)
GitOrigin-RevId: 0ed8eb8568783b4938188a86c4ee75c767e6d713
2023-04-17 08:05:41 +00:00
Eric Mc Sween
6b110cf4d0 Merge pull request #12481 from overleaf/td-history-remove-source-editor-imports
Remove accidental imports from source-editor module in history

GitOrigin-RevId: 808597e113c3b1e74cacc712313af0e20b0e1786
2023-04-04 12:22:25 +00:00
ilkin-overleaf
dfda9d0677 Merge pull request #12434 from overleaf/ii-history-react-feature-flag
[web] Fix history view feature flag

GitOrigin-RevId: af2e76074ed43ec1ed1b877a6ffd403abab48ec8
2023-04-04 08:03:50 +00:00
Tim Down
11f8905be4 Connect up document diff viewer to history state
GitOrigin-RevId: 610a254ea77c194969033d0791ecf1129e02c4bf
2023-03-31 08:03:47 +00:00