Commit graph

68 commits

Author SHA1 Message Date
Alf Eaton
f2f7f6b7d6 [cm6] Add beginEnvironmentCompletionSource (#12913)
GitOrigin-RevId: eb4582606103268f1f2c90da7d372a0a33926e36
2023-05-08 08:04:26 +00:00
Domagoj Kriskovic
27ffe1c814 [cm6] Display non-standard spaces as special chars (#12927)
* [cm6] Display non-standard spaces as special chars

* specialChar background color

* removed Ideographic Space

* fix: lint error

* added Ideographic Space

* display only for source editor

GitOrigin-RevId: d94942cdc6a0aa17045b1783ac95de601f6ae15a
2023-05-08 08:04:18 +00:00
Alf Eaton
b1929cf16d [cm6] Improve symbol completion ranking (#12902)
GitOrigin-RevId: 8ccc87c2b86636bd37a3472d36873ade9a190209
2023-05-08 08:04:09 +00:00
Alf Eaton
009a108c71 Wrap setCursorHighlights in setTimeout (#12951)
GitOrigin-RevId: 204bf073bc2f4a014d9498c6a802fe38e52b22c5
2023-05-08 08:04:00 +00:00
Alf Eaton
0fba9dc374 Add a $CtrlSym group to the latex language (#12919)
GitOrigin-RevId: 4ee8ba7fe85f37dbe4cab04dae699b2a66007a2d
2023-05-08 08:03:51 +00:00
Rebeka
0c54e6605b Remove deprecated uses of badge style
GitOrigin-RevId: 47234e95acd42d7e5d23de8e3b67edca2bdd98d1
2023-05-04 08:05:40 +00:00
Alf Eaton
680a02892c Duplicate the cloneSelectionVertically key mapping to re-allow Ctrl on macOS (#12918)
GitOrigin-RevId: 747e8889b5e3b34dd9ffef888f4a1d42fea1af74
2023-05-04 08:05:31 +00:00
Alf Eaton
2093d85a5f Exclude CtrlSym commands from completion (#12905)
GitOrigin-RevId: f6d1813eba6c17444d2371b024f538137c244963
2023-05-04 08:05:23 +00:00
Alf Eaton
b010d6a5d3 Handle unset editor theme (#12892)
GitOrigin-RevId: 0e3413c08c6fd0752cd90ee868fec9b0f9f77437
2023-05-04 08:05:14 +00:00
Alf Eaton
09c5bf72d2 [cm6] Use Cmd on macOS for cloneSelectionVertically (#12855)
GitOrigin-RevId: ea72da47f2ebb377cf22af061ab616a021950502
2023-05-04 08:04:57 +00:00
Alf Eaton
8a12c34fce [cm6] Emacs: close search form when Enter is pressed in "Find" input (#12841)
GitOrigin-RevId: a4c974f45e0dbb13d96b9b424f056768449791fb
2023-05-04 08:04:49 +00:00
Alf Eaton
6c21f0821c [cm6] Handle multiple selection ranges when applying snippets (#12830)
* Use fork of @codemirror/autocomplete
* Handle multiple selection ranges when applying snippets

GitOrigin-RevId: 04afc087ac127206463ea3d4950284a50308364a
2023-05-04 08:04:39 +00:00
Alf Eaton
05582567b4 Improve performance of search match counting (#12808)
GitOrigin-RevId: 70cd1aaf5b079cbd540c4a9f92a04fcb2786b308
2023-05-04 08:04:30 +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
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
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
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
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
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
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
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
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
Alf Eaton
359255b820 [cm6] Use a modified fork of the closeBrackets extension (#12573)
GitOrigin-RevId: a24020ed216cb10defff989f5876666c29889de2
2023-04-17 08:04:43 +00:00
Alf Eaton
dda9230c6c [rich text] Add "Insert Citation" and "Insert Cross-reference" buttons (#12529)
GitOrigin-RevId: fde2f1a281318afede138ccae12f73ade3fa9f65
2023-04-17 08:04:34 +00:00
Alf Eaton
39df55787c Improve handling of doc:saved events (#12522)
GitOrigin-RevId: 0ebf198548f6aeecb356405b0c582d3fd64db391
2023-04-17 08:04:26 +00:00
Alf Eaton
a8ed6b65e1 [cm6] Improve "vertical overflow" handling (#12405)
* Avoid setting style on the editor view whenever overflowPaddingState changes
* Round values in recalculateScreenPositions
* Refactor ignoreGeometryChangesUntil slightly
* Restore the original value

GitOrigin-RevId: 75c57be21dd16a748c0d9b14058386849a80b831
2023-04-17 08:04:18 +00:00
Alf Eaton
ab10fd99f5 Add CodeMirror dev tools extension (#12142)
GitOrigin-RevId: 148a0fba5faf6dc8f638fcb4666e2fda6c5c6c40
2023-04-17 08:04:09 +00:00
Alf Eaton
161decd67d Upgrade @codemirror/view (#12574)
* Upgrade @codemirror/view
* Disable emptyLineFiller extension

GitOrigin-RevId: 57ce4194ece0ea448e24184f0b3a3e13352cb014
2023-04-17 08:04:00 +00:00
Tim Down
7f37ba737c Move source editor out of module (#12457)
* 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
2023-04-13 08:40:56 +00:00
Jessica Lawshe
a4586074d7 Merge pull request #12442 from overleaf/jel-bsStyle
[web] Add bsStyle to `react-bootstrap` buttons

GitOrigin-RevId: 0059a457cbd8b4c316aa3b34e4d77f1b92bd690e
2023-04-05 08:02:50 +00:00
Alf Eaton
1807f18b7d Add a tooltip to the disabled Rich Text toggle (#11843)
GitOrigin-RevId: e7be96c68d87ab1f1ed40c8e9784160689ee8e96
2023-02-17 09:04:15 +00:00
Miguel Serrano
286cbc66a8 Merge pull request #11771 from overleaf/msm-force-ace-sp
[web] Force Ace editor in Server Pro

GitOrigin-RevId: 1ea5675ad1c64a15dc30566c02d694feb2aaed3c
2023-02-10 09:12:26 +00:00