Files
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
..
2020-10-02 13:24:21 -04:00
2020-10-02 13:24:21 -04:00
2022-07-04 10:42:40 -04:00
2020-10-02 13:24:21 -04:00
2021-05-25 21:14:49 +02:00
2020-10-02 13:24:21 -04:00
2020-10-02 13:24:21 -04:00
2020-10-02 13:24:21 -04:00
2022-04-27 22:21:55 +02:00
2020-10-02 13:24:21 -04:00
2022-07-04 10:42:40 -04:00
2022-04-27 22:21:55 +02:00
2022-07-04 10:42:40 -04:00
2022-02-19 09:46:49 +00:00
2022-04-27 22:21:55 +02:00
2020-10-02 13:24:21 -04:00
2020-10-02 13:24:21 -04:00
2020-10-02 13:24:21 -04:00
2022-07-04 10:42:40 -04:00
2022-04-27 22:21:55 +02:00
2022-02-19 09:46:49 +00:00
2020-10-02 13:24:21 -04:00
2022-04-27 22:21:55 +02:00
2022-07-04 10:42:40 -04:00
2020-10-02 13:24:21 -04:00