Commit graph

62 commits

Author SHA1 Message Date
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
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
M Fahru
c7a80f9228 History migration: Wrap history version item texts in version history list (#12961)
Texts that need individual wrapping so they won't overflow the history item:

- long file name
- long label name
- long tooltip text
- long user email

---------

Co-authored-by: Ilkin Ismailov <ilkin.ismailov@overleaf.com>
GitOrigin-RevId: 3f75c4173dd59524de1148b22bcbc1d856c021eb
2023-05-26 08:04:53 +00:00
Tim Down
80a5f4594e Merge pull request #13130 from overleaf/td-history-add-label-autofocus
History migration: Autofocus input in add label dialog

GitOrigin-RevId: b51187e735414cd4b027413dfe57a0ba332c7b1a
2023-05-26 08:04:04 +00:00
Alf Eaton
510e686b7b Upgrade ESLint plugins (#13153)
GitOrigin-RevId: 9cd0b4429a9c2b3df9c18957aef21ef021e5fdfd
2023-05-25 08:05:34 +00:00
Alf Eaton
142cfb51d9 Merge pull request #13173 from overleaf/td-history-menu-jump
History migration: Remove initial jump on displaying menu and line up menu items nicely

GitOrigin-RevId: f04c01565aa9ea128e87543fa7108d7fb0ae8657
2023-05-25 08:04:23 +00:00
Tim Down
ccacd4cab7 History migration: Abort previous GET requests (#12893)
GitOrigin-RevId: ad72d526bf7cdfa91b00025b58205d9a5b4cc62f
2023-05-25 08:04:15 +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
19dc830bc6 Merge pull request #13127 from overleaf/td-history-fix-menu-position
History migration: Fix regression with positioning of the history change list item menu

GitOrigin-RevId: feb02101f3ae09102a4986ceb3fe8261b884ab33
2023-05-23 08:04:29 +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
c870bd5f53 Merge pull request #13104 from overleaf/td-history-compare-to-from
History migration: Add "compare to" and "compare from" options

GitOrigin-RevId: f550ad06b1e812011ecb32e6772354eb0abc2163
2023-05-17 12:04:56 +00:00
June Kelly
0346e32906 Merge pull request #12836 from overleaf/td-history-performance
History migration: Improve performance of selecting or comparing versions

GitOrigin-RevId: 2a18a93c246fb94ed8d8b9770449be83364177ea
2023-05-17 08:04:07 +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
June Kelly
0aefc76f79 Merge pull request #13059 from overleaf/ii-history-react-submit-create-label-modal-with-enter-key
[web] Submit the label creation modal data by pressing Enter

GitOrigin-RevId: 6319a7963daf11422d679d9620e400e6f9069fea
2023-05-17 08:03:49 +00:00
ilkin-overleaf
a94f241dcb Merge pull request #13009 from overleaf/ii-history-react-sticky-date-headings
[web] Improve the sticky date headings

GitOrigin-RevId: 0ba4c4d589b01d250198ecf97f7937200d393fe2
2023-05-15 08:03:03 +00:00
ilkin-overleaf
32160a8c80 Merge pull request #13038 from overleaf/ii-history-react-dropdowns
[web] Adjust dropdowns placement in history list

GitOrigin-RevId: 050e16b97630eb37c890ad9a97a56ba882cca06b
2023-05-15 08:03:00 +00:00
Alf Eaton
0ffa75979f Merge pull request #13001 from overleaf/td-history-version-hover-style
History migration: Use green selected style when hovering over selected version

GitOrigin-RevId: 7771ce64d719c3d0e5264dfd2fbbf52f5b519213
2023-05-10 08:05:45 +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
ilkin-overleaf
74a8d6111a Merge pull request #12987 from overleaf/ii-history-react-fix-label-selection-when-entry-with-no-label-is-selected
[web] Fix and improve labels and history entries selection

GitOrigin-RevId: 92c0b463a4cb9db7a293699e35c28ce5331de43a
2023-05-10 08:04:42 +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
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
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
Miguel Serrano
92ade70601 Merge pull request #12933 from overleaf/ii-history-react-select-latest-version-when-all-labels-are-removed
[web] Fix history entries and labels selection issues

GitOrigin-RevId: 73b14ba15ab4f0d9ff5946b1159ae7d5912582dd
2023-05-09 08:04:00 +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
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
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
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
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
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
ilkin-overleaf
5480e1b371 Merge pull request #12850 from overleaf/ii-history-react-fix-disappeared-pseudo-labels
[web] Fix disappeared pseudo labels

GitOrigin-RevId: 4d33eb8888cadbccba29ac001e205db8fa717c49
2023-05-02 19:44:15 +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
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
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
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
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
M Fahru
3f992f9453 Ensure new data are fetched properly whenever history is opened (#12577)
GitOrigin-RevId: e0ae14cdc90c95dbd44b12bd8332bc982ea34a10
2023-04-13 08:04:45 +00:00
Alexandre Bourdin
481cd14cb1 Merge pull request #12557 from overleaf/ii-history-react-labels-only
[web] History labels only list

GitOrigin-RevId: 58b8e5a5af0754e32841223f9c478c25900df526
2023-04-13 08:04:12 +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
ilkin-overleaf
8e0aa685ce Merge pull request #12549 from overleaf/ii-history-react-list-of-all-versions
[web] All versions of history entries

GitOrigin-RevId: 7365ac4913c115b3b2872a3713d893463719c15e
2023-04-12 08:03:47 +00:00