gristlabs_grist-core/app/client/components
Alex Hall 0c80547e0d (core) Change UndoStack._linkMap to store an array of action groups for each linkId
Summary:
While working on type conversion, I ran into a bug when multiple action groups belonging to a bundle are quickly sent. `DocData._sendActionsImpl` can set the same `linkId: this._lastActionNum` on multiple action groups before `_lastActionNum` is updated with a result from the server. Only one of these groups gets saved in `UndoStack._linkMap` so undoing a bundle misses out on some action groups.

This diff associates each `linkId` key with an array of action groups instead of just one, then combines them all together when undoing.

Test Plan: I've confirmed that this fixes my problem within my type conversion diff, but I haven't found a way to reproduce the general problem in master. I think the existing tests are probably fine since undo is tested extensively everywhere, but I'd also like to see if there are existing bugs which this fixes.

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3223
2022-01-20 19:00:01 +02:00
..
AceEditor.css
AceEditor.js (core) Fixing scrollbars on ace editor for windows users. 2021-10-25 10:56:43 +02:00
AceEditorCompletions.ts (core) One more phase of ACL UI revision. 2020-12-22 22:18:12 -05:00
ActionLog.css
ActionLog.ts (core) Add rules to eslint to better match our coding conventions. 2021-05-24 12:56:18 -04:00
Base.js
BaseView.js (core) Scrolling to the active record when editor is activated 2022-01-10 23:35:08 +01:00
CellPosition.ts (core) Draft cells 2021-05-25 21:14:49 +02:00
ChartView.css
ChartView.ts (core) Disallow using non numeric type in chart's series 2022-01-18 17:56:53 +01:00
ClientScope.ts
Clipboard.css
Clipboard.js (core) Trim trailing whitespace when pasting plain text 2021-11-04 01:26:47 +02:00
CodeEditorPanel.css (core) apply access control to code view 2021-05-27 17:52:23 -04:00
CodeEditorPanel.js (core) apply access control to code view 2021-05-27 17:52:23 -04:00
ColumnFilters.css (core) Context menu for cards. 2021-06-29 15:29:56 +02:00
ColumnTransform.ts (core) Configure more comprehensive eslint rules for Typescript 2021-04-26 18:54:55 -04:00
Comm.ts (core) Remove a bunch of dead code 2021-07-01 18:38:21 +02:00
commandList.js (core) Widget options api 2022-01-13 11:10:17 +01:00
commands.css
commands.js
CopySelection.ts (core) Reference and ReferenceList formatters 2022-01-13 18:09:33 +02:00
Cursor.ts (core) Support 'new' row in anchor links. 2021-09-24 09:01:10 -04:00
CursorMonitor.ts (core) Exposing custom widgets on the UI 2021-12-01 18:21:06 +01:00
CustomView.css
CustomView.ts (core) Widget options api 2022-01-13 11:10:17 +01:00
DetailView.css (core) Context menu for cards. 2021-06-29 15:29:56 +02:00
DetailView.js (core) Scrolling to the active record when editor is activated 2022-01-10 23:35:08 +01:00
DocComm.ts (core) Add diff preview to Importer 2021-10-08 14:15:07 -07:00
DocConfigTab.js
Drafts.ts (core) Adding colors to toast notification 2021-10-05 10:19:25 +02:00
duplicatePage.ts (core) Duplicate page should copy filters. 2022-01-04 14:49:33 +01:00
EditorMonitor.ts (core) Storing last position for doc and user 2021-11-19 12:01:49 +01:00
EmbedForm.css
FieldConfigTab.css
FormulaTransform.ts (core) Automatically finalize action bundles when unrelated actions/bundles come in. 2020-11-10 10:32:07 -05:00
GridView.css (core) Better UX in full-edit mode for the formula editor 2021-12-27 13:56:04 +01:00
GridView.js (core) Improving experience when editing group-by column. 2022-01-18 14:31:31 +01:00
GristDoc.css
GristDoc.ts (core) Fix error when creating chart with a single column 2022-01-19 16:48:31 +01:00
GristWSConnection.ts (core) Add rules to eslint to better match our coding conventions. 2021-05-24 12:56:18 -04:00
Importer.ts (core) Adding Skip options when importing multiple tables. 2021-12-13 19:07:33 +01:00
Layout.css (core) Collapse inactive view sections on mobile screens. 2021-02-09 09:17:32 -05:00
Layout.js (core) Fixing bug with undoing page delation with a custom layout 2021-12-20 19:32:14 +01:00
LayoutEditor.css
LayoutEditor.js
LayoutPreview.css
LayoutPreview.js
LinkingState.ts (core) Fixing bug with undoing page delation with a custom layout 2021-12-20 19:32:14 +01:00
Login.css
ParseOptions.ts
PluginScreen.ts (core) Add column matching to Importer 2021-11-09 12:30:52 -08:00
Preferences.css
Printing.css
Printing.ts
RecordLayout.css
RecordLayout.js (core) Fix adding multiple fields when editing card layout 2022-01-18 10:37:46 -05:00
RecordLayoutEditor.js
RefSelect.js (core) Update UI for formula and column label/id in the right-side panel. 2021-03-17 01:35:56 -04:00
SearchBar.css
Selector.js (core) Configure more comprehensive eslint rules for Typescript 2021-04-26 18:54:55 -04:00
SummaryConfig.js
TypeConversion.ts (core) Fix converting column to ChoiceList when cells contain JSON arrays with non-string values 2021-11-09 12:53:20 +02:00
TypeTransform.ts (core) Add rules to eslint to better match our coding conventions. 2021-05-24 12:56:18 -04:00
UndoStack.ts (core) Change UndoStack._linkMap to store an array of action groups for each linkId 2022-01-20 19:00:01 +02:00
UnsavedChanges.ts
ValidationPanel.css
ValidationPanel.js
viewCommon.css (core) Set min-height for cells, including in Card view, to make them look consistent. 2021-11-19 17:23:03 -05:00
viewCommon.js (core) Skip saving column resizes in read-only mode 2021-12-07 14:37:25 -08:00
ViewConfigTab.css
ViewConfigTab.js (core) Exposing custom widgets on the UI 2021-12-01 18:21:06 +01:00
ViewLayout.css (core) Show sigma next to summary table titles 2021-07-12 20:10:15 -07:00
ViewLayout.ts (core) Skip saving layout resizes in read-only mode 2021-12-06 07:37:45 -08:00
ViewLinker.css
ViewPane.ts (core) Update UI for formula and column label/id in the right-side panel. 2021-03-17 01:35:56 -04:00
WidgetFrame.ts (core) Widget options api 2022-01-13 11:10:17 +01:00