Commit Graph

2625 Commits

Author SHA1 Message Date
Jordi Gutiérrez Hermoso
0bf3f9bc43 markdown: new utility module
Since we've started using Markdown, why not a simple utility function
to start using it?
2024-07-30 13:41:47 -04:00
Jordi Gutiérrez Hermoso
4621b67c8e AdminToggleCss: factor out CSS from SupportGristPage
We will create a new enterprise toggle, so we will need to share the same CSS.
2024-07-30 13:41:47 -04:00
Jordi Gutiérrez Hermoso
f0cf86be8e ToggleEnterpriseModel: new GrainJS model to handle changes to config API
Patterned after TelemetryModel.ts
2024-07-30 13:41:47 -04:00
Jordi Gutiérrez Hermoso
62a04e9510 ConfigAPI: new class to handle frontend requests to config backend
This new API is somewhat patterned after the InstallAPI, but simpler
whenever possible.
2024-07-30 13:41:47 -04:00
Jordi Gutiérrez Hermoso
960f023618 restart: gracefully handle restart failure
In case Grist isn't running with the supervisor (e.g. it's running
under nodemon instead via `yarn start`), surface the problem to the
frontend.
2024-07-30 13:41:47 -04:00
Jordi Gutiérrez Hermoso
9ae8918156 supervisor: remove config stub
The configuration is now handled by the config API, so we no longer
need the stub function here.
2024-07-30 13:41:47 -04:00
Jordi Gutiérrez Hermoso
bc8e5f6837 FlexServer: remove config from restart endpoint
The config endpoint now handles changing config values, so we only
need to handle restarts here.
2024-07-30 13:41:47 -04:00
Jordi Gutiérrez Hermoso
2d85ed1bfe config: new API endpoint
This adds PATCH and GET endpoints to handle `config.json`.
2024-07-30 13:41:47 -04:00
Jordi Gutiérrez Hermoso
d57c3f068d configCore: default to enterprise edition if TEST_ENABLE_ACTIVATION is truthy
This will ensure that the grist-ee image will have a consistent config
setting when created from the default value.
2024-07-30 13:41:47 -04:00
Jordi Gutiérrez Hermoso
f0aacc4d96 config: end the file with a newline
Small cosmetic change, POSIX requires final newlines in text files.

