gristlabs_grist-core/app/client/components
Alex Hall bd52665f96 (core) Allow adding rows to widgets filtered by a link using a formula column
Summary:
When a widget `A` is selected by a widget `B` so that `A` is filtered, adding a new row to `A` uses the values in the selected row of `B` and the columns relevant to the linking as default values for the new row. This ensures that the new row matches the current linking filter and remains visible. However this would previously cause a sandbox error when one of the linking columns was a formula column, which doesn't allow setting values. This diff ignores formula columns when picking default values.

Since the value of the formula column in the new row typically won't match the linking filter, extra measures are needed to avoid the new row immediately disappearing. Regular filters already have a mechanism for this, but I didn't manage to extend it to also work for linking. Thanks @dsagal for creating `UnionRowSource` (originally in D4017) which is now used as the solution for temporarily exempting rows from both kinds of filtering.

While testing, I also came across another bug in linking summary tables that caused incorrect filtering, which I fixed with some changes to `DynamicQuerySet`.

Test Plan: Extended an nbrowser test, which both tests for the main change as well as the secondary bugfix.

Reviewers: georgegevoian

Reviewed By: georgegevoian

Subscribers: dsagal

Differential Revision: https://phab.getgrist.com/D4135
2023-12-18 20:28:41 +02:00
..
AceEditor.css (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
AceEditor.js (core) Implement AI Assistant UI V2 2023-07-13 10:30:35 -04:00
AceEditorCompletions.ts (core) Implement AI Assistant UI V2 2023-07-13 10:30:35 -04:00
ActionLog.css (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
ActionLog.ts (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
Banner.ts (core) Add AI assistant usage banners 2023-08-30 16:00:04 -04:00
Base.js (core) move client code to core 2020-10-02 13:24:21 -04:00
BaseView2.ts (core) Allow adding rows to widgets filtered by a link using a formula column 2023-12-18 20:28:41 +02:00
BaseView.js (core) Allow adding rows to widgets filtered by a link using a formula column 2023-12-18 20:28:41 +02:00
BehavioralPromptsManager.ts (core) Show tooltips in other Grist flavors 2023-10-31 23:56:27 -04:00
buildViewSectionDom.ts (core) Enable Record Cards 2023-11-21 16:49:41 -05:00
CellPosition.ts (core) Cursor in custom widgets 2023-08-29 09:19:52 +02:00
CellSelector.ts (core) Fixing bug with hiding multiple columns 2023-12-08 10:20:43 +01:00
ChartView.css (core) move client code to core 2020-10-02 13:24:21 -04:00
ChartView.ts i18n: userManager translation + some forgotten translations (#557) 2023-07-16 12:52:13 -04:00
ClientScope.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
Clipboard.css (core) move client code to core 2020-10-02 13:24:21 -04:00
Clipboard.js (core) Add cut, copy, and paste to context menu 2023-05-10 00:48:15 -04:00
CodeEditorPanel.css (core) Improve dark mode 2023-04-12 01:58:48 -04:00
CodeEditorPanel.ts Remove prefix from translations keys 2023-01-03 16:01:45 +01:00
ColumnFilters.css (core) Context menu for cards. 2021-06-29 15:29:56 +02:00
ColumnTransform.ts (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
Comm.ts (core) Fix issue with 'UNEXPECTED ORDER OF CALLBACKS' in Client.ts. 2022-06-16 23:51:14 -04:00
commandList.ts (core) Add shortcut for opening Record Card 2023-12-08 11:32:45 -05:00
commands.css (core) move client code to core 2020-10-02 13:24:21 -04:00
commands.ts (core) Floating formula editor 2023-06-02 17:59:22 +02:00
CopySelection.ts (core) Cursor in custom widgets 2023-08-29 09:19:52 +02:00
Cursor.ts Bidirectional Linking (#622) 2023-09-25 18:48:18 -04:00
CursorMonitor.ts (core) Cursor in custom widgets 2023-08-29 09:19:52 +02:00
CustomCalendarView.ts (core) support for bundling custom widgets with the Grist app 2023-10-27 17:00:10 -04:00
CustomView.css (core) Fix CustomView css to take full height of widget on all browsers including Safari 2020-10-06 13:18:50 -04:00
CustomView.ts fix shadowed variable in CustomView (#743) 2023-11-13 10:56:01 -05:00
DataTables.ts (core) Allow descriptions for Raw Data tables 2023-12-04 16:52:56 -05:00
DetailView.css (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
DetailView.js (core) Enable Record Cards 2023-11-21 16:49:41 -05:00
DocComm.ts (core) Billing for formula assistant 2023-07-10 13:24:08 +02:00
DocConfigTab.js (core) move client code to core 2020-10-02 13:24:21 -04:00
DocumentUsage.ts (core) Add AI assistant usage banners 2023-08-30 16:00:04 -04:00
Drafts.ts Change translation keys for components directory 2023-01-03 15:49:26 +01:00
duplicatePage.ts (core) Polish tutorial popups 2023-04-20 12:20:03 -04:00
EditorMonitor.ts (core) Fix problem with localStorage in some cross-origin embed situations 2022-11-30 23:52:50 -05:00
EmbedForm.css (core) move client code to core 2020-10-02 13:24:21 -04:00
FieldConfigTab.css (core) move client code to core 2020-10-02 13:24:21 -04:00
FormulaTransform.ts (core) TypeTransform race condition fix 2023-08-02 17:11:34 +02:00
GridView.css (core) Allow scrolling the grid horizontally while column-shadow is under the cursor 2023-09-26 20:42:10 -04:00
GridView.js (core) Add shortcut for opening Record Card 2023-12-08 11:32:45 -05:00
GristDoc.css (core) move client code to core 2020-10-02 13:24:21 -04:00
GristDoc.ts (core) Enable Record Cards 2023-11-21 16:49:41 -05:00
GristWSConnection.ts (core) Manage memory used for websocket responses to reduce the risk of server crashes. 2023-08-07 11:28:31 -04:00
Importer.ts (core) Adding testId to the widget iframe once it receives the ready message 2023-08-30 21:28:06 +02:00
Layout.css (core) Expanding widgets 2023-01-19 09:46:59 +01:00
Layout.ts (core) Avoiding the view layout's rebuild, when nothing has changed. 2023-09-18 09:47:50 +02:00
LayoutEditor.css (core) move client code to core 2020-10-02 13:24:21 -04:00
LayoutEditor.ts (core) Minimazing widgets 2023-03-02 11:22:49 +01:00
LayoutTray.ts (core) Adjust the style of the 'attic' to have more of a toolbar feel, flush to the top, and taking up less space 2023-06-30 08:22:26 -04:00
LinkingState.ts (core) Fix selecting new row in chain of filter links 2023-12-05 16:56:13 +02:00
Login.css (core) move client code to core 2020-10-02 13:24:21 -04:00
modals.ts (core) Fix blurry tooltips 2023-09-22 03:51:58 -04:00
ParseOptions.ts (core) Improve encoding detection for csv imports, and make encoding an editable option. 2023-08-24 09:50:52 -04:00
PluginScreen.ts (core) Import redesign 2023-08-04 14:59:55 +02:00
Printing.css (core) Improve printing of tables, fix printing of charts, add a browser test. 2020-10-12 16:04:18 -04:00
Printing.ts (core) Improve dark mode 2023-04-12 01:58:48 -04:00
RawDataPage.ts (core) Record Cards 2023-11-19 20:12:37 -05:00
RecordCardPopup.ts (core) Enable Record Cards 2023-11-21 16:49:41 -05:00
RecordLayout.css (core) Add behavioral and coaching call popups 2022-12-20 09:49:41 -05:00
RecordLayout.js (core) Record Cards 2023-11-19 20:12:37 -05:00
RecordLayoutEditor.js (core) Minimazing widgets 2023-03-02 11:22:49 +01:00
RefSelect.ts (core) Record Cards 2023-11-19 20:12:37 -05:00
SearchBar.css (core) move client code to core 2020-10-02 13:24:21 -04:00
SelectionSummary.ts (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
TypeConversion.ts (core) Guessing column widget options when transforming from 2023-10-30 13:36:39 +01:00
TypeTransform.ts (core) Guessing column widget options when transforming from 2023-10-30 13:36:39 +01:00
UndoStack.ts (core) Cursor in custom widgets 2023-08-29 09:19:52 +02:00
UnsavedChanges.ts (core) support ?embed=true and &style=light for a clean embed experience 2020-08-14 13:34:38 -04:00
ValidationPanel.css (core) move client code to core 2020-10-02 13:24:21 -04:00
ValidationPanel.js Remove prefix from translations keys 2023-01-03 16:01:45 +01:00
ViewAsBanner.ts (core) Adds dots menu to access rules page item 2023-01-12 09:40:45 +01:00
viewCommon.css (core) Polish new Add Column menu 2023-10-17 15:39:53 -04:00
viewCommon.js (core) Skip saving column resizes in read-only mode 2021-12-07 14:37:25 -08:00
ViewConfigTab.css (core) move client code to core 2020-10-02 13:24:21 -04:00
ViewConfigTab.js (core) Record Cards 2023-11-19 20:12:37 -05:00
ViewLayout.css (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
ViewLayout.ts (core) Enable Record Cards 2023-11-21 16:49:41 -05:00
ViewLinker.css (core) move client code to core 2020-10-02 13:24:21 -04:00
ViewPane.ts (core) Implementing row conditional formatting 2022-08-09 20:11:36 +02:00
WidgetFrame.ts (core) Fixing bug with collapsed custom widget. 2023-11-08 07:36:21 +01:00