Commit Graph

1590 Commits

Author SHA1 Message Date
Paul Fitzpatrick
391d39effc (core) restore ActiveDoc shutdown behavior on error
Summary:
A recent change perturbed some error handling when an ActiveDoc
is shutting down. It is important that errors get thrown when
attempting to replace a non-existent document. My bad in review
for not catching.

Test Plan: Snapshot test passes again

Reviewers: georgegevoian

Reviewed By: georgegevoian

Subscribers: georgegevoian, cyprien

Differential Revision: https://phab.getgrist.com/D3824
2023-03-17 12:18:09 -04:00
Louis Delbosc
c54e910fd6
Export table schema (#459)
* add endpoint
* Add table-schema transformation data
2023-03-16 17:37:24 -04:00
Cyprien P
1ff93f89c2 (core) Porting the AI evaluation script
Summary:
Porting script that run an evaluation against our formula dataset.

To test you need an openai key (see here: https://platform.openai.com/)
or hugging face (it should work as well), then checkout the branch and run

`OPENAI_API_KEY=<my_openai_api_key> node core/test/formula-dataset/runCompletion.js`

Test Plan:
Needs manually testing: so far there is no plan to make it part of CI.

The current score is somewhere around 34 successful prompts over a total of 47.

Reviewers: paulfitz

Reviewed By: paulfitz

Subscribers: jarek

Differential Revision: https://phab.getgrist.com/D3816
2023-03-15 14:54:28 +01:00
Cyprien P
2b2e19c5b5 (core) Fix issue with summary update.
Summary:
The problem is that the implementation for a summary update was relying on type consistency to get columns (ie: matches agains colId and type).

Type consistency is an attempt at maintaining consistent type across same-named column for summaries of same table.

But the problem is that the consistency of types is NOT a strict guarantee or an invariant, more of a best-effort attempt (there are too many possible sequences of operations possible with renaming/adding/removing in summary tables and the underlying table).

With current implementation and with a document violating the type consistency, a summary table could end up with fields referencing columns to the former summary table (more detail below(1)). Which is a bad state (yields js errors on the client).

This diff fixes this issue by relaxing the type comparison when search for same-named column.

(1) __Below is a description of how a violation of type consistency could end-up in bad state document (example taken from the reported bug):__

> In this document, let's assume two summary tables `Table1 [by A]` and `Table1 [Totals]`. Let's also assume Table1 and `Table1 [Totals]` both have an `Amount(Numeric)` column, and that `Table1 [by A]` has one `Amount(Any)` column (violating the type consistency principle). Now when users wanted to change the `Table1 [Totals]` section to group by 'A', grist found that there is already a summary table with same grouping. But it couldn't find a matching column for `Amount(Numeric)` so it created a new one. Except that because there was still an `Amount(Any)` the new column was named `Amount2` which caused following code to ignore it and in particular forgetting to update it's corresponding section's field which was then pointing toward the column of a different table (which is bad).

Test Plan: Added python test.

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3809
2023-03-15 13:54:15 +01:00
Jarosław Sadziński
b3590c8a6f (core) Removing warnings about deprecated shortcuts.
Summary:
Warnings about deprecated shortcuts are no longer needed.
As a side effect it fixes a bug that caused those warnings to not persist its
state on pages with charts.

Test Plan: Removed

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3820
2023-03-15 10:50:14 +01:00
Przemek
8e5128182c
Translated using Weblate (Polish)
Currently translated at 100.0% (766 of 766 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/pl/
2023-03-15 10:39:46 +01:00
George Gevoian
8a6962d3e6 (core) Hide id column in Access Rules
Summary: The id column was a possible option for rulesets, which was a bug.

Test Plan: Browser tests.

Reviewers: paulfitz

Reviewed By: paulfitz

Subscribers: paulfitz

Differential Revision: https://phab.getgrist.com/D3817
2023-03-14 12:34:23 -04:00
Dmitry S
efd92c6c2a (core) Two fixes to tests affected by changes that came from grist-core.
Summary:
- For python2, skip some tests of renaming which produce different results
  because of an un-upgradable astroid version.
- Fix test affected by pyCall() having changed to async; avoid hanging timeout
  callback in case of error.

Test Plan: All test cases should now pass (with 4 getting skipped)

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D3819
2023-03-14 11:57:01 -04:00
Dmitry S
86681de595 (core) Add overflowTooltip() tool, and use for long tables in widget picker, and long page names.
Summary:
Usage is simply to call `overflowTooltip()` with no arguments, as an argument
to an element whose text may overflow. On 'mouseenter', it'll check for
overflow and show the element's .textContent in a tooltip.

- Added for long table names in the widget picker (Add Page, Add Widget to Page).
- Added for long page names in the left-panel list of pages.

Test Plan: Added test cases for the new overflow tooltips

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D3814
2023-03-13 21:47:35 -04:00
github-actions[bot]
f4aa82189b
automated update to translation keys (#462)
Co-authored-by: Paul's Grist Bot <paul+bot@getgrist.com>
2023-03-13 12:40:15 -04:00
Paul Fitzpatrick
b28cbb378a
add a special key to allow translators to exclude language until ready (#461)
This adds a special key to be translated. While the key has not been
translated, the language should not be offered or used by default.
The key is not yet effective - that will be follow-up once the key
has propagated to weblate and existing translations have had time to
update.
2023-03-13 11:47:22 -04:00
Cyprien P
b312b3b08b (core) Fix css issue with tooltip in filter menu on safari
Summary:
Small glitch on safari: when we show behavioural tooltips the content
of the tooltip is first added to the parent of the target elem, then
we set tooltip's container positioning to absolute which normally causes recompute
of the layout. But in safari it doesn't, hence the button shows as if
the tooltip was still in there, as a sibling.

Diff fixes that issue by forcing positioning to absolute on the tooltip container.

{F68474}

Test Plan: Should not break anything.

Reviewers: georgegevoian

Differential Revision: https://phab.getgrist.com/D3802
2023-03-13 15:39:41 +01:00
Paul Fitzpatrick
186263b4fb (core) updates from grist-core 2023-03-13 09:27:21 -04:00
Przemek
8421166cf0
Translated using Weblate (Polish)
Currently translated at 84.7% (649 of 766 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/pl/
2023-03-12 10:37:29 +01:00
Dmitry S
1274fe55fb (core) Fix linking of new records when attachment is the first thing added.
Summary:
Fixes a bug when in a linked widget, the automatic reference wasn't being set
for a new record if attachment is the first thing that gets added to the
record.

- Move handling of 'setCursorPos' pseudo-command to GristDoc to support cross-section switching (relevant when moving attachment into a cell of a non-active page widget)
- Modernize code for AttachmentsWidget slightly (better typings, css conventions)
- Change the fix in https://phab.getgrist.com/D3796 from using isolate to using different z-index values, to avoid a change in the look of the cursor on Attachment cells.

Test Plan: Added a test case for what's possible to test with webdriver.

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3811
2023-03-09 08:54:36 -05:00
skamensky
46c9603b8f
Update README.md to mention GRIST_WIDGET_LIST_URL (#456)
Add missing `GRIST_WIDGET_LIST_URL` environment variable found in https://support.getgrist.com/self-managed/
2023-03-08 18:40:14 -05:00
Paul Janzen
9ddf5ab609
Translated using Weblate (German)
Currently translated at 100.0% (766 of 766 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/de/
2023-03-08 18:37:26 +01:00
gallegonovato
ddd62aa077
Translated using Weblate (Spanish)
Currently translated at 100.0% (766 of 766 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/es/
2023-03-08 18:37:25 +01:00
Paul Janzen
146d3b7a72
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (766 of 766 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/pt_BR/
2023-03-08 18:37:25 +01:00
Владимир В
bb793248d4
Translated using Weblate (Russian)
Currently translated at 99.4% (759 of 763 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/ru/
2023-03-07 12:41:34 +01:00
Paul Fitzpatrick
66643a5e6b
add a pyodide-based "sandbox" flavor (#437)
This adds a new `GRIST_SANDBOX_FLAVOR=pyodide` option where the
version of Python used for the data engine is wasm, and so can
be run by node like the rest of the back end. It still runs as
a separate process.

There are a few small version changes made to packages to avoid
various awkwardnesses present in the current versions. All existing
tests pass.

This is very experimental. To use, you'll need something with
a bash shell and make. First do:
```
cd sandbox/pyodide
make setup           # README.md and Makefile have details
cd ..
```

Then running Grist as:
```
GRIST_SANDBOX_FLAVOR=pyodide yarn start
```
should work. Adding a formula with content:
```
import sys; return sys.version
```
should return a different Python version than other sandboxes.

The motivation for this work is to have a form of sandboxing
that will work on Windows for Grist Electron (for Linux we have
gvisor/runsc, for Mac we have sandbox-exec, but I haven't found
anything comparable for Windows).

It also brings a back-end-free version of Grist a bit closer, for
use-cases where that would make sense - such as serving a report
(in the form of a Grist document) on a static site.
2023-03-06 16:56:25 -05:00
github-actions[bot]
a1259139f6
automated update to translation keys (#452)
Co-authored-by: Paul's Grist Bot <paul+bot@getgrist.com>
2023-03-06 08:51:49 -05:00
Paul Fitzpatrick
055522d374 (core) updates from grist-core 2023-03-06 08:21:09 -05:00
Riccardo Polignieri
06029695ff
Translated using Weblate (Italian)
Currently translated at 100.0% (763 of 763 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/it/
2023-03-04 23:37:24 +01:00
Przemek
85237afe94
Translated using Weblate (Polish)
Currently translated at 50.0% (382 of 763 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/pl/
2023-03-04 23:37:24 +01:00
Владимир В
91d3ddebeb
Translated using Weblate (Russian)
Currently translated at 99.4% (759 of 763 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/ru/
2023-03-04 23:37:24 +01:00
Paul Janzen
94b3bb5370
Translated using Weblate (German)
Currently translated at 100.0% (763 of 763 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/de/
2023-03-04 23:37:24 +01:00
gallegonovato
df6119a211
Translated using Weblate (Spanish)
Currently translated at 100.0% (763 of 763 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/es/
2023-03-04 23:37:24 +01:00
Paul Janzen
2f549a7f66
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (763 of 763 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/pt_BR/
2023-03-04 23:37:24 +01:00
Dmitry
2d84579109
Create FUNDING.yml to enable "sponsor" button. (#451) 2023-03-04 17:12:37 -05:00
Paul Fitzpatrick
4be4acca6e
run grist-core test batches in parallel (#444)
This sets up a framework for running tests in parallel.
It increases the total time taken (since some steps are
repeated) but reduces the turn-around time significantly
overall.

The main objective is to make it possible to release more
test batches to grist-core without bringing CI to a crawl.

The clever little test/split-test.js script is from the
Grist Labs mono-repo and is Dmitry's work.

I considered doing the build in one job, and copying
it to test jobs, since it feels wasteful to repeat it.
That may be worth trying, especially if we start getting
jobs backing up (total concurrent Linux jobs on free plan
is quoted at 20).

It might also be worth looking at doing some tests in
parallel on the same worker, perhaps using the relatively
new MOCHA_WORKER_ID feature, since the tests are often not
actually CPU or I/O bound.
2023-03-03 09:53:33 -05:00
Paul Fitzpatrick
8b7aa12a0e v1.0.8 2023-03-02 10:21:14 -05:00
Riccardo Polignieri
5946f7af2c
Translated using Weblate (Italian)
Currently translated at 100.0% (747 of 747 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/it/
2023-03-02 15:36:12 +01:00
Przemek
6b43add6ed
Translated using Weblate (Polish)
Currently translated at 50.7% (379 of 747 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/pl/
2023-03-02 15:36:12 +01:00
Louis Delbosc
7a82aa1ac7
Add labels for columns type (#435) 2023-03-02 09:12:49 -05:00
Jarosław Sadziński
59cf654190 (core) Minimazing widgets
Summary:
A feature that allows minimizing widgets on the ViewLayout.
- Code in ViewLayout and Layout hasn't been changed. Only some methods or variables were made public, and some events are now triggered when a section is dragged.
- Widgets can be collapsed or expanded (added back to the main area)
- Collapsed widgets can be expanded and shown as a popup
- Collapsed widgets support drugging, reordering, and transferring between the main and collapsed areas.

Test Plan: New test

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3779
2023-03-02 11:22:49 +01:00
Louis Delbosc
5af2cd4ef7
Add translation for visible field config (#442) 2023-03-01 21:52:12 -05:00
Paul Fitzpatrick
e9efac05f7 (core) remove ormconfig.js from saas build; more sendgrid logging
Summary:
This removes ormconfig.js from the saas build since it is no longer
needed (and has always been a pain point).

This expands some sendgrid logging to help figure out a problem.

Test Plan: existing tests should pass

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3808
2023-03-01 17:02:47 -05:00
George Gevoian
aa3faae25b (core) Fix test util and upgrade fixtures
Summary:
Fixes a test util that broke after a sync with grist-core, and upgrades
fixtures after a migration was added.

Test Plan: N/A

Reviewers: paulfitz

Reviewed By: paulfitz

Subscribers: paulfitz

Differential Revision: https://phab.getgrist.com/D3810
2023-03-01 10:39:09 -05:00
Dysfunctional Werewolf
a8b4a67b9f (core) Fix an issue due to a missing function which turns out to be necessary 2023-03-01 02:39:57 -05:00
Paul Fitzpatrick
e9d5ce0c60 (core) updates from grist-core 2023-02-27 09:30:46 -05:00
jasongwq
00258af155
Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (747 of 747 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/zh_Hans/
2023-02-27 08:44:50 +01:00
Владимир В
4b99c77240
Translated using Weblate (Russian)
Currently translated at 99.4% (743 of 747 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/ru/
2023-02-27 08:44:50 +01:00
jasongwq
3afd610582
Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (747 of 747 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/zh_Hans/
2023-02-27 07:44:57 +01:00
jasongwq
555fc015dd
Translated using Weblate (Chinese (Simplified))
Currently translated at 20.0% (150 of 747 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/zh_Hans/
2023-02-27 06:32:18 +01:00
Przemek
e181c0d1d8
Translated using Weblate (Polish)
Currently translated at 45.5% (340 of 747 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/pl/
2023-02-27 04:28:57 +01:00
Alexander Solovyov
d103a39111
Translated using Weblate (Ukrainian)
Currently translated at 100.0% (747 of 747 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/uk/
2023-02-27 04:28:56 +01:00
Paul Janzen
8380975943
Translated using Weblate (German)
Currently translated at 100.0% (747 of 747 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/de/
2023-02-27 04:28:56 +01:00
gallegonovato
ea7290e19d
Translated using Weblate (Spanish)
Currently translated at 100.0% (747 of 747 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/es/
2023-02-27 04:28:55 +01:00
Paul Janzen
390bbc6b28
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (747 of 747 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/pt_BR/
2023-02-27 04:28:55 +01:00