* Use lineShift
* Use fromA instead of fromB
* Only check the update doc
* Always use oldDoc
* Copy tests
GitOrigin-RevId: 05e5516b09ee4a25d8ac2b5f2994a034f35c9e82
* Use fork of @codemirror/autocomplete
* Handle multiple selection ranges when applying snippets
GitOrigin-RevId: 04afc087ac127206463ea3d4950284a50308364a
* 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
* Use forked @codemirror/search
* Use getPanel to get the search panel
* Remove layer-based highlightSelectionMatches
* Add "within selection" option to the search form
* Add test for "replace all within selection"
* Fix tests
GitOrigin-RevId: 95ce76fd017f96278b04c16a1fd34f785f7504a3
* 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
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
* Prevent the duplicated message IDs by filtering them out
* fix: Prevent the duplicated message IDs by filtering them out
GitOrigin-RevId: 6d6c2821e6e29c9949fd323fa3a507016b51aff4
* Update Copybara options in preparation for open-sourcing the source editor
* Move files
* Update paths
* Remove source-editor module and checks for its existence
* Explicitly mention CM6 license in files that contain code adapted from CM6
GitOrigin-RevId: 89b7cc2b409db01ad103198ccbd1b126ab56349b
* Change wording of tags header and hide uncategorized when tags list is empty
* Add a tooltip on the colour picker more button
* Fix linting
GitOrigin-RevId: 07e1c411c2c9f6f66e0a00c1610af662b829c4e4