Commit Graph

2321 Commits

Author SHA1 Message Date
gallegonovato
b59b5054bd
Translated using Weblate (Spanish)
Currently translated at 100.0% (998 of 998 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/es/
2023-11-03 13:32:35 +01:00
Alex Hall
fb09b7afa0 (core) Avoid quadratic time complexity in fetch_table with query
Summary: While looking at webhooks code, I noticed that it calls `ActiveDoc.fetchQuery` (which I think typically leads to the sandbox method `fetch_table`) with a query on the `id` column, where the values could potentially be all row IDs in the table (e.g. if a new column was added, as in a recent discussion about webhooks gone wrong). This suggests that `fetch_table` should try to avoid using a list for values when possible. In practice this only starts to become an issue at about 10k rows, so I don't know if this has caused any real problems, but it seemed like something worth fixing.

Test Plan:
Extended unit tests for correctness. Tested performance manually. Made a doc with this formula:

```
import time
row_ids = list(Table2.table.row_ids)
query = {"id": row_ids}
start = time.time()
result = table.table._engine.fetch_table('Table2', query=query)
end = time.time()
assert result[1] == row_ids
end - start, len(row_ids)
```

Then put a bunch of rows in `Table2`. This diff made the returned elapsed time much less.

Reviewers: georgegevoian

Reviewed By: georgegevoian

Subscribers: jarek

Differential Revision: https://phab.getgrist.com/D4092
2023-11-03 13:24:05 +02:00
Peter Dave Hello
1685b88973
Added translation using Weblate (Chinese (Traditional)) 2023-11-02 13:37:19 +01:00
Ariejan de Vroom
7e9ecb5023
Added translation using Weblate (Dutch) 2023-11-02 10:35:33 +01:00
George Gevoian
7a85aaa7a1 (core) Add new telemetry events
Summary: Adds a handful of new telemetry events, and makes a few tweaks to allow for better organization of telemetry.

Test Plan: Manual.

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D4100
2023-11-01 10:49:33 -04:00
George Gevoian
51f7402297 (core) Show tooltips in other Grist flavors
Summary:
This enables tooltips in other Grist deployment types (e.g. grist-core). Previously,
most of these tooltips were only enabled in the SaaS offering of Grist.

Test Plan: Browser tests.

Reviewers: jarek

Reviewed By: jarek

Subscribers: jarek

Differential Revision: https://phab.getgrist.com/D4097
2023-10-31 23:56:27 -04:00
Paul Fitzpatrick
4fb1df567b (core) change handling of server access prior to full configuration
Summary:
Recently, the server became more strict about not responding to
requests before being fully configured. This is a problem when
a doc worker is trying to check whether it has become available
from a load balancer.

This change gives access to health checks prior to configuration
being complete. Otherwise, app endpoints accessed before full
configuration return a 503.

A flag is added to /status to allow checking explicitly for
the server being ready and configured.

Test Plan: manual

Reviewers: dsagal

Reviewed By: dsagal

Subscribers: dsagal

Differential Revision: https://phab.getgrist.com/D4103
2023-10-31 17:42:48 -04:00
gallegonovato
d29e23efe8
Translated using Weblate (Spanish)
Currently translated at 99.8% (997 of 998 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/es/
2023-10-31 15:03:39 +01:00
son_ gcs
9557f8c4e4
Added translation using Weblate (Thai) 2023-10-31 08:53:12 +00:00
Paul Fitzpatrick
07bb90b5a6
allow bundled widgets to be hidden from dropdown, and nested (#714)
This makes a few refinements to bundling widgets:

  * A widget with `published: false` is not shown in the
    custom widget dropdown in the UI. This is so widgets
    can be bundled with the app for "native" use (like the
    calendar widget) without immediately resulting in an
    extra listing in the UI. (There are improvements we'd
    like to make to the UI to better communicate widget
    provenance and quality eventually, which would be a
    helpful alternative to just a binary flag.)

  * A relative path to the custom widget manifest is
    respected. This will make the bundling process marginally
    neater.
2023-10-30 21:13:21 -04:00
github-actions[bot]
7c4d9e2caf
automated update to translation keys (#713)
Co-authored-by: Paul's Grist Bot <paul+bot@getgrist.com>
2023-10-30 15:06:24 -04:00
github-actions[bot]
98dc10dec7
automated update to translation keys (#711)
Co-authored-by: Paul's Grist Bot <paul+bot@getgrist.com>
2023-10-30 09:53:21 -04:00
Paul Fitzpatrick
6059bdcf66
rename variable to avoid shadowing another (#712)
This fixes a small lint issue in some widget bundling code.
2023-10-30 09:52:42 -04:00
Paul Fitzpatrick
cc6265eebf (core) updates from grist-core 2023-10-30 09:20:10 -04:00
Jarosław Sadziński
c7ba31eb7d (core) Guessing column widget options when transforming from
Summary:
When converting changing the type of Any column, try to guess
the widgetOptions. Especially important for choice and choiceList types.

Test Plan: Existing

Reviewers: alexmojaki

Reviewed By: alexmojaki

Differential Revision: https://phab.getgrist.com/D4088
2023-10-30 13:36:39 +01:00
Franček Prijatelj
1137c5c047
Translated using Weblate (Slovenian)
Currently translated at 100.0% (994 of 994 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/sl/
2023-10-28 06:11:19 +02:00
jarek
4b06cc38b7
Translated using Weblate (Polish)
Currently translated at 77.1% (767 of 994 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/pl/
2023-10-28 06:11:19 +02:00
Владимир В
54387baf08
Translated using Weblate (Russian)
Currently translated at 99.5% (990 of 994 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/ru/
2023-10-28 06:11:19 +02:00
Paul Janzen
5b98ffad60
Translated using Weblate (German)
Currently translated at 100.0% (994 of 994 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/de/
2023-10-28 06:11:19 +02:00
gallegonovato
301ae110bc
Translated using Weblate (Spanish)
Currently translated at 100.0% (994 of 994 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/es/
2023-10-28 06:11:19 +02:00
Paul Janzen
a5d84aee7b
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (994 of 994 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/pt_BR/
2023-10-28 06:11:19 +02:00
Dynnammo
7ea1daddd7
Translated using Weblate (French)
Currently translated at 100.0% (994 of 994 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/fr/
2023-10-28 06:11:18 +02:00
Paul Fitzpatrick
cc9a9ae8c5 (core) support for bundling custom widgets with the Grist app
Summary:
This adds support for bundling custom widgets with the Grist app, as follows:

 * Adds a new `widgets` component to plugins mechanism.
 * When a set of widgets is provided in a plugin, the html/js/css assets for those widgets are served on the existing untrusted user content port.
 * Any bundled `grist-plugin-api.js` will be served with the Grist app's own version of that file. It is important that bundled widgets not refer to https://docs.getgrist.com for the plugin js, since they must be capable of working offline.
 * The logic for configuring that port is updated a bit.
 * I removed the CustomAttachedView class in favor of applying settings of bundled custom widgets more directly, without modification on view.

Any Grist installation via docker will need an extra step now, since there is an extra port that needs exposing for full functionality. I did add a `GRIST_TRUST_PLUGINS` option for anyone who really doesn't want to do this, and would prefer to trust the plugins and have them served on the same port.

Actually making use of bundling will be another step. It'll be important to mesh it with our SaaS's use of APP_STATIC_URL for serving most static assets.

Design sketch: https://grist.quip.com/bJlWACWzr2R9/Bundled-custom-widgets

Test Plan: added a test

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D4069
2023-10-27 17:00:10 -04:00
George Gevoian
cb0ce9b20f (core) Avoid reporting unhelpful ResizeObserver error
Summary: The error appears to be benign and not caused by any of our code.

Test Plan:
Reproducing was tricky.

On the Access Rules page, changing the browser's zoom level caused the error to surface. Weirdly enough, it only happened when connected to a larger, external monitor, and not on my laptop's internal monitor.

In any case, manual testing was done to confirm the error is no longer reported to the user after this change.

Reviewers: jarek

Reviewed By: jarek

Subscribers: jarek

Differential Revision: https://phab.getgrist.com/D4095
2023-10-27 15:26:20 -04:00
George Gevoian
ce23887be0 (core) Avoid editing fields on toggle dbclick
Summary:
This prevents a quirky UI behavior where double-clicking a toggle would cause
the field to start being edited.

Test Plan: Browser tests.

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D4093
2023-10-27 15:08:24 -04:00
Alex Hall
4e67c679b2 (core) Options for plugin API functions which fetch data from the selected table or record
Summary:
Adds a new interface `FetchSelectedOptions` with three keys (including the preexisting `keepEncoded`) and adds/updates an optional `options: FetchSelectedOptions` to six related functions which fetch data from the selected table or record. The `keepEncoded` and `format` options have different default values for different methods for backwards compatibility, but otherwise the different methods now have much more similar behaviour. The new `includeColumns` option allows fetching all columns which was previously only possible using `docApi.fetchTable` (which wasn't always a great alternative) but this requires full access to avoid exposing more data than before and violating user expectations.

Eventually, similar options should be added to `docApi.fetchTable` to make the API even more consistent.

Discussion: https://grist.slack.com/archives/C0234CPPXPA/p1696510548994899

Test Plan: Added a new nbrowser test with a corresponding fixture site and document, showing how the functions have different default option values but are all configurable now.

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D4077
2023-10-26 23:46:00 +02:00
George Gevoian
1a04c2cffe (core) Improve context menu placement on narrow screens
Summary: On narrow screens, the menu is now less likely to overflow the viewport.

Test Plan: Manual.

Reviewers: jarek

Reviewed By: jarek

Subscribers: jarek

Differential Revision: https://phab.getgrist.com/D4094
2023-10-25 10:35:49 -04:00
Florent
38c8476aff
Add option to serve Prometheus metrics #671 (#693)
Co-authored-by: Florent FAYOLLE <florent.fayolle@beta.gouv.fr>
2023-10-24 17:36:53 -04:00
George Gevoian
fed697e676 (core) Tweak Add Column menu
Summary:
Tweaking behavior of the unreleased Add Column menu per feedback from
Anais and Dmitry.

Test Plan: WIP

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D4089
2023-10-24 15:35:42 -04:00
George Gevoian
de33c5a3c6 (core) Add tests and tooltips to new Add Column menu
Summary: Adds tooltips to the menu and tests for recently-added functionality.

Test Plan: Browser tests.

Reviewers: JakubSerafin

Reviewed By: JakubSerafin

Subscribers: JakubSerafin

Differential Revision: https://phab.getgrist.com/D4087
2023-10-24 11:53:26 -04:00
Jarosław Sadziński
69d5ee53a8 (core) Treating API urls as external in cells
Summary:
Links for the API endpoints in a cell didn't work as they were interpreted as
internal routes. Now they are properly detected as external.

Test Plan: Added new test

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D4078
2023-10-24 08:55:08 +02:00
Jakub Serafin
77726849ad (core) setting timezone on create column
Summary: Before this diff, "Create at" and "Modify at" had empty "Timezone" field in column editor panel. This diff is setting document timezone to DateTime column created by this shortcuts

Test Plan: Manual so far

Reviewers: georgegevoian

Reviewed By: georgegevoian

Subscribers: georgegevoian

Differential Revision: https://phab.getgrist.com/D4086
2023-10-24 08:26:26 +02:00
Franček Prijatelj
e51c1b6b92
Translated using Weblate (Slovenian)
Currently translated at 100.0% (987 of 987 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/sl/
2023-10-24 06:07:01 +02:00
Paul Janzen
f1505dd451
Translated using Weblate (German)
Currently translated at 100.0% (987 of 987 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/de/
2023-10-24 06:07:01 +02:00
Paul Janzen
c0c7a49c1d
Translated using Weblate (Spanish)
Currently translated at 100.0% (987 of 987 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/es/
2023-10-24 06:07:01 +02:00
Paul Janzen
3ac92798a4
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (987 of 987 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/pt_BR/
2023-10-24 06:07:00 +02:00
github-actions[bot]
4be7e8c8c9
automated update to translation keys (#697)
Co-authored-by: Paul's Grist Bot <paul+bot@getgrist.com>
2023-10-23 11:22:44 -04:00
Paul Fitzpatrick
e95295ffee (core) updates from grist-core 2023-10-23 09:59:47 -04:00
Владимир В
e3b6fb2ae8
Translated using Weblate (Russian)
Currently translated at 99.4% (982 of 987 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/ru/
2023-10-22 02:02:24 +02:00
gallegonovato
8ca89cb901
Translated using Weblate (Spanish)
Currently translated at 99.8% (986 of 987 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/es/
2023-10-22 02:02:24 +02:00
Jakub Serafin
d0c1ca2174 (core) Summary:
Cleaning code that was wrongly merged during D4083

Test Plan: Manual smoke tests - create columns and references are working

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D4085
2023-10-20 15:43:32 +02:00
Jakub Serafin
91f7606ae6 (core) Aggregate and reverse lookups
Summary:
Reverse and Aggregation lookup.
Aggregation lookup works when table have a reference list column. It allow to list value of any fields of a referenced values, or to make some basic operation on them (sum, average, count)
Reverse lookup works as reverse one, but it allow do to the same operations on all rows that have reference to given row

Test Plan: Manual so far.

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D4083
2023-10-20 13:26:17 +02:00
Franček Prijatelj
ecd4b90ca0
Translated using Weblate (Slovenian)
Currently translated at 100.0% (973 of 973 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/sl/
2023-10-19 04:12:50 +00:00
Paul Fitzpatrick
b63b042390
v1.1.6 2023-10-19 01:23:37 +02:00
George Gevoian
74485f412d (core) Fix delete user button for Google-only accounts
Summary:
An unhandled error was being thrown by CognitoClient when a user was unable
to be found during account deletion. Google-only accounts are no longer
associated with a user in Cognito, so the error was actually benign. A warning is
now logged instead.

Test Plan: Manual.

Reviewers: paulfitz, jarek

Reviewed By: paulfitz, jarek

Differential Revision: https://phab.getgrist.com/D4073
2023-10-18 10:52:58 -04:00
George Gevoian
f6256646ef (core) Remove deprecated code
Summary:
The removed code is no longer reachable now that a new version of the plugin
API is being served by Grist on production.

Test Plan: Existing tests.

Reviewers: jarek

Reviewed By: jarek

Subscribers: jarek

Differential Revision: https://phab.getgrist.com/D4081
2023-10-18 09:39:12 -04:00
Paul Fitzpatrick
91eabb6b0c (core) updates from grist-core 2023-10-18 00:27:22 +02:00
George Gevoian
f1cf92aca1 (core) Polish new Add Column menu
Summary: Fixes and features for the unreleased Add Column menu.

Test Plan: Manual.

Reviewers: jarek

Reviewed By: jarek

Subscribers: jarek

Differential Revision: https://phab.getgrist.com/D4076
2023-10-17 15:39:53 -04:00
George Gevoian
3f509484a4
Fix CI failures (#696) 2023-10-17 15:38:19 -04:00
Alex Hall
7f091cf057 (core) Fix number parsing/formatting tests after updates to node version and locales
Summary:
The en-ZA locale was recently updated: https://github.com/nodejs/node/issues/48120

This caused test failures which I was happy about, until I saw af-ZA is still using the old separators.

Test Plan: Tests failed locally when using the latest node 18, then passed after this change.

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D4079
2023-10-17 16:45:08 +02:00