Commit graph

1465 commits

Author SHA1 Message Date
June Kelly
e89b4b4214 Merge pull request #12811 from overleaf/jk-plans-event-currency-segmentation
[web] Add currency/id segmentation to Recurly analytics events

GitOrigin-RevId: 56998f403358d5f6b3cece6835e16e65e06635b1
2023-05-02 19:44:24 +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
Alf Eaton
e0d9069131 [cm6] Add "within selection" option to the search form (#12798)
* 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
2023-05-01 08:05:02 +00:00
Alf Eaton
2606c76aec Merge pull request #12805 from overleaf/ae-markdown-types
[cm6] Fix type for Markdown language loader

GitOrigin-RevId: 725e1b28dd73e9090638f5d682e48e658c957a04
2023-05-01 08:04:45 +00:00
Alf Eaton
1da94f029c [cm6] Avoid selecting a search match when re-opening the search panel (#12797)
GitOrigin-RevId: 32bb03b71ce56cc0dbe6f7c92cc6d85151ef1971
2023-05-01 08:04:36 +00:00
Alf Eaton
40cbfc451a [cm6] Improve search match scrolling into view (#12787)
GitOrigin-RevId: 6ce9b86253a9c3a2c6ff44c10f78204ff16bd6e2
2023-05-01 08:04:27 +00:00
Alf Eaton
c53411ff1d Merge pull request #12776 from overleaf/ae-search-close-tooltip
[cm6] Add tooltip to search panel close button

GitOrigin-RevId: ba7f4ca5d672580054cb6214be94497fd5141730
2023-05-01 08:04:17 +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
Jessica Lawshe
afb810c2a1 Merge pull request #12772 from overleaf/td-history-infinite-scroll-fix
Fix bug in infinite scrolling in history view

GitOrigin-RevId: ae71e96a17197451ae583e5614adbbd9dda93ee0
2023-04-28 08:04:42 +00:00
Domagoj Kriskovic
3d5e8c9877 add 'Ace removal' notification (#12800)
* add 'Ace removal' notification

* prettier

* add memo, window.clearTimeout

* remove warning for server pro

* added tracking events

* useCallback for onClick

* fix: event rename

GitOrigin-RevId: 70bce8b93bae233e7183a941abaf2ec7a70ddfb6
2023-04-28 08:04:19 +00:00
Brian Gough
426128554d Merge pull request #12813 from overleaf/bg-add-inr-currency
add Indian Rupee (INR) prices to plan and group settings

GitOrigin-RevId: 6c058ed034d1566cfda17e73a8ba23d8bd7b7ab0
2023-04-27 08:07:45 +00:00
Domagoj Kriskovic
cd689e4e1f [cm6] Show Regex errors in find & replace (#12720)
* [cm6] Show Regex errors in find & replace

* cleanup, isInvalidRegExp function

* no state variable, less color var

* use @brand-dager

* using var(--ol-cm-search-form-focus-shadow)

* using state-danger-border

GitOrigin-RevId: 844c9dfee5a56d2a7494cd86c266acbe9eacd033
2023-04-27 08:05:14 +00:00
Domagoj Kriskovic
e311a22686 Merge pull request #12765 from overleaf/dk-fix-create-folder-name
fix: Clear new folder input after closing modal
GitOrigin-RevId: cde804212ef966f211804afc6bec1b207befeedc
2023-04-27 08:05:00 +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
June Kelly
724a8d6113 Merge pull request #12698 from overleaf/jk-full-stops
[web] Add full-stops after 'Please use a different password'

GitOrigin-RevId: 9cac7c70358db11a74858252001a2dee211c0325
2023-04-26 08:04:30 +00:00
June Kelly
f5740e6b17 Merge pull request #12593 from overleaf/jk-remove-plans-split-test
[web] Remove 'plans-page-layout-v3' split test

GitOrigin-RevId: 91e0d3d8bc40632df630131b2e872fa824015da5
2023-04-26 08:04:21 +00:00
Brian Gough
70072481f4 Merge pull request #12783 from overleaf/ae-dev-tools-localstorage
[cm6] Use customLocalStorage in CM6 dev tools

GitOrigin-RevId: df4c40868b5a7b24b30483d55d1fbe75b5703776
2023-04-26 08:04:12 +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
Mathias Jakobsen
17ca11fae0 [cm6] Add save command to emacs (recompiles doc) (#12742)
GitOrigin-RevId: 10cda3f14411147d0d900f688d9b5017f49d2db2
2023-04-25 08:05:35 +00:00
Alf Eaton
f409b96f00 Fix padding in emptyLineFiller and lineWrappingIndentation extensions (#12736)
GitOrigin-RevId: 8b6a2ad0beb802d917f3e998c378792c6156836a
2023-04-25 08:05:27 +00:00
Alf Eaton
8537a7a5d0 Handle mode: 'none' in keybindings (#12717)
GitOrigin-RevId: 77d040352b1de2311f663a8b33bd0d20d79a30ae
2023-04-25 08:05:18 +00:00
Alf Eaton
4bb582bdd8 [cm6] Improve Tab behaviour in read-only mode (#12715)
* Improve Tab behaviour in read-only mode
* Remove Tab shortcuts from Markdown configuration

GitOrigin-RevId: 9eb804fcf820b37b371b1c351cfbdf7bff1ced89
2023-04-25 08:05:10 +00:00
Alf Eaton
08ccdb79d3 [cm6] Improve alignment of review panel elements (#12710)
* Use a block widget for top padding
* Update review panel positions when the editor geometry changes
* Remove editorPaddingTop from position calculations
* Recalculate review panel on start adding comment
* Assert on line content rather than index
* Use broadcastChange
* Keep focus in the editor when opening the review panel
* debounce broadcastChange
* Set CULL_AFTER to Infinity

GitOrigin-RevId: a8d7b8967736a9164b5264eeaadf334c15ec95ce
2023-04-25 08:05:02 +00:00
Alf Eaton
acf6abb0fb [cm6] Use a block widget for padding at the top of the editor (#12705)
GitOrigin-RevId: 000ce9c90ea6b2ca72ab969704354a19fcea7a87
2023-04-25 08:04:53 +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
Mathias Jakobsen
81a8fa2ce3 Merge pull request #12672 from overleaf/ae-emacs-compile-keydown
[cm6] Stop propagation of Ctrl-s when Emacs keybindings are enabled

GitOrigin-RevId: 32bebefb583ad813931af221cce7498d40fdbaf1
2023-04-21 08:03:11 +00:00
Mathias Jakobsen
462837b44d Merge pull request #12701 from overleaf/dk-cm6-autocomplete-item-space
[cm6] Add space after item autocomplete

GitOrigin-RevId: 6fff77c0c0563530af981bbac73b1d88e02bb759
2023-04-21 08:03:08 +00:00
Mathias Jakobsen
29b056d5a3 Merge pull request #12682 from overleaf/mj-def-whitespace
[lezer] Allow whitespace before macro parameter

GitOrigin-RevId: 14bd8428f0a78fb71184bf300dac0b2b1e3abd3c
2023-04-21 08:03:02 +00:00
Mathias Jakobsen
3bd174631a Merge pull request #12696 from overleaf/mj-rt-skip-more-preamble
[cm6+rt] Update skip-preamble-cursor to skip \maketitle and abstract

GitOrigin-RevId: 3c54d8159bfdb431763872790a2b82ac4cffc09f
2023-04-21 08:02:59 +00:00
Mathias Jakobsen
59b3b9b933 Merge pull request #12631 from overleaf/ae-readonly-focus
[cm6] Prevent the editor being focused when read-only

GitOrigin-RevId: 7de9f2df2421b57b3315d59d640f7c8b46caf178
2023-04-21 08:02:56 +00:00
Mathias Jakobsen
c2292a8567 Merge pull request #12677 from overleaf/ae-codemirror-view-upgrade
[cm6] Upgrade CodeMirror dependencies

GitOrigin-RevId: cc973b1c5b23eca0fc93a9b3a970c832212e47af
2023-04-21 08:02:53 +00:00
Rebeka Dekany
df300b5f24 Fix: Chat messages deduplication (#12667)
* Prevent the duplicated message IDs by filtering them out

* fix: Prevent the duplicated message IDs by filtering them out

GitOrigin-RevId: 6d6c2821e6e29c9949fd323fa3a507016b51aff4
2023-04-19 08:03:31 +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
924012e21f [cm6] Avoid overwriting themed syntax highlighting colours when editing Markdown (#12648)
GitOrigin-RevId: ed5d558544839978862004a8b7feb80806a2100d
2023-04-19 08:03:04 +00:00
Alf Eaton
5717f51042 Merge pull request #12643 from overleaf/ae-initial-active-line-highlight
[cm6] Fix initial active line highlight

GitOrigin-RevId: 54de6a176e826ed7d7f1016ba6cee7a8803f0be4
2023-04-19 08:02:53 +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
Mathias Jakobsen
c8f7bc54bc [web] Add split test for testing editor switch naming (#12596)
Co-authored-by: Ieva Vaiginyte <95856891+ievaoverleaf@users.noreply.github.com>
GitOrigin-RevId: dafe07bda841dad962ebf2894718750fafe86373
2023-04-18 08:04:59 +00:00
Jimmy Domagala-Tang
77c2db38fc Merge pull request #12566 from overleaf/jdt-ghost-danger-buttons
feat: adding danger ghost buttons
GitOrigin-RevId: 2ee6ea1c395ba4a73fbe09b36acde3145c590a6b
2023-04-18 08:04:51 +00:00
Tim Down
b07535f15b Merge pull request #12641 from overleaf/td-source-editor-import-fix
Fix for incorrect import

GitOrigin-RevId: 5814fbf888446f7cbc9464565ab13f3b1db8b54f
2023-04-17 08:05:57 +00:00
Tim Down
23b9c078b8 Merge pull request #12636 from overleaf/td-history-autoselect-file
Simplify file autoselect in React history view

GitOrigin-RevId: 43f070b26ab0a75af13063712b5cf05778da4064
2023-04-17 08:05:49 +00:00
Tim Down
38998afa8e Implement history diff viewer buttons (#12439)
GitOrigin-RevId: 0ed8eb8568783b4938188a86c4ee75c767e6d713
2023-04-17 08:05:41 +00:00
Alf Eaton
63b2064420 [cm6] Add scrollIntoView when commands are dispatched (#11678)
GitOrigin-RevId: be005885330b9b29c7ddbfeacaec0a41d96e5e25
2023-04-17 08:05:33 +00:00
Mathias Jakobsen
7d237d0103 [cm6] Only swallow text in autocomplete insertion if node is well-formed (#12562)
* [cm6] Only swallow text in autocomplete insertion if node is well-formed

* [cm6] Use longest common prefix heuristic for autocompletion in ill-formed nodes

GitOrigin-RevId: 5adf3dc0314d86b267e2142a1250dece3ab29ef8
2023-04-17 08:05:24 +00:00
Mathias Jakobsen
73191f56e1 [cm6+rt] Make formatting commands work after UnknownCommands without arguments (#12625)
GitOrigin-RevId: 0eb59e6580d6f217c46424ede0fa6f79c8786940
2023-04-17 08:05:16 +00:00
Mathias Jakobsen
4b2cc907e2 [cm6] Change Emacs commands to visual-line-mode (#12523)
* [cm6] Change Emacs commands to visual-line-mode
* [cm6] Change line deletion commands to visual line mode

GitOrigin-RevId: 7a4f3d66bec611de410b6c1fbafbfe33b974e37b
2023-04-17 08:05:08 +00:00