https://stackoverflow.com/questions/729692/why-should-text-files-end-with-a-newline
2024-07-30 13:41:47 -04:00
Jordi Gutiérrez Hermoso
f9e7558410 Dockerfile: silence a warning
Docker doesn't like mixed case in keywords.
2024-07-30 13:41:47 -04:00
xabirequejo
bceecaf1ad
Translated using Weblate (Basque)
Currently translated at 99.8% (1339 of 1341 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/eu/
2024-07-30 09:09:20 +02:00
Paul Fitzpatrick
5dbdb5c06c (core) updates from grist-core 2024-07-29 17:20:32 -04:00
Dmitry S
bb0213ecbe (core) Fix regression that caused Date/DateTime series to be treated as categorical data
Test Plan: Tested manually with a Date and DateTime column type.

Reviewers: paulfitz

Reviewed By: paulfitz

Subscribers: paulfitz

Differential Revision: https://phab.getgrist.com/D4305
2024-07-29 12:52:57 -07:00
Jordi Gutiérrez Hermoso
db26f3be6a documentation: fix data types table formatting 2024-07-29 09:56:12 -04:00
Jordi Gutiérrez Hermoso
fea7c0b536 create: add a comment explaining the session secret situation 2024-07-28 18:52:39 -04:00
Jordi Gutiérrez Hermoso
09871480ba create: add a short docstring for makeSimpleCreator 2024-07-28 18:52:39 -04:00
Jordi Gutiérrez Hermoso
9b3ae08ece create: hard-code the default session secret even more
The problem here is that making it this optional meant that it wasn't
supplied by [the enterprise creation
function](fb22d94878/ext/app/server/lib/create.ts (L10)).
This resulted in an odd situation where the secret was required for
the enterprise edition, even though it offers no additional security.
Without this key, the enterprise code crashes.

The requirement to supply a secret key would make a Grist instance
crash if you start in normal mode but switch to enterprise, as the
enterprise creator does not supply a default secret key.
2024-07-28 18:52:39 -04:00
Jordi Gutiérrez Hermoso
c9f9b70b67 apiconsole: allow uploads in console
By adding an XHR to "Try it out" requests, we can make non-JSON
requests pass a CORS check.
2024-07-26 09:09:11 -04:00
Jarosław Sadziński
61942f6f4b (core) Adding confirmation before remove last widget for a table
Summary:
When last widget for a table is removed, user is informed
about that and can decide between removing the widget and removing
both table and widget

Test Plan: Updated

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D4295
2024-07-25 16:42:19 +02:00
github-actions[bot]
a9521a8544
automated update to translation keys (#1119)
Co-authored-by: Paul's Grist Bot <paul+bot@getgrist.com>
2024-07-25 10:32:00 -04:00
xabirequejo
bb3135291c
Translated using Weblate (Basque)
Currently translated at 90.5% (1214 of 1341 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/eu/
2024-07-25 16:09:22 +02:00
Paul Fitzpatrick
fc3a7f580c
make access control for ConvertFromColumn action less brutal (#1111)
Access control for ConvertFromColumn in the presence of access rules had previously been left as a TODO. This change allows the action when the user has schema rights. Because schema rights let you create formulas, they let you read anything, so there is currently no value in nuance here.
2024-07-24 11:41:50 -04:00
xabirequejo
7bae7a86bf
Translated using Weblate (Basque)
Currently translated at 90.4% (1213 of 1341 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/eu/
2024-07-24 15:09:39 +02:00
Jordi Gutiérrez Hermoso
f504cfdde3 workflows: add the enterprise code to the fly builds
I want to be able to show previews that have the enterprise toggle.
2024-07-23 17:15:54 -04:00
Jordi Gutiérrez Hermoso
7928ee2263 build: update grist-ee version 2024-07-23 16:25:29 -04:00
George Gevoian
f2141851be (core) Automatically remove leaves from layout specs
Summary:
When fields or sections were being removed from Grist documents, any
layout specs that referred to them weren't being updated to no longer
do so. This mismatch was causing various buggy scenarios to manifest
in cases where the stale ids were being reused. We now automatically
update any affected layout specs whenever fields or sections are
removed.

Test Plan: Python tests.

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D4302
2024-07-23 12:22:11 -04:00
George Gevoian
4740f1f933 (core) Update onboarding flow
Summary:
A new onboarding page is now shown to all new users visiting the doc
menu for the first time. Tutorial cards on the doc menu have been
replaced with a new version that tracks completion progress, alongside
a new card that opens the orientation video.

Test Plan: Browser tests.

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D4296
2024-07-23 11:49:23 -04:00
Paul Fitzpatrick
3fd8719d8a (core) updates from grist-core 2024-07-23 10:26:49 -04:00
Jarosław Sadziński
8162a6d959 (core) Treating x axis as category for bar chart
Summary: Forcing category xaxis type for bar chart when labels are not numerical.

Test Plan: Added new and updated existing

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D4297
2024-07-23 15:41:38 +02:00
Grégoire Cutzach
0272b67240
fix #1035 : Column alignment when zoom font only settings in browser (#1036)
Use rem value instead of fixed pixel where needed.
Removed inline style 52px for .gridview_data_row_num
2024-07-23 14:55:03 +02:00
xabirequejo
d982ca2103
Translated using Weblate (Basque)
Currently translated at 40.2% (540 of 1341 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/eu/
2024-07-23 12:52:49 +02:00
xabirequejo
43aa714137
Added translation using Weblate (Basque) 2024-07-23 10:05:38 +02:00
Ricky From Hong Kong
916bff63b0
Translated using Weblate (Chinese (Traditional))
Currently translated at 74.1% (994 of 1341 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/zh_Hant/
2024-07-23 10:05:37 +02:00
gallegonovato
57cacc9e2f
Translated using Weblate (Spanish)
Currently translated at 100.0% (1341 of 1341 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/es/
2024-07-21 21:09:20 +02:00
Franček Prijatelj
ea1de9d220
Translated using Weblate (Slovenian)
Currently translated at 100.0% (1341 of 1341 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/sl/
2024-07-19 15:09:32 +00:00
Jordi Gutiérrez Hermoso
e30a090a4e config: remove all async/await around config read functions
Now that reading is synchronous, there's no need to have any more
async/await in regards to the those config functions.
2024-07-18 14:32:46 -04:00
Jordi Gutiérrez Hermoso
4013382170 config: replace fse read functions with sync variants
I need to be able to read the config at module load time, which makes
async difficult if not impossible.

This will make read config operations synchronous, which is fine. The
file is tiny and seldom read.
2024-07-18 14:32:46 -04:00
Paul Fitzpatrick
4a01c68a50
bump Python version for tests, no longer supporting 3.9 (#1112)
After changes for `PREVIOUS` and related functions, we now depend on new versions of the `bisect` function.
2024-07-17 17:43:04 -04:00
Владимир В
4c2b5781df
Translated using Weblate (Russian)
Currently translated at 99.5% (1335 of 1341 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/ru/
2024-07-17 19:09:43 +00:00
Paul Fitzpatrick
d23b492f0d (core) updates from grist-core 2024-07-17 12:18:13 -04:00
Paul Fitzpatrick
db52bb0082 (core) move test/server/lib/GranularAccess.ts to core
Summary:
Move an important set of tests that were in our SaaS
repo for no good reason.

Test Plan: moving tests

Reviewers: jordigh

Reviewed By: jordigh

Differential Revision: https://phab.getgrist.com/D4300
2024-07-17 12:16:42 -04:00
Dmitry S
f0d0a07295 (core) Implement PREVIOUS/NEXT/RANK and lookupRecords().find.* methods.
Summary:
- `lookupRecords()` now allows efficient search in sorted results, with
  the syntax  `lookupRecords(..., order_by="-Date").find.le($Date)`. This will find the record with the nearest date that's <= `$Date`.
- The `find.*` methods are `le`, `lt`, `ge`, `gt`, and `eq`. All have O(log N) performance.
- `PREVIOUS(rec, group_by=..., order_by=...)` finds the previous record to rec, according to `group_by` / `order_by`, in amortized O(log N) time. For example, `PREVIOUS(rec, group_by="Account", order_by="Date")`.
- `PREVIOUS(rec, order_by=None)` finds the previous record in the full table, sorted by the `manualSort` column, to match the order visible in the unsorted table.
- `NEXT(...)` is just like `PREVIOUS(...)` but finds the next record.
- `RANK(rec, group_by=..., order_by=..., order="asc")` returns the rank of the record within the group, starting with 1. Order can be `"asc"` (default) or `"desc"`.
- The `order_by` argument in `lookupRecords`, and the new functions now supports tuples, as well as the "-" prefix to reverse order, e.g. `("Category", "-Date")`.
- New functions are only available in Python3, for a minor reason (to support keyword-only arguments for `group_by` and `order_by`) and also as a nudge to Python2 users to update.

- Includes fixes for several situations related to lookups that used to cause quadratic complexity.

Test Plan:
- New performance check that sorted lookups don't add quadratic complexity.
- Tests added for lookup find.* methods, and for PREVIOUS/NEXT/RANK.
- Tests added that renaming columns updates `order_by` and `group_by` arguments, and attributes on results (e.g. `PREVIOUS(...).ColId`) appropriately.
- Python3 tests can now produce verbose output when VERBOSE=1 and -v are given.

Reviewers: jarek, georgegevoian

Reviewed By: jarek, georgegevoian

Subscribers: paulfitz, jarek

Differential Revision: https://phab.getgrist.com/D4265
2024-07-17 12:00:55 -04:00
Dmitry S
063df75204 (core) Forms improvements: mouse selection in firefox, focus, and styling
Summary:
- Remove unused Form file (Label.ts)
- Fix Firefox-specific bug in Forms, where mouse selection wasn't working in textarea.
- Focus and set cursor in textarea on click.
- Save on blur but only when focus stays within the Grist app, as for editing cells.
- Make paragraph margins of rendered form match those in the form editor.

Test Plan: Tested manually on Firefox and Chrome; relying on existing tests that nothing broke.

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D4281
2024-07-17 08:55:04 -04:00
Spoffy
1d92e69c43
Adds a home directory for non-root docker user in container (#1109)
Fixes some edge cases where certain programs (e.g yarn) wouldn't work correctly due to HOME being set to a folder with bad permissions.
2024-07-16 22:35:27 +01:00
Jarosław Sadziński
2868ee2fa1 (core) Replacing python3 specifc code
Summary: Removing JSONDecodeError type from python code that is python3 only.

Test Plan: Existing

Reviewers: paulfitz, georgegevoian

Reviewed By: paulfitz, georgegevoian

Subscribers: paulfitz

Differential Revision: https://phab.getgrist.com/D4298
2024-07-16 17:52:38 +02:00
George Gevoian
b5e0e020ef (core) Disable SelectionSummary when diffing documents
Summary:
Cell values can't be summarized if they are diffs of two different
document versions. This was causing a JS error to be thrown when
comparing snapshots.

Test Plan: Browser test.

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D4292
2024-07-16 09:52:07 -04:00
Libor Blaheta
73e022b0c5
Translated using Weblate (Czech)
Currently translated at 7.9% (107 of 1340 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/cs/
2024-07-16 13:10:24 +02:00
Владимир В
30eb956f5c
Translated using Weblate (Russian)
Currently translated at 99.6% (1335 of 1340 strings)

Translation: Grist/client
Translate-URL: https://hosted.weblate.org/projects/grist/client/ru/
2024-07-16 13:10:23 +02:00
Dmitry
d922bdbb2d
Fix typo in README.md 2024-07-12 14:21:11 -04:00