gristlabs_grist-core/app/client/components
Alex Hall 42060df29a (core) Formula autocomplete improvements for references and lookups
Summary:
Makes the following improvements to formula autocomplete:

- When a user types `$RefCol` (or part of it), also show `$RefCol.VisibleCol` (replace actual column names) in the autocomplete even before the `.` is typed, to help users understand the difference between a raw reference/record and its visible column.
- When a user types a table name, show `.lookupOne` and `.lookupRecords` in the autocomplete, again even before the `.` is typed.
- For `.lookupRecords(` and `.lookupOne(`, once the `(` is entered, suggest each column name as a keyword argument.
- Also suggest lookup arguments involving compatible reference columns, especially 'reverse reference' lookups like `refcol=$id` which are very common and difficult for users.
- To support these features, the Ace editor autocomplete needs some patching to fetch fresh autocomplete options after typing `.` or `(`. This also improves unrelated behaviour that wasn't great before when one column name is contained in another. See the first added browser test.

Discussions:

- https://grist.slack.com/archives/CDHABLZJT/p1659707068383179
- https://grist.quip.com/HoSmAlvFax0j#MbTADAH5kgG
- https://grist.quip.com/HoSmAlvFax0j/Formula-Improvements#temp:C:MbT3649fe964a184e8dada9bbebb

Test Plan: Added Python and nbrowser tests.

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D3580
2022-08-20 19:11:41 +02:00
..
AceEditor.css
AceEditor.js (core) Implementing row conditional formatting 2022-08-09 20:11:36 +02:00
AceEditorCompletions.ts (core) Formula autocomplete improvements for references and lookups 2022-08-20 19:11:41 +02:00
ActionLog.css
ActionLog.ts (core) Faster builds all around. 2022-07-04 10:42:40 -04:00
Banner.ts (core) Add product for new personal plan 2022-07-26 11:33:23 -07:00
Base.js
BaseView2.ts
BaseView.js (core) Add 'Show raw data' widget menu option 2022-08-02 20:01:44 +02:00
CellPosition.ts
ChartView.css
ChartView.ts (core) Implementing row conditional formatting 2022-08-09 20:11:36 +02:00
ClientScope.ts
Clipboard.css
Clipboard.js
CodeEditorPanel.css
CodeEditorPanel.ts (core) Raw renames 2022-04-27 22:21:55 +02:00
ColumnFilters.css
ColumnTransform.ts
Comm.ts (core) Fix issue with 'UNEXPECTED ORDER OF CALLBACKS' in Client.ts. 2022-06-16 23:51:14 -04:00
commandList.js (core) Adding hide for multiple columns 2022-08-17 22:31:16 +02:00
commands.css
commands.js
CopySelection.ts
Cursor.ts (core) Faster builds all around. 2022-07-04 10:42:40 -04:00
CursorMonitor.ts (core) Raw renames 2022-04-27 22:21:55 +02:00
CustomView.css
CustomView.ts (core) Faster builds all around. 2022-07-04 10:42:40 -04:00
DataTables.ts (core) Polish display of table row counts 2022-08-11 09:45:33 -07:00
DetailView.css (core) Implementing row conditional formatting 2022-08-09 20:11:36 +02:00
DetailView.js
DocComm.ts (core) add an access token mechanism to help with attachments in custom widgets 2022-07-19 11:55:18 -04:00
DocConfigTab.js
DocumentUsage.ts (core) Polish display of table row counts 2022-08-11 09:45:33 -07:00
Drafts.ts
duplicatePage.ts (core) Speed up and upgrade build. 2022-06-27 16:10:10 -04:00
EditorMonitor.ts (core) Raw renames 2022-04-27 22:21:55 +02:00
EmbedForm.css
FieldConfigTab.css
FormulaTransform.ts (core) Implementing row conditional formatting 2022-08-09 20:11:36 +02:00
GridView.css (core) Disable overscroll in gridview 2022-06-13 11:28:33 -07:00
GridView.js (core) Adding hide for multiple columns 2022-08-17 22:31:16 +02:00
GristDoc.css
GristDoc.ts (core) Fix 'select by' when adding summary table widget to page 2022-07-19 16:28:38 +02:00
GristWSConnection.ts (core) Fix issue with 'UNEXPECTED ORDER OF CALLBACKS' in Client.ts. 2022-06-16 23:51:14 -04:00
Importer.ts (core) Implementing row conditional formatting 2022-08-09 20:11:36 +02:00
Layout.css
Layout.js
LayoutEditor.css
LayoutEditor.js
LayoutPreview.css
LayoutPreview.js
LinkingState.ts (core) Faster builds all around. 2022-07-04 10:42:40 -04:00
Login.css
ParseOptions.ts
PluginScreen.ts
Preferences.css
Printing.css
Printing.ts (core) Faster builds all around. 2022-07-04 10:42:40 -04:00
RawData.ts (core) Raw renames 2022-04-27 22:21:55 +02:00
RecordLayout.css
RecordLayout.js
RecordLayoutEditor.js
RefSelect.ts (core) Reference columns weren't added to Raw Data Views 2022-07-07 17:07:13 +02:00
SearchBar.css
Selector.js (core) Fixing bug with first click on windows 2022-06-30 17:08:57 +02:00
TypeConversion.ts (core) Don't clear widget options when changing column type 2022-07-11 14:27:44 +02:00
TypeTransform.ts (core) Implementing row conditional formatting 2022-08-09 20:11:36 +02:00
UndoStack.ts
UnsavedChanges.ts
ValidationPanel.css
ValidationPanel.js
viewCommon.css (core) Implementing row conditional formatting 2022-08-09 20:11:36 +02:00
viewCommon.js
ViewConfigTab.css
ViewConfigTab.js (core) Implementing row conditional formatting 2022-08-09 20:11:36 +02:00
ViewLayout.css (core) Raw renames 2022-04-27 22:21:55 +02:00
ViewLayout.ts (core) Faster builds all around. 2022-07-04 10:42:40 -04:00
ViewLinker.css
ViewPane.ts (core) Implementing row conditional formatting 2022-08-09 20:11:36 +02:00
WidgetFrame.ts (core) add an access token mechanism to help with attachments in custom widgets 2022-07-19 11:55:18 -04:00