Commit Graph

867 Commits

Author SHA1 Message Date
Paul Fitzpatrick
84854b7cfa (core) updates from grist-core 2023-05-15 12:01:19 -04:00
CamilleLegeron
c16204f8ad
feature widget description (#483)
Add description to widget title popup and right panel
2023-05-12 09:08:28 -04:00
George Gevoian
18ad39cba3 (core) Add cut, copy, and paste to context menu
Summary:
On supported browsers, the new context menu commands work exactly as they do
via keyboard shortcuts. On unsupported browsers, an unavailable command
modal is shown with a suggestion to use keyboard shortcuts instead.

Test Plan: Browser tests.

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D3867
2023-05-10 00:48:15 -04:00
George Gevoian
c6ec8339f5 (core) Avoid adding extra "(" when autocompleting
Summary:
This tweaks formula autocomplete to avoid adding an extra "(" when we
detect that a function or method is being renamed.

Test Plan: Browser tests.

Reviewers: jarek

Reviewed By: jarek

Subscribers: jarek

Differential Revision: https://phab.getgrist.com/D3877
2023-05-09 20:03:37 -04:00
Paul Fitzpatrick
603238e966 (core) Adds a UI panel for managing webhooks
Summary:
This adds a UI panel for managing webhooks. Work started by Cyprien Pindat. You can find the UI on a document's settings page. Main changes relative to Cyprien's demo:

  * Changed behavior of virtual table to be more consistent with the rest of Grist, by factoring out part of the implementation of on-demand tables.
  * Cell values that would create an error can now be denied and reverted (as for the rest of Grist).
  * Changes made by other users are integrated in a sane way.
  * Basic undo/redo support is added using the regular undo/redo stack.
  * The table list in the drop-down is now updated if schema changes.
  * Added a notification from back-end when webhook status is updated so constant polling isn't needed to support multi-user operation.
  *  Factored out webhook specific logic from general virtual table support.
  * Made a bunch of fixes to various broken behavior.
  * Added tests.

The code remains somewhat unpolished, and behavior in the presence of errors is imperfect in general but may be adequate for this case.

I assume that we'll soon be lifting the restriction on the set of domains that are supported for webhooks - otherwise we'd want to provide some friendly way to discover that list of supported domains rather than just throwing an error.

I don't actually know a lot about how the front-end works - it looks like tables/columns/fields/sections can be safely added if they have string ids that won't collide with bone fide numeric ids from the back end. Sneaky.

Contains a migration, so needs an extra reviewer for that.

Test Plan: added tests

Reviewers: jarek, dsagal

Reviewed By: jarek, dsagal

Differential Revision: https://phab.getgrist.com/D3856
2023-05-08 18:25:27 -04:00
Paul Fitzpatrick
5e9f2e06ea (core) updates from grist-core 2023-05-08 14:17:45 -04:00
George Gevoian
9438f315e9 (core) Save choice config on focus loss
Summary: Changes to choices are now saved whenever focus leaves the editor.

Test Plan: Browser tests.

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D3879
2023-05-08 14:16:10 -04:00
Paul Fitzpatrick
51a195bd94
add support for conversational state to assistance endpoint (#506)
* add support for conversational state to assistance endpoint

This refactors the assistance code somewhat, to allow carrying
along some conversational state. It extends the OpenAI-flavored
assistant to make use of that state to have a conversation.
The front-end is tweaked a little bit to allow for replies that
don't have any code in them (though I didn't get into formatting
such replies nicely).

Currently tested primarily through the runCompletion script,
which has been extended a bit to allow testing simulated
conversations (where an error is pasted in follow-up, or
an expected-vs-actual comparison).

Co-authored-by: George Gevoian <85144792+georgegevoian@users.noreply.github.com>
2023-05-08 14:15:22 -04:00
Dmitry S
8f34ba5157 (core) Remove a defunct URL constant and a product flavor.
Summary:
The URL /create-team-site on marketing site is unused, and no longer pointing to
anything functional.

The "efcr" product flavor has been defunct for a long time. Remove
references to it.

Test Plan: No tests should be affected

Reviewers: JakubSerafin

Reviewed By: JakubSerafin

Subscribers: JakubSerafin

Differential Revision: https://phab.getgrist.com/D3890
2023-05-05 18:28:04 -04:00
Jarosław Sadziński
ca3cf0cd06 (core) Preserving rules when data is transformed
Summary: Rules where removed when data in column was transformed.

Test Plan: Added new test

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3883
2023-05-05 13:44:09 +02:00
Jarosław Sadziński
5f9f4868ae (core) Showing close button when column is added
Summary:
When a column is added the rename popup had a disabled save button.
Now we always show either:
Just "Close" if there are no changes.
"Save" and "Cancel" if there are changes.

Also, the description is trimmed when saved through the creator panel.

Test Plan: Added

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3872
2023-05-04 11:35:16 +02:00
George Gevoian
959f8a45c6 (core) Direct users to last visited site when possible
Summary:
When clicking the logo in the top-left corner, or finishing a tutorial, we
now direct users to the site they last visited, if possible. If unknown, a
new redirect endpoint, /welcome/home, is used instead, which directs users
to a sensible location based on the number of sites they have.

Test Plan: Browser tests.

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D3878
2023-05-02 07:48:22 -07:00
Dmitry S
65013331a3 (core) Fix imports into reference columns, and support two ways to import Numeric as a reference.
Summary:
- When importing into a Ref column, use lookupOne() formula for correct previews.
- When selecting columns to import into a Ref column, now a Numeric column like
  'Order' will produce two options: "Order" and "Order (as row ID)".
- Fixes exports to correct the formatting of visible columns. This addresses multiple bugs:
  1. Formatting wasn't used, e.g. a Ref showing a custom-formatted date was still presented as YYYY-MM-DD in CSVs.
  2. Ref showing a Numeric column was formatted as if a row ID (e.g. `Table1[1.5]`), which is very wrong.
- If importing into a table that doesn't have a primary view, don't switch page after import.

Refactorings:
- Generalize GenImporterView to be usable in more cases; removed near-duplicated logic from node side
- Some other refactoring in importing code.
- Fix field/column option selection in ValueParser
- Add NUM() helper to turn integer-valued floats into ints, useful for "as row ID" lookups.

Test Plan: Added test cases for imports into reference columns, updated Exports test fixtures.

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3875
2023-05-02 10:28:14 -04:00
Jarosław Sadziński
0bc758e3d0 (core) Styling text button for left alignment
Summary: Adding text alignment for text buttons.

Test Plan: Existing.

Reviewers: JakubSerafin

Reviewed By: JakubSerafin

Differential Revision: https://phab.getgrist.com/D3884
2023-04-27 13:03:38 +02:00
Dmitry S
3513c1e8d2 (core) In formula autocompletions, fix suggestions after an opening parenthesis.
Summary:
Previously, a change was made to include the opening parenthesis into the
"identifier regex", so that backend received the function call name for cases
like 'T.lookupOne(B' (to autocomplete columns of table T that start with "B").
Unfortunately, that interferes with common cases like 'SUM($B', since instead
of sending '$B', it is now including the function name.

To properly fix the common case, we need to exclude the function name from the
call, but for lookups we need to include it. ACE's methods aren't flexible
enough to override this logic cleanly, so some monkey-patching was needed.

Test Plan: Added a test case

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3874
2023-04-26 15:26:44 -04:00
George Gevoian
8bedaedab6 (core) Fix ACL bug with rec.id in formula
Summary:
A regression was causing rec.id in formulas to be flagged as
invalid.

Test Plan: Browser tests.

Reviewers: paulfitz

Reviewed By: paulfitz

Subscribers: paulfitz

Differential Revision: https://phab.getgrist.com/D3882
2023-04-26 00:31:52 -07:00
Dmitry S
b4cc519616 (core) Ignore leading whitespace in formulas, and strip out leading '=' sign users might add
Summary:
This addresses two issues, differently:
- For a formula with leading whitespace, like " 1+1", it is stored as is, but
  is fixed to work (it should be valid Python, and whitespace is only stripped out
  at parsing time to avoid intentation errors caused by the way it gets parsed)
- For a formula with a leading equals-sign ("="), it is stripped out on the
  client side before the formula is stored. Grist documentation uses leading
  "=" to indicate formulas (because UI shows an "=" icon), and Excel formulas
  actually contain the leading "=", so it is a common mistake to include it.

Test Plan: Added new test cases

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D3873
2023-04-25 15:28:40 -04:00
Paul Fitzpatrick
1d93923efe (core) updates from grist-core 2023-04-24 08:51:16 -04:00
Jarosław Sadziński
b4c4a62a73 (core) Migrating commands to typescript
Summary: Migrating commands and commandList to typescript

Test Plan: Existing

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3871
2023-04-24 09:48:40 +02:00
Jarosław Sadziński
b13fb1d97e (core) Adding description icon and tooltip in the GridView
Summary: Column description and new renaming popup for the GridView.

Test Plan: Updated

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3838
2023-04-20 18:21:31 +02:00
George Gevoian
3aac027a13 (core) Polish tutorial popups
Summary:
Includes the following changes:
 *  Adds "Click to expand" hover tooltip to all images
 *  Adds support for minimize/maximize by double clicking tutorial popup header
 *  Add New menu (and all other popups) should now persist when user moves tutorial popup
 *  Preserves scrollbar position when minimizing and maximizing tutorial popup
 *  Formula cell editor (and other elements) should now be stacked under tutorial

Test Plan: Browser and manual tests.

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D3864
2023-04-20 12:20:03 -04:00
Jarosław Sadziński
35f7072bea (core) Enabling height adjustment on tutorial popup
Summary:
Support height adjustment for tutorial popup, also change the way we calculate
delta for the movement to make it follow the cursor more smoothly.

Test Plan: Added

Reviewers: georgegevoian

Reviewed By: georgegevoian

Subscribers: JakubSerafin

Differential Revision: https://phab.getgrist.com/D3858
2023-04-19 17:03:24 +02:00
George Gevoian
b15ae98349 (core) Fix browser history bug with tutorials
Summary:
History wasn't being replaced in some cases, which was
causing a bug where trying to leave a tutorial fork via the
browser's back button would navigate back to the trunk, and
trigger forking again. This effectively made it impossible to
leave a tutorial.

Also adds support for specifying custom CSS classes for
tutorial Markdown images.

Test Plan: Browser test.

Reviewers: JakubSerafin

Reviewed By: JakubSerafin

Differential Revision: https://phab.getgrist.com/D3866
2023-04-19 00:22:42 -04:00
Jarosław Sadziński
69fea132de (core) Fix for the creator panel on custom section.
Summary: Stop opening the creator panel on chart or custom widgets. Only switch tabs when panel is open

Test Plan: Updated

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3868
2023-04-18 14:11:27 +02:00
CamilleLegeron
3775317eec
feat: allow simple click on certain cases for editing field in Widget Card (#446)
* feat: allow simple click on certain cases for editing field in cardView

* remove empty line

* test fix : add trick to limit the context of event

* desable the simple click behavior on widget card in mobile

* Delete timings.txt

* Delete xunit.xml

* clean-feat(Simple click on Card): use field type and id

* ignore local testing files

* codeStyle(single click on card): rename var + move util function in DetailView.prototype

* remove unused var

* CIFix(SingleClickOnCard): escape of field editor before close test
2023-04-17 11:14:25 -04:00
CamilleLegeron
3047bde1e4
rename welcomeTour file to WelcomeTour (#489) 2023-04-17 11:12:30 -04:00
Paul Fitzpatrick
f490854324 (core) updates from grist-core 2023-04-17 09:58:04 -04:00
George Gevoian
36f3fd0120 (core) Fix owner view access to snapshots
Summary:
Owners weren't able to access snapshots if access rules
that denied access to non-owners existed. The backend
was lowering snapshot document access to "viewers" as
part of implementing read-only behavior; this is now done
in the client, with document access for snapshots now
accurately reflecting the user's trunk access.

Additionally, sandboxes are no longer created for snapshots,
and background intervals aren't started for snapshots.

Test Plan: Browser test.

Reviewers: jarek, paulfitz

Reviewed By: jarek, paulfitz

Differential Revision: https://phab.getgrist.com/D3849
2023-04-17 00:16:59 -04:00
Vinschni
bcb5916434
make sendToDrive hidable (#493)
Make "sendToDrive" button from share menu hidable.
2023-04-15 16:22:56 -04:00
Jarosław Sadziński
40ea6bb2bc (core) Focusing the creator panel on the table wiget for charts and custom views
Summary:
When a chart page/section is added and the creator panel is already open, focus is set to a "table" tab.
When a custom view is added as a page/section, the same thing happens, but there is also a behavioral tooltip shown
for the custom URL.

Test Plan: Updated and added.

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3857
2023-04-14 12:45:24 +02:00
George Gevoian
c5029af4e7 (core) Remove duplicate shouldHideUiElement
Summary: Also adds an explanatory comment for a recently-added column.

Test Plan: N/A

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D3854
2023-04-12 02:14:04 -04:00
George Gevoian
8a0bb4d4fe (core) Improve dark mode
Summary:
Enhances dark mode support for the formula editor, and adds support to
the color select popup. Also fixes some bugs with dark mode.

Test Plan: Tested manually.

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D3847
2023-04-12 01:58:48 -04:00
Louis Delbosc
053ef45d64
Keep choices after apply formula (#474) 2023-04-11 09:31:46 +02:00
George Gevoian
a19ba0813a (core) Add telemetry
Test Plan: Server tests.

Reviewers: jarek

Differential Revision: https://phab.getgrist.com/D3818
2023-04-06 12:34:54 -04:00
Paul Fitzpatrick
6a4b7d96e8 (core) updates from grist-core 2023-04-06 10:02:41 -04:00
George Gevoian
4670d60c01 (core) Hide tutorial card with templates
Summary: Hides the tutorial card if GRIST_HIDE_UI_ELEMENTS includes "templates".

Test Plan: Tested manually.

Reviewers: paulfitz

Reviewed By: paulfitz

Subscribers: paulfitz

Differential Revision: https://phab.getgrist.com/D3850
2023-04-04 18:23:55 -04:00
Jarosław Sadziński
7aa83858bd (core) Fixing bug with the import preview being not responsive
Summary: Fixing the bug by setting viewInstance on the temp viewsection record

Test Plan: Added

Reviewers: dsagal

Reviewed By: dsagal

Subscribers: dsagal

Differential Revision: https://phab.getgrist.com/D3848
2023-04-04 18:55:23 +02:00
Paul Fitzpatrick
f5eb8f7730
do not count unready translations in localization test (#480)
This updates the expected count of languages in a localization test
to omit translations that have been started but are not yet ready
to be offered to users by default.
2023-04-03 12:55:08 -04:00
Paul Fitzpatrick
5730262c69 (core) updates from grist-core 2023-04-03 09:52:54 -04:00
Jarosław Sadziński
8cb928e83d (core) Removing translation from reported answeres on welcome screen
Summary:
Questions were saved as localized values. Now they are saved in English using
resource keys.

Test Plan: Manual

Reviewers: georgegevoian

Reviewed By: georgegevoian

Subscribers: georgegevoian

Differential Revision: https://phab.getgrist.com/D3845
2023-03-30 18:33:00 +02:00
George Gevoian
8833958963 (core) Fix small Start Tutorial button
Summary: The button was missing an href.

Test Plan: Tested manually.

Reviewers: paulfitz

Reviewed By: paulfitz

Subscribers: paulfitz

Differential Revision: https://phab.getgrist.com/D3843
2023-03-29 23:14:15 -04:00
George Gevoian
0006e0604b (core) Disable tips during tutorials
Summary: Behavioral tips shouldn't be shown during tutorials.

Test Plan: Browser test.

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D3842
2023-03-29 16:10:23 -04:00
George Gevoian
5b2fb62627 (core) Avoid clashes with rick rowing and tours
Summary:
In certain scenarios, it's possible for a Grist tour and a tip that kicks off
an easter egg to be shown on screen at the same time. To deconflict, we
now check for the presence of one or the other and avoid showing both.

Test Plan: Browser tests.

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D3840
2023-03-29 10:42:56 -04:00
George Gevoian
58ef8d59b5 (core) Show coaching popup after Add New tip is dismissed
Summary:
This is to prevent too many popups from being shown on screen at any
given moment.

Test Plan: Tested manually.

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D3841
2023-03-29 09:27:25 -04:00
Jarosław Sadziński
a317a727c8 (core) Adding tutorial card
Summary:
For now only html stub and docList adjustement for showing a tutorial card.
It will be used in future diffs after tutorial implementation.

Test Plan: Manual

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3750
2023-03-28 19:57:52 +02:00
Jarosław Sadziński
6b5c178953 (core) Fixing bug with type change when a collapsed section is maximized
Summary:
Changing type of a collapsed widget didn't work. It was grabbed
by the collapsed dom to soon.

Test Plan: Updated

Reviewers: georgegevoian

Reviewed By: georgegevoian

Subscribers: georgegevoian

Differential Revision: https://phab.getgrist.com/D3839
2023-03-28 17:47:28 +02:00
George Gevoian
3a1fbbc533 (core) Un-escape names in HomeIntro
Summary:
Characters such as & were mistakenly being escaped in the site name during
translation.

Test Plan: Tested manually.

Reviewers: jarek

Differential Revision: https://phab.getgrist.com/D3836
2023-03-28 07:43:43 -04:00
Jarosław Sadziński
edff50238d (core) Proper way to recreate collapsed section.
Summary: Fix for a bug with a collapsed custom widget, which doesn't work it is detached from a dom.

Test Plan: Added

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3835
2023-03-27 22:11:18 +02:00
George Gevoian
01fbe871aa (core) Add April Fools easter egg
Summary: What happens when you type "rr" instead of "r" in an anchor link's row number?

Test Plan: Browser tests.

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D3829
2023-03-27 14:12:52 -04:00
Paul Fitzpatrick
503e56db40
rename 'theme' that is shadowing an import (#473) 2023-03-27 12:38:07 -04:00
Paul Fitzpatrick
6485fbd826 (core) updates from grist-core 2023-03-27 09:48:59 -04:00
jarek
f9764f9780
Using static text in Grid menu for inserting columns. (#468) 2023-03-24 10:16:27 +01:00
Jarosław Sadziński
d29770511c (core) Draft version of AI assistant
Summary:
The feature is behind a flag GRIST_FORMULA_ASSISTANT (must be "true"). But can be enabled in the
developer console by invoking GRIST_FORMULA_ASSISTANT.set(true).

Keys can be overriden in the document settings page.

Test Plan: For now just a stub test that checks if this feature is disabled by default.

Reviewers: paulfitz

Reviewed By: paulfitz

Subscribers: dsagal

Differential Revision: https://phab.getgrist.com/D3815
2023-03-24 10:07:26 +01:00
Dmitry S
33c08057ad (core) Bug fix: when on Raw Data popup, clicks on cells shouldn't navigate the page
Test Plan: Added a test check that fails without the fix

Reviewers: paulfitz

Reviewed By: paulfitz

Subscribers: paulfitz

Differential Revision: https://phab.getgrist.com/D3831
2023-03-23 16:23:59 -04:00
Dmitry S
22dbab0123 (core) Add tooltip for the opener icon for the Creator Panel
Test Plan: Tested manually.

Reviewers: paulfitz

Reviewed By: paulfitz

Subscribers: paulfitz

Differential Revision: https://phab.getgrist.com/D3830
2023-03-23 11:55:34 -04:00
Jarosław Sadziński
a9ff6b9a84 (core) Fixing couple of bugs in collapsed section layout
Summary:
The previous implementation for collapsing sections involved disposing of a view instance (Grid or Chart component). This caused numerous bugs with
linking sections as the implementation is located in the BaseView.js. Now the view instance is kept and attached to a dom in a hidden div, so it can respond
and function as a normal rendered section. It is also passed from between collapsed and main layout, when sections are dragged or moved using section's
menu commands (`collapse` and `add to main page`)

It also implies that the ViewLayout must still be rendered when a section is maximized (as it is responsible for the view instance), so the dom, and
some logic for rendering it, had to be changed.

Test Plan: New and updated

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3826
2023-03-22 16:23:09 +01:00
George Gevoian
be8e13df64 (core) Add initial tutorials implementation
Summary:
Documents can now be flagged as tutorials, which causes them to display
Markdown-formatted slides from a special GristDocTutorial table. Tutorial
documents are forked on open, and remember the last slide a user was on.
They can be restarted too, which prepares a new fork of the tutorial.

Test Plan: Browser tests.

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D3813
2023-03-22 10:09:02 -04:00
George Gevoian
210aa92eed (core) Fix dark mode on welcome pages
Summary:
The welcome pages were unreadable because dark mode CSS was not
being applied.

Test Plan: Tested manually.

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D3827
2023-03-21 03:22:45 -04:00
Paul Fitzpatrick
572995f19a (core) updates from grist-core 2023-03-20 09:46:37 -04:00
Louis Delbosc
c54e910fd6
Export table schema (#459)
* add endpoint
* Add table-schema transformation data
2023-03-16 17:37:24 -04: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
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
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
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
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
Paul Fitzpatrick
055522d374 (core) updates from grist-core 2023-03-06 08:21:09 -05: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
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
Paul Fitzpatrick
e9d5ce0c60 (core) updates from grist-core 2023-02-27 09:30:46 -05:00
George Gevoian
788a223f13 (core) Fix missing placeholder flag icon
Summary:
Shows a placeholder flag icon for the language picker button when a country flag
isn't available.

The country flag icon is displayed on top of the placeholder icon. For countries
where an icon isn't available, the placeholder will then become visible.

This fixes a bug where no icon was shown for languages that didn't have a flag
icon available.

Test Plan: Tested manually.

Reviewers: jarek

Reviewed By: jarek

Subscribers: jarek

Differential Revision: https://phab.getgrist.com/D3805
2023-02-26 22:23:04 -05:00
jarek
cee0cdcd67
Merge pull request #406 from incubateur-territoires/column-description
feat: Add a description to a grist table column
2023-02-23 17:16:17 +01:00
CamilleLegeron
5e244a9a24
style(colmunDesc): tooltips icon line heigh to 0
Co-authored-by: jarek <jaroslaw.sadzinski@gmail.com>
2023-02-23 10:18:38 +01:00
Camille
dba64a20b4 fix: Harmonize enter key behaviour between formulas and transformations 2023-02-22 10:34:31 +01:00
Paul Fitzpatrick
cbf925aa00 (core) updates from grist-core 2023-02-21 10:49:19 -05:00
Camille
16d7f16840 style(ColmunDesc): icon size and visible when there is a long colmun name 2023-02-21 11:33:11 +01:00
Paul Fitzpatrick
3aba7f6208 (core) set up a trialing list and a call scheduled flag for Grist SaaS
Summary:
This adds support for the automation described in
https://grist.quip.com/rt3tAoEH4kuy/Automate-Sprouts-outreach-email

Test Plan: added tests; will need manual testing and iterative integration work

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3804
2023-02-20 15:32:58 -05:00
Camille
0fa908d41a fix(ColumnDesc): tooltip show multiline description + remove useless variable + remove outline style 2023-02-15 16:41:58 +01:00
Cyprien P
bc43e16bc7 (core) Fix one day shift in datepicker for DateTime column [WIP]
Summary:
Datepicker reads date using getUTCDate() but we used to parse date
using the document timezone instead of utc, hence the 1day shift.

Test Plan: Manual testing.

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D3801
2023-02-15 14:54:33 +01:00
Paul Fitzpatrick
f7f76fb5e7
A set of tweaks to simplify electron packaging (#421)
* Replace `ormconfig.js` with a newer mechanism of configuring
    TypeORM that can be included in the source code properly.
    The path to `ormconfig.js` has always been awkward to handle,
    and eliminating the file makes building different Grist setups
    a bit simpler.
  * Remove `electron` package. It is barely used, just for some old
    remnants of an older attempt at electron packaging. It was used
    for two types, which I left at `any` for now. More code pruning is
    no doubt possible here, but I'd rather do it when Electron packaging
    has solidified.
  * Add a hook for replacing the login system, and for adding some
    extra middleware the login system may need.
  * Add support for some more possible locations of Python, which
    arise when a standalone version of it is included in the Electron
    package. This isn't very general purpose, just configurations
    that I found useful.
  * Support using grist-core within a yarn workspace - the only tweak
    needed was webpack related.
  * Allow an external ID to be optionally associated with documents.
2023-02-13 15:52:17 -05:00
Jarosław Sadziński
7c448d746f (core) Moving attachment's widget icon below the frozen columns
Summary: Attachment icon in cells overlapped other cells in rozen columns.

Test Plan: Manual

Reviewers: paulfitz

Reviewed By: paulfitz

Subscribers: paulfitz

Differential Revision: https://phab.getgrist.com/D3796
2023-02-08 21:57:16 +01:00
Jarosław Sadziński
e93dd4bc6f (core) Preserving cursor position when linked state is removed.
Summary:
- Preserving cursor position when linked state is removed.
- Moving linking tests to grist core.
- Disabling yarn offline mirror for grist-core. This helps testing grist-core when it is imported as a submodule.
- Moving one test for linked section from ReferenceColumns.ts to RightPanelSelectBy.ts.

Test Plan: Updated

Reviewers: paulfitz

Reviewed By: paulfitz

Subscribers: paulfitz

Differential Revision: https://phab.getgrist.com/D3795
2023-02-08 21:54:55 +01:00
Jarosław Sadziński
6e3f0f2b35 (core) Porting back AI formula backend
Summary: This is a backend part for the formula AI.

Test Plan: New tests

Reviewers: paulfitz

Reviewed By: paulfitz

Subscribers: cyprien

Differential Revision: https://phab.getgrist.com/D3786
2023-02-08 17:15:59 +01:00
Cyprien P
ef0a55ced1 (core) Makes GristTooltips translatable
Test Plan: Should no break anything

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D3785
2023-02-08 16:21:49 +01:00
Jarosław Sadziński
ab2e2ef402 (core) Fix for flex-wrap in cssRow
Summary:
Moving flex-wrap from cssRow to cssButtonRow as cssRow should be
rendered in one line. cssButtonRow is used in the transform section UI where
buttons should be wrapped for other than English languages.

Related issue: https://github.com/gristlabs/grist-core/issues/339

Test Plan: Manual tests

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3794
2023-02-08 09:49:11 +01:00
Camille
e46b93d57f test(columnDesc): create column description simple test 2023-02-06 18:19:16 +01:00
Paul Fitzpatrick
363fb7f89e (core) updates from grist-core 2023-02-06 08:51:26 -05:00
jarek
5a324f1358
Adding new flags for supported locales (#420)
* Adding new flags for supported locales
* Removing pl-PL locale code from tests
* Linting
2023-02-03 18:56:24 -05:00
jarek
65c8bec2b4
Merge pull request #412 from incubateur-territoires/bug-card-empty-reference
Bug card empty reference
2023-02-03 19:14:11 +01:00
George Gevoian
6ccc195330 (core) Add dark theme to date picker
Summary:
Updates the date picker to use a dark theme when dark mode
is enabled.

Test Plan: Manual.

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D3780
2023-02-03 10:37:12 -05:00
George Gevoian
046222b1d9
Show language prefs when custom CSS is enabled (#418) 2023-02-01 15:19:15 -05:00
Cyprien P
75c53faacd (core) Fix document settings' scroll bar
Summary: Scroll bar used to show with an offset to the right end of the page. This diff fixes that issue.

Test Plan: should not break anything.

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D3778
2023-02-01 17:30:50 +01:00
Camille
bd9c9aa8f9 codeStyle(column-desc): create separate iconTooltip for column description 2023-02-01 13:55:41 +01:00
Camille
95f1a41618 Merge branch 'main' into column-description 2023-02-01 09:37:19 +01:00
Jarosław Sadziński
6864649b92 Removing toast errors on missing keys 2023-01-30 15:52:56 +01:00
Paul Fitzpatrick
671e479bad (core) updates from grist-core 2023-01-30 09:09:11 -05:00
Louis Delbosc
5b031b8d84 Change link to reference new when rowId is null 2023-01-27 15:18:34 +01:00
Camille
5afb2e2fee fix(columnDesc): improve styling 2023-01-26 15:54:02 +01:00
Camille
f0dc24306a feat(ColumnDesc): Info Tooltip with column desc in DetailView 2023-01-26 14:54:37 +01:00
Camille
969280629b fix: linter correction 2023-01-26 14:54:37 +01:00
Camille
009ebefd96 feat(ColumnDesc): create column description in database and link it to visual behaviors 2023-01-26 14:54:37 +01:00
Camille
0a90fc0c7b feat(columnDesc): add front description in single card widget 2023-01-26 14:54:37 +01:00
Camille
66cb283075 feat(columnDescription): show description textarea in right panel 2023-01-26 14:54:37 +01:00
Jarosław Sadziński
90d3ee037a (core) User language switcher
Summary:
New language selector on the Account page for logged-in users.
New icon for switching language for an anonymous user.

For anonymous users, language is stored in a cookie grist_user_locale.
Language is stored in user settings for authenticated users and takes
precedence over what is stored in the cookie.

Test Plan: New tests

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D3766
2023-01-26 09:47:14 +01:00
jarek
f1a4404a60
Merge pull request #411 from incubateur-territoires/no-check-box-toggle-formula
fix: hide check box from toggle in formula mode
2023-01-25 17:53:11 +01:00
Cyprien P
abea735470 (core) Preserves docPage upon viewAs mode activation, except for acl page
Summary:
Switching to view-as should not change current page. Except when using
the `View As` dropdown in the acl page, in which case we do want to
revert to the default page.
This is a follow up task for: D3732

Test Plan: Updated acl nbrowser test.

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D3773
2023-01-25 17:40:54 +01:00
Camille
573c287747 fix: hide check box from toggle in formula mode 2023-01-25 16:28:07 +01:00
Camille
1f6a0f12ed fix(css): flex wrap when no space in cssRow right panel styles 2023-01-25 11:24:39 +01:00
Camille
55e4b93562 fix: styling error + word error 2023-01-24 13:51:53 +01:00
Camille
82d036d344 fix: remove trailing space 2023-01-24 13:47:09 +01:00
Camille
4ce820ed67 fix(CI): cut line too long 2023-01-24 13:47:09 +01:00
Camille
4befca1c92 trad: make the widgets and the Welcome Tour translatable
trad: make the widgets and the Welcome Tour translatable

feat(translation): create automatisation for synchronize key in other locals than en

trad: add french translations

fix(trad): remove all useless code

fix(trad): convert tab to space indentation

fix(trad): add line to english trads
2023-01-24 13:47:09 +01:00
Jarosław Sadziński
2f39c07a5a (core) Preserving scroll position on Raw Data Page
Summary: On Raw Data page, when there are multiple tables, the scroll position shouldn't be changed when a table is opened and closed.

Test Plan: Existing tests

Reviewers: dsagal

Subscribers: dsagal

Differential Revision: https://phab.getgrist.com/D3770
2023-01-23 10:00:59 +01:00
Jarosław Sadziński
dda453714a (core) Migrating LayoutEditor.js to ES
Summary: Migrating LayoutEditor.js to typescript.

Test Plan: Existing tests should pass.

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3769
2023-01-20 09:38:37 +01:00
Cyprien P
bf63e2bd70 (core) Fix comments nbrowser tests on mac
Summary: Comments do save on ctrl+enter but test implementation was resolving to command+enter.

Test Plan: Should not break anything.

Reviewers: jarek

Reviewed By: jarek

Subscribers: paulfitz, jarek

Differential Revision: https://phab.getgrist.com/D3752
2023-01-19 11:33:16 +01:00
Cyprien P
a8827b152e (core) New document settings page
Summary:
This diff implement new page for document settings which replaces the old modal settings.
Diff also adds a new `Settings + API` page item below tools in the left panel that link to that very doc settings page.

Test Plan: Updated existing tests.

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D3761
2023-01-19 10:21:23 +01:00
Cyprien P
ca5ae6fa3f (core) Hides the link icon in print view
Summary:
Users complained about white spaces left by the link icon when printing.
Diff fixes the issue by hiding link icon completely.

Test Plan: Adds tests in `nbrowser/Printing.ts`

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D3767
2023-01-19 09:55:12 +01:00
Jarosław Sadziński
1dafe4bae0 (core) Expanding widgets
Summary:
New icon to expand an active section and show it as a popup (just like raw data views).

"Show raw data" popup couldn't be reused (as it is basically a different page), so now
we have two kinds of popups that look the same.

1. Raw data popup - to show an alien section on a page (a section from a different view). This is used by "Show raw data" button, it is basically a different page that shows an arbitrary section.

2. Layout popup - a popup generated by Layout.ts that basically hides every other section and adds an overlay effect to itself.

Other changes
- Layout.js was migrated to typescript
- "Show raw data" menu item was converted to link

Test Plan: new tests

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3764
2023-01-19 09:46:59 +01:00
Dmitry S
45c7602f49 (core) Implement checkbox for SchemaEdit permission in Access Rules UI.
Summary:
- Introduces a fictitious "*SPECIAL:SchemaEdit" resource in UI only.
- Hides "S" bit for the default rule section.
- Shows a checkbox UI similar to other checkboxes, with an additional
  dismissable warning.

Test Plan: Added a browser test

Reviewers: paulfitz, georgegevoian

Reviewed By: paulfitz, georgegevoian

Differential Revision: https://phab.getgrist.com/D3765
2023-01-18 10:55:44 -05:00
Cyprien P
18d016c745 (core) Fix date filter for DateTime columns.
Summary:
Date filter was not taking timezone correclty into account, which was
causing to wrong-inclusion and wrong-exclusion of dates near the
bounds.

Diff fixes that, it also bring little refactoring that hopefully clarifies things a little.

Test Plan: Includes brand new test for `app/common/ColumnFilterFunc`.

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D3763
2023-01-18 10:18:15 +01:00
Paul Fitzpatrick
a822a5771c (core) updates from grist-core 2023-01-17 09:11:25 -05:00
George Gevoian
db64dfeef0 (core) Add tip for "Add New" button
Summary:
Adds a new tip for the doc menu's Add New button. The tip is
shown only when the current user is an editor or owner, and
the site is non-empty. The presence of welcome videos or
popups will also cause the tip to not be shown; it will instead
be shown the next time the doc menu is visited.

Test Plan: Browser tests.

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D3757
2023-01-16 16:50:42 -08:00
CamilleLegeron
cf096889db
feat(TypeConversion): allow converting list of string with quotes to ChoiceList (#397) 2023-01-12 23:13:26 -05:00
Cyprien P
b7f65ff408 (core) Adds dots menu to access rules page item
Summary: In Access rules page item, adds “…” buttons that shows a menu of users to view-as:

Test Plan: Include new nbrowser test

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D3751
2023-01-12 09:40:45 +01:00
Dmitry S
e170eef1a4 (core) A few assorted one-line fixes
Summary:
- Use newer flag in .npmrc to avoid warnings
- Fix check in WidgetRepository, useful for development but was broken
- Fix macSandboxExec for Macs that require libRosettaRuntime
- Make sure row count in Raw Data listing is visible when it takes more space

Test Plan: Tested manually

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3759
2023-01-09 23:31:04 -05:00
George Gevoian
9e009bbab9 (core) Update memo notification styling
Summary: Updates CSS for memo notifications to match latest Figma designs.

Test Plan: N/A

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D3737
2023-01-09 14:34:59 -05:00
Paul Fitzpatrick
e6692c2793 (core) add a checkbox for owner "boss mode"
Summary:
Implement a checkbox that grants owners full access to tables by default, when creating new table/column rules.
 * Checkbox appears above default rules.
 * When set, a rule giving owners full access will be inserted in any new rule set started for tables or columns.
 * The checkbox can be expanded to allow customization of the rules.

https://gristlabs.getgrist.com/doc/check-ins/p/3#a1.s7.r2251.c19

Test Plan: added tests

Reviewers: jarek

Reviewed By: jarek

Subscribers: anaisconce

Differential Revision: https://phab.getgrist.com/D3756
2023-01-09 13:20:23 -05:00
Jarosław Sadziński
30600c5dc2 (core) Making makeT helper use the unprefixed key as a fallback
Summary:
By default the fallback contains the prefix, which doesn't
work well with a key based translations. Now makeT helper will fallback
to the passed key (without a prefix).

Test Plan: Added new client test

Reviewers: paulfitz

Reviewed By: paulfitz

Subscribers: paulfitz

Differential Revision: https://phab.getgrist.com/D3758
2023-01-05 16:25:19 +01:00
Paul Fitzpatrick
92276cdbda (core) updates from grist-core 2023-01-05 09:06:54 -05:00
Jarosław Sadziński
15dafb5707 (core) Removing beta tag from ACL rules tools menu
Summary: ACL is no longer a beta feature.

Test Plan: Manual

Reviewers: paulfitz

Reviewed By: paulfitz

Subscribers: paulfitz

Differential Revision: https://phab.getgrist.com/D3755
2023-01-05 11:23:23 +01:00
Cyprien P
8227be513c (core) Fix UI losing view as mode after updating doc sharing
Summary:
Fix issue where the view-as banner disappears when saving
changes on the User Manager panel while view-as mode was ON.

Test Plan: Updates nbrowser test

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D3754
2023-01-05 09:13:13 +01:00
Paul Fitzpatrick
3b4af3ce21 adapt weblate translations to new keys
Hope we won't change keys too often...
2023-01-04 23:29:49 -05:00
Jarosław Sadziński
d107810127 (core) Fixing scrolly bug on mobile
Summary:
On mobile view not all rows are rendered when a section is expanded.
Scrolly component calculates height of the GridView too soon (before animation is
completed). With this change on mobile view we always take the screen height for
calculation.

A similar bug was on Card List, where cards were squeezed and their height was
calculated to soon.

Test Plan: Added test

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3748
2023-01-04 17:53:02 +01:00
Paul Fitzpatrick
cd72a54bbb (core) updates from grist-core 2023-01-04 10:38:22 -05:00
jarek
8c6f82fce3
Merge pull request #384 from gristlabs/eslint
Adding basic eslint support.
2023-01-04 16:36:55 +01:00
Cyprien P
a04979bede (core) Enable search in column pickers
Summary: Adds a search input at the top of columns dropdown. Start typing in the search bar filters the list of column (matching occurences should work similarly as the autocomplete dropdown on Choice column).

Test Plan: Include tests.

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3738
2023-01-04 10:02:12 +01:00
Paul Fitzpatrick
13cb4e8389 (core) adapt some translation keys after reorganization
Summary: adapt some translation keys after reorganization in https://github.com/gristlabs/grist-core/pull/367

Test Plan: existing tests

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3753
2023-01-03 15:10:56 -05:00
Paul Fitzpatrick
1780e1139f (core) updates from grist-core 2023-01-03 12:50:50 -05:00
Jarosław Sadziński
e79613b0ed (core) Restoring separated transform columns
Summary:
Fix for a bug that prevented two users to change column types at
the same time.

Test Plan: Added and updated

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3745
2023-01-03 17:54:16 +01:00
Jarosław Sadziński
0bd759a40b Adressing comments 2023-01-03 17:47:46 +01:00
Jarosław Sadziński
f8795efff8 Linting long lines 2023-01-03 17:45:14 +01:00
Jarosław Sadziński
fd02a00a0e Fixing all eslint's reported error 2023-01-03 17:22:58 +01:00
George Gevoian
5b9242fa7c (core) Tweak placement and title of filters tip
Summary:
The pinning filters tip is now shown to the right by default, and
has a new title.

Test Plan: Tested manually.

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D3743
2023-01-03 11:10:03 -05:00
jarek
de1001f46d
Merge pull request #367 from incubateur-territoires/translation-key-migration
Translation key migration
2023-01-03 16:33:50 +01:00
George Gevoian
77e85c132c
Fix control-border CSS regression (#388) 2023-01-03 10:16:23 -05:00
Louis Delbosc
67c09d7f5a Fix new translations 2023-01-03 16:01:45 +01:00
Louis Delbosc
78a1c2d890 Add fr translation and fix some translation on the go 2023-01-03 16:01:45 +01:00
Louis Delbosc
4165c35dd3 Add translation keys generator script 2023-01-03 16:01:45 +01:00