Commit Graph

4859 Commits

Author SHA1 Message Date
Jaroslav Tulach
220b40a1cd
Enforce conversion method return type & introduce Comparable.new (#10468) 2024-07-11 06:58:51 +02:00
marthasharkey
1f1b4d1bec
reintroduce column sort (#10496)
This re introduces the column sort behaviour that was lost when the type indicator was added
![column-sort](https://github.com/enso-org/enso/assets/170310417/fe33faed-d816-4447-bd57-755fd3c06856)
2024-07-10 21:25:59 +00:00
Kaz Wesley
32e843c614
Expose backend API to IDE (#10442)
Move `Backend` and supporting APIs from `dashboard` to `enso-common`.

Closes #10400.

# Important Notes
- The utility modules required by `Backend` have been moved to `enso-common`. Those defining general-purpose helpers for working with standard types are now in a submodule `utilities/data` to match the IDE organization; in the future we can merge them with the `util/data` gui2 subtree. Moved utilities are reexported from their dashboard locations, so that moved and not-yet-moved modules can be imported consistently.
- The `text` module has been moved to `enso-common`; the IDE doesn't have any localization mechanism yet, so we can share this one.
2024-07-10 21:04:37 +00:00
Adam Obuchowicz
60c1a0e1f6
Record control tweaks (#10509)
Fixes #10388

[Screencast from 2024-07-10 13-55-46.webm](https://github.com/enso-org/enso/assets/3919101/4ad7c039-84f6-4e42-aad9-5e287ccd88bb)

# Important Notes
Also, removed unnecessary  setExecutionEnvironment call on startup
2024-07-10 20:19:23 +00:00
Sergei Garin
09521f9a39
Fix opening local projects (#10511)
Related #10510

Await in the middle of the `getProjectDetails` leads to a non-deterministic result (in case if project opens during the await we get placeholder data with status = 'opened'
2024-07-10 18:03:02 +00:00
Sergei Garin
4ce557b3d8
Add ability to choose a plan in enso devtools (#10499)
* Add ability to choose user plan in devtools

* move devtools into a dedicated folder

* use enterprize in mocks

* try fix issues
2024-07-10 20:46:54 +03:00
Ilya Bogdanov
6ebcc1ddf9
Remove navigation buttons from nav bar (#10506)
Closes #10485

<img width="516" alt="Screenshot 2024-07-10 at 3 07 22 PM" src="https://github.com/enso-org/enso/assets/6566674/417b8e6a-8f4b-409c-8646-a3d424ccbca7">

# Important Notes
This task is done as per the attached issue. However, this change is not reflected in the latest version of Figma design as far as I’m aware.
2024-07-10 13:36:35 +00:00
Radosław Waśko
48c17845a7
Fixing Database tests and Snowflake Dialect - part 3 out of ... (#10458)
- Related to #9486
- Fixes types in literal tables that are used throughout the tests
- Tries to makes testing faster by disabling some edge cases, trying batching some queries, re-using the main connection and trying to re-use tables more
- Implements date/time type mapping and operations for Snowflake
- Updates type mapping to correctly reflect what Snowflake does
- Disables warnings for Integer->Decimal coercion as that's too annoying and implicitly understood in Snowflake
- Allows to select a Decimal column with `..By_Type ..Integer` (only in Snowflake backend) because the Decimal column there is its 'de-facto' Integer column replacement.
2024-07-10 13:21:30 +00:00
AdRiley
ce6995c83f
Make docker instructions clearer (#10501) 2024-07-10 13:53:24 +01:00
somebody1234
da6af3e896
Scope CSS code (#10489)
- Fix #10470
- Fix scoped styles for GUI

# Important Notes
None
2024-07-10 11:49:38 +00:00
marthasharkey
530d10d9bd
hide row count for some table visualizations (#10492)
This will hide the row count when `all_rows_count` isn't sent in the JSON for visualization. This will keep the row count for Vectors, Maps, Tables, Columns but hide for other single value thing in tables.
<img width="585" alt="image" src="https://github.com/enso-org/enso/assets/170310417/843e022d-4265-4845-a9c1-c4404d0db64f">
2024-07-10 10:39:53 +00:00
Adam Obuchowicz
38bbd8b6e6
Numeric input does not allow non-numeric value (#10457)
Fixes #9838 (see the "backlog refinement" comment there).

When someone want's to accept invalid input, it gets reverted to last recorded valid value.
2024-07-10 10:38:38 +00:00
Sergei Garin
590526a7a6
Rename Organization -> Enterprise (#10502) 2024-07-10 12:47:28 +03:00
somebody1234
b55086de75
More dashboard fixes (#10494)
- Fix context menu floating some distance away from the right side when clicking near right edge
- Add a line beside nested categories to make it clearer that it's not a UI glitch
- Fix watch mode for electron app

# Important Notes
None
2024-07-10 09:04:20 +00:00
Jaroslav Tulach
ee0175c364
Support re-running failed tests with runEngineDistribution (#10483) 2024-07-10 07:05:29 +02:00
James Dunkerley
8da06309e9
Date Time Pickers, Temporarily Disable Encoding.default (#10493)
- Widgets for Date_Time, Time_Of_Day and Time_Zone.
- Disable Encoding.default for now as big performance impact on CSVs.

![image](https://github.com/enso-org/enso/assets/4699705/c1b936f0-3ab4-490c-8fe5-2310ef1ed079)

![image](https://github.com/enso-org/enso/assets/4699705/d5e29ec4-cc52-41e5-a532-17cd6dff34b9)

![image](https://github.com/enso-org/enso/assets/4699705/61455519-ea63-4275-9c7a-603714ff9f85)

![image](https://github.com/enso-org/enso/assets/4699705/48ccd3ad-5e15-49f9-87cd-4710ca559843)
2024-07-09 21:04:08 +00:00
GregoryTravis
71a6e2162e
Fix return type for Postgres Decimal division (#10479) 2024-07-09 15:22:14 +00:00
Kaz Wesley
bc92035683
Share tanstack QueryClient between dashboard and IDE (#10431)
* Share tanstack QueryClient between dashboard and IDE

Part of #10400.

* Lint

* Review: Use enso-common

* Remove outdated README

* Naming

* Fix

* Lint

* enso-common CODEOWNERS: GUI+Dashboard

* Review: Prepare for GUI to be run from cloud entry point

* Lint

* Lint

* Fix e2e tests

* Fix e2e tests in CI?

* Clean CI build

* Revert "Clean CI build"

This reverts commit 73f2fb7972.

* Fix redundant dependency

* Work around a vue-query bug

* Lint

* fmt
2024-07-09 11:01:10 -04:00
Sergei Garin
e4da96e943
Fix opening projects (#10433)
#### Tl;dr
- Closes: enso-org/cloud-v2#1338
This PR fixes bugs with opened projects. Now all projects close/open properly and list of opened projects stored in the single place

---

#### Context:
Few sentences on the high level context for the change. Link to relevant design docs or discussion.

#### This Change:
What this change does in the larger context. Specific details to highlight for review:
1. Removes a bunch of useEffects across the Dashboard page
2. Project status now a react-query state, can be reused across the app
3. Eliminated the need of `waitIntilProjectIsOpened`

---
2024-07-09 14:47:46 +00:00
somebody1234
9229010cb6
Dashboard fixes (#10423)
- Fix some of https://github.com/enso-org/cloud-v2/issues/1350
- Move close icon back to right hand side of tabs
- Change icon for Local category to a computer
- Fix rendering of buttons in the delete pop up
- Remove "Versions" and "Sessions" buttons in Local mode from properties sidebar
- Also remove "Shared with" and "Labels" in Local mode
- Show real path of all assets in properties sidebar when in Local mode
- Opening Settings properly closes the user menu again
- "Export" tooltip changed to "Download"
- "Open help chat" button removed for now

Notes:
- re: Download within a folder doesn't work - this is due to the frontend using a PM endpoint that doesn't support specifying the parent directory
2024-07-09 12:54:09 +00:00
Radosław Waśko
a3dc50fe1e
Replace presigned S3 URL with lambda request (#10456)
- Closes #10419
2024-07-09 09:36:10 +00:00
James Dunkerley
4b3e4ae15e
Rename Map to Dictionary and Set to Hashset. (#10474)
- Rename `Map` to `Dictionary`.
- Rename `Set` to `Hashset`.
- Add a deprecated place holder for the static method of `Map`.
2024-07-09 09:12:23 +00:00
Dmitry Bushev
b2c4559678
Persist a subset of IdMap (#10347)
close #9257

Changelog:
- update: Store in the file only the subset of IdMap containing the IDs used in the metadata section on the 2nd line. The full IdMap is transmitted as a parameter of the `text/applyEdit` request.
2024-07-08 17:59:50 +00:00
somebody1234
30d97750bf
Replace Button variant="custom" with appropriate variant whenever possible (#10315)
Buttons were switched to `variant="custom"` as low hanging fruit in order to remove `UnstyledButton` (which was strictly inferior UX wise).

- Switch buttons to use `variant="submit"` or `variant="cancel"` as appropriate
- Replace both `ButtonBar` and `HorizontalMenuBar` with `ButtonGroup`

# Important Notes
None
2024-07-08 14:32:24 +00:00
James Dunkerley
4c0647ea29
Stop publishing First/Last as constructors and use auto-scoping for take and drop. (#10467)
- Removes `First` and `Last` from the `Standard.Base` exports.
- Enable auto-scoping for all `Index_Sub_Range` and `Text_Sub_Range`.
- Update all use of those methods to use auto-scoping.
2024-07-08 10:26:30 +00:00
Hubert Plociniczak
53eec66eda
Low-hanging perf improvements (#10462)
- avoid loading shapeless for the sole purpose of having a compile-time
type inequality
- don't use `sys.env` to avoid some Scala conversions
- lazy initialization of fields

# Important Notes
On a slow machine, so easier to spot.

![Screenshot from 2024-07-05 16-15-06](https://github.com/enso-org/enso/assets/292128/a07f42c5-9bee-492b-aad1-46fab7b6476f)
![Screenshot from 2024-07-05 18-14-53](https://github.com/enso-org/enso/assets/292128/694c4fb1-dfda-4629-8bd3-21c765612ec3)
2024-07-08 09:05:11 +00:00
James Dunkerley
018d4c312f
Stop publishing Postgres constructor, update Postgres_Details.Postgres to Postgres.Server. (#10466)
![image](https://github.com/enso-org/enso/assets/4699705/6d0d4167-e97b-4765-8079-650ad091ce60)

- Rename `Postgres_Details` to `Postgres`.
- Rename `Postgres` constructor to `Server`.
- Update SPI.
- Linting issues (indent, missing doc comment)
2024-07-08 07:58:08 +00:00
dependabot[bot]
2952603931
Bump h2 from 0.3.15 to 0.3.26 (#9640) 2024-07-06 11:50:17 +00:00
Jaroslav Tulach
515d8238bb
Support for --jvm option in Enso runner (#10374)
Addresses one of two concerns of #5298 - adds support for `--jvm` argument to allow us to switch from _native image_ built Enso binary (as developed by #10126) to regular JVM based Enso execution. This change _doesn't affect production builds_. The _native executable_ continues to be only built by `engine-runner/buildNativeImage` which is tested on CI, but not in the production jobs.
2024-07-06 07:02:20 +00:00
James Dunkerley
d65371096b
Deserialise large integer and decimals from JSON automatically. (#10463)
- Sort large integer and decimal JSON deserialization.
- Change type to be Integer instead of BigInt for large integers.
- Add tests.
- Update Table viz.
- Preserve white space in JSON viz.
![image](https://github.com/enso-org/enso/assets/4699705/48c83616-c0ed-4cb4-862a-34cd4fff09aa)

![image](https://github.com/enso-org/enso/assets/4699705/5bae9ccd-1d0f-4b70-aea5-d4cebc3d9df8)
2024-07-05 21:56:08 +00:00
James Dunkerley
c2c4b95116
Final step removing the Problem_Behavior publishing. (#10461)
- Remove publishing the constructors.
- Fix any missed use in libs.
- Alter tests to generally use auto-scoped calls.
- `on_incomparable` to `on_problems`.
2024-07-05 18:41:36 +00:00
James Dunkerley
2124cd022a
Batch Two of Problem_Behavior (#10454)
Part 2 of removing the public constructors.
Completes review of the libraries.

Tests left to do then can remove the export.
2024-07-05 13:40:29 +00:00
dependabot[bot]
5cd028eead
Bump unsafe-libyaml from 0.2.5 to 0.2.11 (#10392) 2024-07-05 13:34:27 +00:00
dependabot[bot]
305f69cd49
Bump openssl from 0.10.45 to 0.10.64 (#10455) 2024-07-05 13:04:10 +00:00
AdRiley
fc93b4d121
Refactor database dialect types (#10437)
* Auto-commit work in progress before clean build on 2024-07-03 14:17:22

* Refactor

* Revert

* revert

* Code Review feedback

* Green

* 2 Red

* Green

* Renames

* Code review changes

* Code review changes
2024-07-05 13:08:25 +01:00
Hubert Plociniczak
9449bf3ef5
Amortize the startup cost of some components (#10451)
Building Engine, Context, ApplicationConfig and Ydoc was a adding a rather large delay during the initial startup step as all of those were blocking operations.
Moving all of those to the resource initialization step hopes to amortize some of that cost since it can be done in parallel. Had to add a `ComponentSupervisor` (open for a different name suggestion) to ensure that such delayed components are properly closed on shutdown.

# Important Notes
Adding Ydoc has added a visible delay during startup. I'm hoping that we can amortize some of that with this PR:
![Screenshot from 2024-07-05 11-12-19](https://github.com/enso-org/enso/assets/292128/fd52f749-b2cb-414d-bd2a-847ea867026c)

Now:
![Screenshot from 2024-07-05 11-25-58](https://github.com/enso-org/enso/assets/292128/9e7c96c9-ee47-46c3-9bdb-8f96bbc4a68f)
2024-07-05 11:50:56 +00:00
Paweł Grabarz
d9972d547a
Migrate to pnpm (#10422)
Fixes #10197

# Important Notes
From now on, package installation will be using `pnpm install`. Installing it globally is fine for convenience, but it can also be used as `corepack pnpm install` without having to install anything other than node. For now, all other scripts are still invoked using `npm`, so we can still invoke them with usual `--workspace` setting. As far as I can tell that doesn't really have any other side effects and is identical as running the script through `pnpm run` in respective workspace project subdirectory.
2024-07-05 11:13:04 +00:00
James Dunkerley
82678aa7cc
Starting to clean up exporting Problem_Behavior constructor refactor. (#10449)
Use type check everywhere in Standard.Base for Problem_Behavior.
2024-07-05 10:05:51 +00:00
Hubert Plociniczak
c54c3b7e9d
Eliminate circe-yaml dependency (#10326)
* Eliminating circe-yaml

This change adds our very-own YAML parser on top of SnakeYAML. Compared
to Circe parser on top of SnakeYAML. The advantage? In some not-so-distant
future we might actually get rid of circe and the related performance
issues.

The logic is similar to what circe does i.e. analyzing SnakeYAML to
build our own structure.
This change is not complete, as there are still some tests failing, but
most common Configs are already parseable.
We _could_ auto-generate some of the code but still some of the logic
would have to be tweaked by hand; the current logic has a number of
special cases, as I found out the hard way.

* wip: more tests passing

* Fix remaining tests in ConfigSpec

* Fixing YAML decoder for editions

Dropping circe as a decoder for Editions revealed some problems. Turns
out the current implementation had even more special cases to deal with.

* nit

* Allow for empty exports

* Mostly complete encodin part

Replaced almost all `toYAML` locations with SnakeYAML equivalent.
The encoding has to use Java collections for which there exists a
built-in support. If we were to use Scala collections we would have to
deal with tagging, at the very least.

* Remove the last remaining Circe's YAML parser

* Bug fix + further loop optimization

* removal of some dependencies

* Remove circe-yaml

Added a custom SnakeYAML Node updater to mimick the JSON -> YAML -> JSON
conversion needed for updating fields. The algorithm recursively follows
the key-path and inserts the desired Node. This is not a performance
oriented code on purpose.

* Fix compilation issues

`circe-core` was marked as `provided` but no one eventually included it
in the final jar, hence `NoClassFoundException`.

* fix licensing

* Removing obsolete circe definitions

* fmt

* nits

* s/SnakeYamlDecoder/YamlDecoder

* fmt

* Partial revert, PM needs JSON decoders/encoders

* style

* incremental compilation gone wrong
2024-07-05 09:32:45 +02:00
James Dunkerley
0661f17d1c
Tune Text.trim, fix for Text.split (#10445)
- Rename `Location.Start` to `Location.Left`.
- Rename `Location.End` to `Location.Right`.
- Use auto-scoping for `Location`.
- Tune widgets for `Text.trim`.
- Correct signature of `Text.split`.
- Adjist `generateLocallyUniqueIdent` to not fail on bad signature.
2024-07-04 22:24:56 +00:00
Kaz Wesley
d46e4ac609
Doc editor and code editor are toggleable docks (#10413)
Dock improvements:
- Right and bottom docks are toggled with buttons.
- Bottom dock:
- Fills available width.
- Height resize handle behaves like right dock's.
- Documentation editor: Top toolbar is outside scrollable area.
- Extended menu: Entries have icons.
- Add component button: Now in bottom-right.

https://github.com/enso-org/enso/assets/1047859/19d64fed-74ab-48c2-af0e-48f140fa8474

Closes #10385, #10386.

# Important Notes
- `unrefElement`: Fixed a type-safety bug in; documented a reactivity limitation.
- `keyboardBusy`: Fixed a bug where shortcuts were ignored after clicking any button.
- Fixed right-dock slide-in animation.
2024-07-04 20:55:59 +00:00
Kaz Wesley
48eb173357
External documentation (#10396)
- Button shown in CB and circular menu opens documentation in new window.
- F1 key opens documentation for selected node.

https://github.com/enso-org/enso/assets/1047859/24d7e8cc-3f5c-4644-9d11-7deb5d1a8767

Closes #10276.
2024-07-04 16:01:00 +00:00
James Dunkerley
891f176e9c
Auto create the root folder if not present. (#10444)
Adds `filesystem-exists` to Project Manager CLI.
If the root folder isn't present will add it at start up.
2024-07-04 14:58:47 +00:00
marthasharkey
ee44aec7e1
Decimal in table viz (#10439) 2024-07-04 14:08:59 +00:00
Adam Obuchowicz
91ad82ef51
Add node button is above port (#10443)
Fixes #10270

![image](https://github.com/enso-org/enso/assets/3919101/d8beb8d8-f828-482c-bd8b-0a8d86ae29d3)
2024-07-04 14:01:07 +00:00
somebody1234
d5a04a767e
Fix errors in GUI WebSockets (#10421)
- Fix https://github.com/enso-org/cloud-v2/issues/1337
- Fix #10381 (same issue)
- This was caused by queued execution context tasks delaying the disposal of the WebSocket connections - I guess because the WebSocket is closed, either the queue never reaches that point, or retries take too long to reach that point?
- There was also another issue caused by the Dashboard incorrectly caching the `project`, causing the endpoint URLs to become outdated.

Misc changes:
- Change `Editor.tsx` to not return two different component trees. This avoids React unmounting and re-mounting the GUI app.

# Important Notes
None
2024-07-04 12:48:57 +00:00
James Dunkerley
9a2aed92f1
Separating list from read function and other small tweaks. (#10434)
- Rename `Faker.string_value` to `Faker.text_value`.
- Remove `Regex.pattern_string` as duplicate of `Regex.pattern`.
- Sort the Date picker.
- Rename `Data.list_directory` to `Data.list`.
- Remove support for reading a directory.

![image](https://github.com/enso-org/enso/assets/4699705/b42bb3c9-e63b-49f2-8cdc-4666cb6d968e)

![image](https://github.com/enso-org/enso/assets/4699705/97f49891-5ae5-4f0a-9a41-6200888fcd86)
2024-07-03 22:00:53 +00:00
Sergei Garin
3de873f97c
Fix searchbar visuals (#10436)
https://github.com/enso-org/enso/assets/61194245/27ea6c4a-e8cb-4e03-8932-f5d75918af0c
2024-07-03 18:20:17 +00:00
marthasharkey
ee39fd7f53
Visualise excelwork book sheets, db tables/schemas and add node adding gets to query them (#10362)
changes to current table (and db table) on index click:
- node added on double click
- tooltip added
- cursor changes to pointer
- styled as a link

![7473-table-w-links](https://github.com/enso-org/enso/assets/170310417/5e60c177-3f83-4db7-be86-fa8a9d493204)


Row table types:
Added on click to show value
![7473-row-links](https://github.com/enso-org/enso/assets/170310417/82f878ea-420d-4308-99bf-c77a6340a8c3)



Excel Workbook connections
- show sheet names in column
- sheet names are clickable that add a 'read' node for the corresponding sheet
- Shown in table with header title: Sheets

![7473-excel-links-sheets](https://github.com/enso-org/enso/assets/170310417/748f524e-5cca-4c20-b458-132af9a57ec1)


SQLite Connection:
- shows available schemas in column
- schemas are clickable that add a 'query' node for the corresponding schema/table
![7473-sql-lite-links](https://github.com/enso-org/enso/assets/170310417/21a8006f-c462-4128-874d-05380d3bab00)


Postgres Connection:
- shows available tables in a column
- tables are clickable and add a 'query' node for the corresponding table
![7473-postgres-links](https://github.com/enso-org/enso/assets/170310417/66b134ff-80fd-4995-b445-505919e25cfa)

JS_Object
- style keys as links
![7473-json-links](https://github.com/enso-org/enso/assets/170310417/9ec17c85-c1f4-42ab-b40a-06d6bc29d54f)
2024-07-03 13:58:07 +00:00
James Dunkerley
4bb82fae4a
Fix issues with Date.new Widgets and Some Viz Fixes. (#10430)
- Do not include nothing values for optional parameters when serializing widgets.
- Serialize Nothing as `{"type": "Nothing"}` for the default JSON viz.
- Add JS Object support for decimal.
- Fix `to_json` for large integers

![image](https://github.com/enso-org/enso/assets/4699705/88a404a3-537d-4be7-9a47-c896d2f8b378)

![image](https://github.com/enso-org/enso/assets/4699705/ce09955e-b377-431a-aca3-28f442c772a6)

![image](https://github.com/enso-org/enso/assets/4699705/d0c99a0b-1964-4874-8d87-41979a17a359)

![image](https://github.com/enso-org/enso/assets/4699705/32ade951-0921-4837-9c35-9b60488f863f)

![image](https://github.com/enso-org/enso/assets/4699705/f0fba27a-dfcc-4f17-a883-deb23757f74e)
2024-07-03 06:41:40 +00:00