* 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
* Base for color picker
* React color picker and updated modals
* Add tag color picker to mobile dashboard
* Update existing tests and fix disable save button condition
* CSS adaptations for desktop modal streched into mobile display
* Update TagsController tests
* Add aria-hidden label on color pickers
* Fix linting
* Fix project list test
* Select random color when creating tag
* Cleanup leftovers in project list context
* Test cleanup
* Pre-select custom color and store local color while picking
* Add type to preset colors
* Add css fix to override disabled button opacity
* Skip redundant check
* Fix linting
* Add back btn-secondary on manage tag modal after rebase
GitOrigin-RevId: a4cf24e85cc0ca01466f4bf9c77482be8360e68e
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
* Refactor & change `add-affiliation.tsx` file:
* Change class from `user-profile` to `add-affiliation`
* Add new optional `className` props for custom styling
* Show affiliation widget on mobile screen:
* Fix bug on use add affiliation hooks: return type should be `boolean`, not `boolean | 0`
GitOrigin-RevId: 800b951e2a012797266b1780993b4ed9a918d565
* Rename manage group entry point
* Migrate group management root page to React
* Add cypress tests for the group management react page
* Fix linting
* Add checkbox labels for screen-readers + remove unused classes
* Await on add/remove members calls
* Display the export CSV link for a full group
* Display error message when group is full
* Sort locales
* Handle the managers management page in React version
* Fix missing type in GroupMemberRow
* Split members and managers React pages
* Build API paths on frontend side + add cypress tests for each page
* Fix linting
* Update unit tests
* Review improvements
* Type API errors
GitOrigin-RevId: d124a9d24cbf33de8aacc5d69e9d46e7bcda93c5
* Add new event segmentations for the upgrade button in dashboard to help analysis
* Also add an extra check for the upgrade button in the navbar since it's only appeared in the project dashboard react version
GitOrigin-RevId: fca14e3adfbafd0fd143b045ba43588913f7297b
- Implement the banner on both react and non-react project dashboard
- Use split test with 4 different variants, `save`, `empower`, `did-you-know`, and `default`, each variant has a different copy, except the `default` which won't show the banner to users
GitOrigin-RevId: ee76769dfd38b8e52de8cc0f201c24e41905d016
- Importing SettingsController from the angular code, which enables post requests for every select menu and socket handler for compiler, texlive version, and main document select option
- New context for the data handling infrastructure between react and angular. The data is still located in the angular version, and I use the context only as a proxy to fetch/post new data.
GitOrigin-RevId: 59009bceb128d82969a2318e90036aacf79f9887
* Update "go to line" hotkey for cm6 and add new info text in hotkeys modal
* Differentiate modal title between cm6 and ace hotkeys
* Update test to reflect change in hotkeys modal title
* Add test for hotkeys modal bottom text
* Update test on editor left menu hotkeys button to reflect change in hotkeys modal title
GitOrigin-RevId: 61bae16313ea7a37fa3b9441dbe5a93ab7823d01
* Migrate actions menu in editor left menu to react
* Move margin from inline style to css file
* remove focus selector to avoid "highlighting" the button after closing modal and regain focus
* Add disabled state on word count button when the compiling is loading or failed
* Use div instead of button for disabled word count button
* Add accessibility text props when LeftMenuButton is disabled
* Add actions menu test cases and storybook components
* use util assign function and wrap function prop in usecallback
GitOrigin-RevId: 81ab104be21fbcf5dfbc72c07d29eeb32976c61f
* Initialize left menu react migration and migration download menu UI to react
* Add test case to DownloadMenu react component
* Update test description and add an href check to one of the download link
* Extract storybook document mock to its own fixture file
* Add mockCompileOnLoad config on storybook editor scope
- if mockCompileOnLoad: true (default), then the default compile mock will be used
- If mockCompileOnLoad: false, then we have to provide a compile mock on the storybook component
* Create download menu storybook component
* Use a single "editor-left-menu" controller on the editor left menu migrations
* Remove the form import from the react version of the left menu
* Change inline style to utility class name
GitOrigin-RevId: 5357c7bfc78bf40f52b9b308df8f2b60d793fbf7