Commit Graph

4569 Commits

Author SHA1 Message Date
Jaroslav Tulach
fe28c23658
Table of Persistance.Reference at the end of the stream (#9972)
Fixes #9361 by delaying storing of `Persistance.Reference` instances and creating their table at the end of the stream.
2024-05-18 17:33:04 +00:00
Sergei Garin
c5a91a63fe
Add tanstack query devtools (#9991)
This PR adds tanstack devtools to debug react query queries


https://github.com/enso-org/enso/assets/61194245/6898de33-cf9a-4077-9fdd-7b710484a94b


Also, this PR provides a way to download dev tools in Production
2024-05-18 06:50:28 +00:00
James Dunkerley
3b29de313d
Update ICONs, linting fixes and add select_columns ALIASes. (#9985)
- Linting fixes.
- Add ICONs to all functions missing them.
- Add ALIASes for select columns.
2024-05-17 19:24:17 +00:00
Ilya Bogdanov
ff21cc4e8f
Implement new node naming (#9964)
- Closes #9829
- Name is selected from the type of the first suggestion applied in the component browser
- If no suggestion is selected, we try to infer the name from the AST
- If both fail, we revert to the `operator` name
- Adding unique number suffixes in sequential order, reusing them as soon as they become available.

https://github.com/enso-org/enso/assets/6566674/4e6bd1e5-7b11-4e04-b49f-315675d34a0f

# Important Notes
- Search through available identifiers is linear, which potentially can cause problems in huge projects.
- I made changes to the `ReactiveIndex` implementation to fix the behavior of `identifierUsed()` and `allIdentifiers()` which were not working correctly.
2024-05-17 18:06:43 +00:00
Ilya Bogdanov
1034596e5b
Fix text widget rendering (#9981)
Fixes https://github.com/enso-org/enso/issues/9688

<img width="685" alt="Screenshot 2024-05-17 at 1 24 19 PM" src="https://github.com/enso-org/enso/assets/6566674/9f30b607-7776-4acb-98b3-75c697a1b58e">
2024-05-17 16:54:45 +00:00
GregoryTravis
4d49b00375
Combine builders for Vector.build and Vector.new_builder (#9922)
We have decided to keep the old new_builder, and to combine the new and old builders into one builder.
2024-05-17 16:18:47 +00:00
AdRiley
5c9ee94812
Make parse_fast_json private (#9978)
Micro MR to make deprecated method private
2024-05-17 15:47:11 +00:00
Ilya Bogdanov
8b389553b6
fix: escape docs text in documentation parser (#9983)
Fixes #9933


<img width="679" alt="Screenshot 2024-05-17 at 2 27 18 PM" src="https://github.com/enso-org/enso/assets/6566674/261ea12c-1cb9-4a09-8e36-75dbc9e56c22">
2024-05-17 14:25:36 +00:00
Ilya Bogdanov
6e9b4ec9fb
Call showAll on opening projects (#9974)
Fixes #9902


https://github.com/enso-org/enso/assets/6566674/2eb2b0dd-610a-48e7-aeb6-6c9c423746db
2024-05-17 13:32:09 +00:00
Jaroslav Tulach
5c06535c46
Importing (some of) Standard.Base works from NI runner (#9866) 2024-05-17 14:42:35 +02:00
Hubert Plociniczak
a5ca9f9ac2
Reduce ops when setting exisitng execution env (#9967)
Setting execution environment to the existing one should have no effect.
Should (positively) affect startup in #9789.

# Important Notes
Cancelling jobs and triggering a fresh execute job is expensive and unnecessary, especially on startup, when the result should be the same as before.
2024-05-16 20:59:13 +00:00
Kaz Wesley
d39451dd4d
Use Lexical for method docs and node comments (#9956)
Use a Lexical-based markdown editor in the right dock; use a Lexical-based plain text editor for node comments.
2024-05-16 14:38:03 +00:00
Hubert Plociniczak
f1e60e7e44
Use simple type name as Jackson type id (#9961)
Using a fully qualified name for type identifier does not play well when dealing with different classloaders (classes are not recognized as equal/subtypes).

Closes #9876. Likely also affecting #9306.

# Important Notes
There appears to be a number of cases loosely related issues on that subject. Gave up on adding a test cases to simulate the problem but I could no longer reproduce it with LS/runtime on a live project.
```
[org.enso.languageserver.runtime.RuntimeConnector$Endpoint] Failed to deserialize runtime API envelope
com.fasterxml.jackson.databind.exc.InvalidTypeIdException: Could not resolve type id 'org.enso.polyglot.data.Tree$Node' as a subtype of `org.enso.polyglot.data.Tree$Node<org.enso.polyglot.runtime.Runtime$Api$SuggestionUpdate>`: Not a subtype
at [Source: (byte[])[6718 bytes]; byte offset: #394] (through reference chain: org.enso.polyglot.runtime.Runtime$Api$Response["payload"]->org.enso.polyglot.runtime.Runtime$Api$SuggestionsDatabaseModuleUpdateNotification["updates"]->org.enso.polyglot.data.Tree$Root["children"]->com.fasterxml.jackson.module.scala.deser.GenericFactoryDeserializerResolver$BuilderWrapper[0])
at org.enso.IsolatedClassLoader//com.fasterxml.jackson.databind.exc.InvalidTypeIdException.from(InvalidTypeIdException.java:43)
```
appears to be gone.
2024-05-16 14:26:26 +00:00
Radosław Waśko
38ad7b0afa
Creating datalinks from code (#9957)
- Closes #9673
- Adds the ability to save an existing Postgres connection as a datalink into the Enso Cloud, automatically promoting plain-text passwords into a Secret.
- Fixes dataflow error propagation in `JS_Object.from_pairs`.
2024-05-16 13:29:41 +00:00
Kaz Wesley
8823a2aaa0
Track live selection (#9924)
* Track live selection
2024-05-16 09:24:17 -04:00
Kaz Wesley
0571000c74
Color ring updates component colors continuously (#9939)
Commit color ring selections to nodes live.

- To prevent opening the picker from immediately changing the color, gradient is rotated so that the initially-selected color is under the mouse when the picker is opened.
- Escape key reverts selection to initial color(s).

Closes #9936
2024-05-15 16:14:09 +00:00
Radosław Waśko
a2481036e6
Prepare for the Path resolver change to GET (#9958)
- Prepares for the Cloud API change, together with a fallback for the old API to avoid problems during migration.
- This PR should be merged before the https://github.com/enso-org/cloud-v2/pull/1236 PR is _deployed_.
2024-05-15 13:00:32 +00:00
Jaroslav Tulach
a53b2f0b18
Reverse order of stack frames and test the result (#9954)
Fixes #9934 by reversing the order of `dropInitJava` frames.
2024-05-15 09:09:36 +00:00
James Dunkerley
c437721ba5
Show ALIAS matches as <name> (<alias>) (#9955)
In order to help with discovery of the functions we want to have more ALIASes (such as select_columns) on associated functions. To make it clearer what each does reversing the order helps.

![image](https://github.com/enso-org/enso/assets/4699705/55fac1fa-1307-4544-b150-dc184ddc27aa)
2024-05-14 20:17:08 +00:00
Michał Wawrzyniec Urbańczyk
7982935c2f
[CI] Fix issues with checking PRs created against repository forks (#9926)
This PR fixes several issues that were appearing when running CI jobs on PRs created against the repository forks:
* electron-builder on Windows and macOS will properly recognize that the secrets are missing and will not attempt to sign the artifacts;
* similarly, fixed the S3 library tests;
* test reporter step will be now skipped, as it does not support forks.
2024-05-14 18:38:44 +00:00
James Dunkerley
b2aeb9fc84
Moving away from Integer | Nothing to Rows_To_Read for limiting number of rows. (#9925)
- Added a new `Rows_To_Read` type with conversions from `Nothing` and integers.
- Updated `read` on `Table`, `Column`, `DB_Table` and `DB_Column`.
- Updated `Delimited_Format.Delimited` to use `Rows_To_Read` for `row_limit`.
- Updated `Excel_Format.Sheet` and `Excel_Format.Range` to use `Rows_To_Read` for `row_limit`.
- Updated `Excel_Workbook.read` to use `Rows_To_Read`.
- Updated `Connection.read` (in all connection types) to use `Rows_To_Read`.

![image](https://github.com/enso-org/enso/assets/4699705/553c027f-f4c3-4855-9f51-2c4bcaec48a0)

![image](https://github.com/enso-org/enso/assets/4699705/a06c3912-77e0-4c10-abb8-73aed667458d)
2024-05-14 16:31:26 +00:00
Ilya Bogdanov
557d585216
Cleanup placement unit tests (#9943)
While fixing prop test in #9916, I was surprised to see a lot of basically unused checks in unit tests. With the new API, the need for them is gone.
2024-05-14 15:58:25 +00:00
James Dunkerley
2d6735edc7
Allow a Table to be used to rename_columns. (#9940)
Following an example from Steve, adjusted `rename_column` to allow a `Table` to define the mapping.

- A single Text column table gives a list of new names.
- A two Text column table gives a map from old name to new name.
- If a `DB_Table` is passed errors and tells the user to materialize the table.

![image](https://github.com/enso-org/enso/assets/4699705/3ed98330-1fce-465e-bf96-4a86e0872dd3)
2024-05-14 15:57:10 +00:00
somebody1234
f0411766fa
Add "About app" modal (#9833)
- Close #9433
- Add modal displaying version info of the app

# Important Notes
None
2024-05-14 14:00:00 +00:00
Ilya Bogdanov
cc8e5ae2d1
Place dropdown arrow under autoscoped identifier (#9945)
Place arrows below autoscoped identifier, also fixes issue with CSS.
2024-05-14 13:45:04 +00:00
Adam Obuchowicz
9faa1823ec
Fix visualization resizing (#9946)
* Fixes #9942
* Restores updating visualization size in metadata. Also, the height is also stored.
2024-05-14 11:49:37 +00:00
Ilya Bogdanov
52b8ed4d3a
Consider autoscoped name when looking up dynamic config (#9916)
Fixes #9635

@JaroslavTulach with this change you reproduction scenario works as it should.


https://github.com/enso-org/enso/assets/6566674/89ecaae4-c5e5-437a-8ff2-3e77ccb0a67c
2024-05-14 11:01:19 +00:00
Hubert Plociniczak
43c80da8a3
Follow up to #9927 (#9930)
`System.getProperty` does not return `null`, it returns `"null"`
🤦.
I broke the internet, sorry.
2024-05-13 16:43:24 +02:00
Michał Wawrzyniec Urbańczyk
b76e4d678d
Build script cleanups (#9931)
This PR removes unused, commented-out or otherwise spurious code from build script. Also, dependencies were reviewed and cleaned.

No functional changes intended.
2024-05-13 13:56:28 +00:00
Sergei Garin
2ed83f2fb5
Send Payment method id in checkout session (#9932) 2024-05-13 13:43:34 +00:00
Hubert Plociniczak
ff28737252
Improve SuggestionsRepo initialization (#9808)
Added synchronization block to avoid race conditions.
2024-05-13 13:40:52 +00:00
Hubert Plociniczak
c67218c1ed
Abort jobs as early as possible (#9927)
We don't seem to run `abortJobs` under a lock, and especially not under the write compilation lock, in other scenarios. This is causing some major slowdown when there is a long running execution or compilation, as currently experienced in the cloud.

This should reduce chances of a timeout.

Also added an option to override the global executor. Currently it would always default to the runtime number of available process which may be suboptimal.

# Important Notes
Pending testing on the impact it will have.
2024-05-13 07:39:29 +00:00
Radosław Waśko
5f0a16c87c
Audit Logs for Postgres connections opened through a data link (#9873)
- Closes #9599
- Implemented API for sending audit logs to the cloud on a background thread.
- If the Postgres connection is opened through a datalink, its internal JDBC connection is replaced by a wrapper that reports executed queries to the audit log.
- Also introduces `EnsoMeta` - a helper Java class that can be used in our helper libraries to access Enso types.
- I have replaced the common pattern scattered throughout the codebase with calls to this 'library' to avoid repetitive code.
- Refactored `Table.display` to share code between in-memory and DB - it was needed as the function stopped working for `DB_Table` after adding making the `Table` constructor `private`.
- Clearer error when reading a SQLite database from a remote file (tells the user to download it first).
- Follow up - correlate asset id of the data link:
#9869
- Follow up - include project name (once bug is fixed):
#9875
- Some problems/improvements of the audit log:
- The audit log system is not yet ready for high throughput of logs
#9870
- The logs may be lost if `System.exit` is used
#9871
2024-05-11 08:54:33 +00:00
Radosław Waśko
1d61c08dff
Followup improvements to the license review tool (#9895)
- Closes #9122
- Promised follow-up of #9782
2024-05-11 07:51:11 +00:00
James Dunkerley
d97754da17
Error messages for rename_columns and Vector.duplicates (#9917)
- Improve error message for `rename_columns`.
- Add `length` to `Set` and `Map`.
- Add `duplicates` to `Vector` (and `Array`).

![image](https://github.com/enso-org/enso/assets/4699705/623df253-52e8-4bdc-a69c-ac8dc3ca594e)
2024-05-10 17:43:50 +00:00
Kaz Wesley
4af33f077b
Documentation editor (#9910)
#### New documentation panel:
- Shows documentation of currently-entered method.
- Open/close with Ctrl+D or the extended menu.
- Renders markdown; supports WYSIWYG editing.
- Formatting can be added by typing the same markdown special characters that will appear in the source code, e.g.:
- `# Heading`
- `## Subheading`
- `*emphasis*`
- Panel left edge can be dragged to resize similarly to visualization container.

https://github.com/enso-org/enso/assets/1047859/6feb5d23-1525-48f7-933e-c9371312decf

#### Node comments are now markdown:
![image](https://github.com/enso-org/enso/assets/1047859/c5df13fe-0290-4f1d-abb2-b2f42df274d3)

#### Top bar extended menu improvements:
- Now closes after any menu action except +/- buttons, and on defocus/Esc.
- Editor/doc-panel buttons now colored to indicate whether editor/panel is open.

https://github.com/enso-org/enso/assets/1047859/345af322-c1a8-4717-8ffc-a5c919494fed

Closes #9786.

# Important Notes
New APIs:
- `DocumentationEditor` component: Lazily-loads and instantiates the implementation component (`MilkdownEditor`).
- `AstDocumentation` component: Connects a `DocumentationEditor` to the documentation of an `Ast` node.
- `ResizeHandles` component: Supports reuse of the resize handles used by the visualization container.
- `graphStore.undoManager`: Facade for the Y.UndoManager in the project store.
2024-05-10 17:23:16 +00:00
Kaz Wesley
a14a95c057
Only Escape cancels edits (#9913) 2024-05-10 16:13:59 +00:00
Ilya Bogdanov
4376a5a851
Improve dropdown arrows placement (#9909)
Closes #9428

Hilariously tricky thing to implement. Besides placing arrows below constructor names, we also position them under values in argument placeholders.

We also added a new feature to the widget tree: the `allowAsLeaf` property. See provided documentation.

https://github.com/enso-org/enso/assets/6566674/e3ba96b3-fff8-4553-ac94-866436aea013
2024-05-10 14:38:38 +00:00
Sergei Garin
9f4b374485
Implement Subscribe flow (#9776) 2024-05-10 12:28:49 +00:00
Michał Wawrzyniec Urbańczyk
fd2072b692
[CI] Retry uploading release assets (#9894)
This PR updates the build script to retry uploading release assets if the upload fails.

Network issues can cause the upload to fail, failing in turn the whole release process. This PR adds a retry mechanism to the upload process, making the release process more robust.
2024-05-10 11:56:59 +00:00
Shixian Sheng
3c4636cd2e
Update README.md (#9911)
Fixed a typo in the link (app/gui to app/gui2) so now it will redirect users to the right place
2024-05-10 13:51:43 +02:00
somebody1234
35571f64ba
Add tooltips (#9899)
- Dashboard side of #9828
- Add tooltips for elements rendered by the Dashboard

# Important Notes
- The UI for the tooltips can be changed at any time.
2024-05-10 08:17:06 +00:00
GregoryTravis
720d32cbe3
Convert most remaining uses of Vector.new_builder to Vector.build (#9891) 2024-05-09 15:52:53 +00:00
Hubert Plociniczak
f1ddf1b863
Log timings of FS operations (#9908)
I'm seeing occasional IO timeouts, especially on startup operations, for cloud projects. Adding some logging to make an informed decision if there are some problems there.

Related to https://github.com/enso-org/enso/issues/9789

# Important Notes
Also added retries when closing the file as I saw a number of times:
```
Session release failed.
LsRpcError: Language server request 'text/closeFile' failed.
at LanguageServer.request (/tmp/.mount_enso-leMqqdS/resources/app.asar/index.cjs:58291:15)
at async Promise.all (index 0)
at async _LanguageServerSession.release (/tmp/.mount_enso-leMqqdS/resources/app.asar/index.cjs:59165:5)
at async /tmp/.mount_enso-leMqqdS/resources/app.asar/index.cjs:59670:7 {
cause: JSONRPCError2: Request timeout request took longer than 15000 ms to resolve
at new JSONRPCError2 (/tmp/.mount_enso-leMqqdS/resources/app.asar/index.cjs:26822:30)
at Timeout._onTimeout (/tmp/.mount_enso-leMqqdS/resources/app.asar/index.cjs:26985:20)
at listOnTimeout (node:internal/timers:569:17)
at process.processTimers (node:internal/timers:512:7) {
code: 7777,
data: undefined
},
request: 'text/closeFile',
params: {
path: {
rootId: '00000000-0000-0000-0000-000000000001',
segments: [Array]
}
}
}
```
2024-05-09 15:41:50 +00:00
Radosław Waśko
1d8fc1bf6e
Update endpoint name after it was updated in the Cloud (#9912)
Micro PR updating our API integration to the Cloud-side changes.
2024-05-09 15:17:19 +00:00
AdRiley
55be1057fa
Add missing tests (#9897)
* Add missing tests

* Fix

* Fix tests
2024-05-09 15:47:31 +01:00
Adam Obuchowicz
147c1cf99f
Refactor drag handlers (#9874)
Fixes #9780

Before all drag handlers set pointer capture on their `currentTarget`, preventing click events on the actual click target, and to prevent that we stopped `pointerdown` (and more) on every "panel-like" element. Now it's ok to stop only actually handled events.

Navigator and selection handlers just ignore `pointerdown` events not targeted to actual Graph Editor background.

Node dragging is more complex, as we want to allow dragging the node by grabbing just any of its part (including widgets). So the handler takes pointer capture from widget only after a significant move (long enough in time _or_ space). **This allows user to drag nodes by many interactive widgets (before they stopped `pointerdown` disabling node drag).

[Screencast from 2024-05-08 10-45-33.webm](https://github.com/enso-org/enso/assets/3919101/d521b7a4-96c5-4e2c-a8a6-84388a18d041)
2024-05-09 12:48:58 +00:00
somebody1234
65179fbd98
"User groups" settings page (#9081)
- Close https://github.com/enso-org/cloud-v2/issues/907
- Add a settings page for listing groups
- Add users list with drag-n-drop into user groups
- Show users below user groups
- Add delete button for users and user groups

Other changes:
- Add delete button for users on "Members" settings page. Note that it currently does not work as corresponding backend functionality is missing.

# Important Notes
None
2024-05-09 12:04:35 +00:00
AdRiley
e25ec96aaa
Add table running variance skew sd and kurtosis (#9854)
Adds support for Variance, Skew, Standard Deviation and Kurtosis to Table.Running.
2024-05-09 08:45:29 +00:00
Michał Wawrzyniec Urbańczyk
d395168bc5
[CI] Remove duplicated workflow definition (#9888)
This PR removes an outdated workflow definition file.

Essentially, a file rename went wrong and the workflow was committed both under new and old filename.
2024-05-08 17:04:44 +00:00