gristlabs_grist-core/app
Alex Hall d1a848b44a (core) Parse string cell values in Doc API and Imports
Summary:
- Adds a function `parseUserAction` for parsing strings in UserActions to `ValueParser.ts`
- Adds a boolean option `parseStrings` to use `parseUserAction` in `ActiveDoc.applyUserActions`, off by default.
- Uses `parseStrings` by default in DocApi (set `?noparse=true` in a request to disable) when adding/updating records through the `/data` or `/records` endpoints or in general with the `/apply` endpoint.
- Uses `parseStrings` for various actions in `ActiveDocImport`. Since most types are parsed in Python before these actions are constructed, this only affects references, which still look like errors in the import preview. Importing references can also easily still run into more complicated problems discussed in https://grist.slack.com/archives/C0234CPPXPA/p1639514844028200

Test Plan:
- Added tests to DocApi to compare behaviour with and without string parsing.
- Added a new browser test, fixture doc, and fixture CSV to test importing a file containing references.

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3183
2021-12-17 15:40:58 +02:00
..
client (core) Use visibleCol instead of displayCol with createFormatter 2021-12-16 22:19:36 +02:00
common (core) Parse string cell values in Doc API and Imports 2021-12-17 15:40:58 +02:00
gen-server (core) move more tests to grist-core 2021-12-10 18:33:07 -05:00
plugin (core) Parsing multiple values in reflists, parsing refs without table data in client 2021-11-09 14:41:04 +02:00
server (core) Parse string cell values in Doc API and Imports 2021-12-17 15:40:58 +02:00
tsconfig.json (core) move home server into core 2020-07-21 20:39:10 -04:00