* 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
- 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
* Create a new shared `SplitMenu` component.
* Refactor the pdf compile button & detached compile button:
- Rename `detach-compile-button` to `detach-compile-button-wrapper`
- Rename `pdf-compile-button-inner` to `detach-compile-button`
- Move some of the logic from `detach-compile-button-wrapper` to `detach-compile-button`
- Create a new `compile-button.less` to centralize all of the compile button (detached/non-detached) custom styles rule.
- Extract the animated striped CSS definition to the dedicated CSS file, change the class from `btn-recompile-group-has-changes` to `btn-striped-animated`
- Refactor other className(s) appropriately according to the new component name
- Delete the unused `changes-to-autocompile` css rule since it has not been used anywhere
* Implement the new pdf compile button with the new `SplitMenu` component.
GitOrigin-RevId: d1d055bffd311923fc47b4681605ce8ba8e26f25
* Redesign the styling of conflict state for file upload in the editor
* Change overwrite button style from primary (green) to danger (red)
* Change the idle state and dragging state styling to match the error state new design:
*remove the double border; only keep the dashed border
* on idle state, change border color
* Add hardcoded texts to translation file
* Add padding to prevent text is becoming too near to the border when multiple files appear in the conflict file list
* Apply custom file uploader style to smaller screen
GitOrigin-RevId: 266e60bb8575a02c02c1ed1d7fa04cdb101f3dd1
* 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
* Always hide vertical overflow on the review panel, not just when it's expanded, which prevents it scrolling slightly when scrolling the PDF in some circumstances
* Fix layout shift by always applying overflow-y hidden on review panel and make entry visible in minimized review panel by making the overflow visible while hovering over the entry
GitOrigin-RevId: 854ee47a762ee2cf78fbbb5856afddb3b723d679