Commit graph

861 commits

Author SHA1 Message Date
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
Alf Eaton
6ca565fa90 Fix autocomplete hotkeys description (#12607)
GitOrigin-RevId: f7f80fdf56f97ee70accec0162e6b395cfd16584
2023-04-17 08:04:51 +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
Jakob Ackermann
1096c81f4a Merge pull request #12528 from overleaf/jpa-switch-dashboard-events-to-bq
[web] switch events on project dashboard to BQ

GitOrigin-RevId: 9326c19cc5663c4dc2919877eb8df91e312bb902
2023-04-14 08:03:12 +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
M Fahru
3f992f9453 Ensure new data are fetched properly whenever history is opened (#12577)
GitOrigin-RevId: e0ae14cdc90c95dbd44b12bd8332bc982ea34a10
2023-04-13 08:04:45 +00:00
Alexandre Bourdin
f03b75e55f [web] Tags/color picker tweaks (#12595)
* 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
2023-04-13 08:04:37 +00:00
Alexandre Bourdin
376d9c43a3 Merge pull request #12374 from overleaf/ab-rename-folders-tags
[web] Rename folders to tags

GitOrigin-RevId: 05c34c515aeeb9230ed512c267f97bcb679767a8
2023-04-13 08:04:20 +00:00
Alexandre Bourdin
481cd14cb1 Merge pull request #12557 from overleaf/ii-history-react-labels-only
[web] History labels only list

GitOrigin-RevId: 58b8e5a5af0754e32841223f9c478c25900df526
2023-04-13 08:04:12 +00:00
Alexandre Bourdin
04c204f989 [web] Colour picker for tags (#12255)
* 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
2023-04-13 08:04:03 +00:00
M Fahru
fb6746a887 Add default pathname logic on history react file tree (#12505)
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
2023-04-12 08:04:58 +00:00
June Kelly
17109393c5 Merge pull request #12387 from overleaf/jk-split-button-tweaks
[web] Split-menu style tweaks

GitOrigin-RevId: a04121981c4fe240c247cf03da5be7052c26f541
2023-04-12 08:04:28 +00:00
June Kelly
841df71a1d Merge pull request #12342 from overleaf/jk-password-ux-please-use-another-password
[web] Password UX: 'Please use another password'

GitOrigin-RevId: ca9b26cbcf2dabb27c716da314764ee40ffc83dd
2023-04-12 08:04:13 +00:00
ilkin-overleaf
8e0aa685ce Merge pull request #12549 from overleaf/ii-history-react-list-of-all-versions
[web] All versions of history entries

GitOrigin-RevId: 7365ac4913c115b3b2872a3713d893463719c15e
2023-04-12 08:03:47 +00:00
Miguel Serrano
ea0df8a7dd Merge pull request #12506 from overleaf/msm-check-github-module-frontend
[web] add checks for github and V1 being available

GitOrigin-RevId: 90ba19d41c28bbc96d07825086697d2f946eabcd
2023-04-05 09:05:27 +00:00
M Fahru
17a98d756e Add badges UI to history react file tree (#12479)
GitOrigin-RevId: 52c45b72110e01bb193139654fa9385cb9b9e489
2023-04-05 08:03:05 +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
Eric Mc Sween
6b110cf4d0 Merge pull request #12481 from overleaf/td-history-remove-source-editor-imports
Remove accidental imports from source-editor module in history

GitOrigin-RevId: 808597e113c3b1e74cacc712313af0e20b0e1786
2023-04-04 12:22:25 +00:00
M Fahru
9a55bbf325 Port editor react file tree to history file tree (#12453)
This new history file tree is mostly copied from the editor file tree, with some of the features stripped away:

1. Remove multiple selections
2. Remove drag and drop ability
3. Remove the ability to rename files & folders
4. No more right-click hijacking (context menu)
5. No more triple dots menu on a file tree item shown
6. No file references, since history doesn't have the data to differentiate between real files and linked file
7. etc (some other small changes that are not too important to be listed)

Other notable changes:

1. Simplify the selectable provider (the only context provider being copied from react file tree)
2. Convert to typescript

GitOrigin-RevId: 1017e545b2bd99775e01307a9b7eac2daf454014
2023-04-04 08:05:30 +00:00
ilkin-overleaf
dfda9d0677 Merge pull request #12434 from overleaf/ii-history-react-feature-flag
[web] Fix history view feature flag

GitOrigin-RevId: af2e76074ed43ec1ed1b877a6ffd403abab48ec8
2023-04-04 08:03:50 +00:00
Tim Down
11f8905be4 Connect up document diff viewer to history state
GitOrigin-RevId: 610a254ea77c194969033d0791ecf1129e02c4bf
2023-03-31 08:03:47 +00:00