Commit Graph

4822 Commits

Author SHA1 Message Date
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
Jaroslav Tulach
5e3a5b7751
Disable UpdatingEditionProvider when running Enso CLI (#10408) 2024-07-03 07:33:01 +02:00
GregoryTravis
48fb999eb3
Implement Decimal support for Postgres backend (#10216)
* treat scale nothing as unspecifed

* cast to decimal

* float int biginteger

* conversion failure ints

* loss of decimal precision

* precision loss for mixed column to float

* mixed columns

* loss of precision on inexact float conversion

* cleanup, reuse

* changelog

* review

* no fits bd

* no warning on 0.1 conversion

* fmt

* big_decimal_fetcher

* default fetcher and statement setting

* round-trip d

* fix warning

* expr +10

* double builder retype to bigdecimal

* Use BD fetcher for underspecified postgres numeric column, not inferred builder, and do not use biginteger builder for integral bigdecimal values

* fix tests

* fix test

* cast_op_type

* no-ops for other dialects

* Types

* sum + avg

* avg + sum test

* fix test

* update agg type inference test

* wip

* is_int8, stddev

* more doc, overflow check

* fmt

* finish round-trip test

* wip
2024-07-02 15:01:55 -04:00
James Dunkerley
08ec3acdd4
Fade the background and darken text. (#10424)
Another go at getting colours right...

![image](https://github.com/enso-org/enso/assets/4699705/68bced90-fca5-41c9-a1c9-6ea0c29f274a)

Mute the background colour and darken text.

![image](https://github.com/enso-org/enso/assets/4699705/e0c4d5f1-82c9-4838-b7ff-a3887a59885b)
2024-07-02 17:21:20 +00:00
Kaz Wesley
2168cfdf6b
Top-level add-node button creates disconnected component. (#10416)
Closes #10389.
2024-07-02 12:59:06 +00:00
Dmitry Bushev
764259f36d
Add project/duplicate endpoint (#10407)
close #10367

Changelog:
- add: `project/duplicate` project manager command to duplicate existing projects
2024-07-02 11:39:43 +00:00
James Dunkerley
69b5f719e8
Adjust Colours. (#10417)
- Change the lightness of the component colours to match Figma.
- Remove the background image from tailwind.css.
- Alter the code editor background to be white.
- Make the selection colour much brighter in the dashboard.

![image](https://github.com/enso-org/enso/assets/4699705/4ae8f03a-bdeb-48cf-86eb-aa058a2a1b01)

![image](https://github.com/enso-org/enso/assets/4699705/eb5d4cf8-d275-4c0d-b876-4a29ce7768bf)

![image](https://github.com/enso-org/enso/assets/4699705/0df64403-75e5-4e44-a818-58cedbbcd3c9)

# Important Notes
Removed the `is-hidden-file` package from the project manager shim. It seems to be unreliable in Win11 and as just for local testing made just do dot file logic.
2024-07-01 20:01:18 +00:00
AdRiley
8a0503eea2
Clear changelog (#10403)
Reset changelog for 2024.2 release
2024-06-28 16:22:56 +00:00
AdRiley
a07ccc68d4
Add zoom icon (#10405)
![image](https://github.com/enso-org/enso/assets/1720119/cdc790f0-62c9-4fee-819a-f5e51bb54ff7)
2024-06-28 16:16:28 +00:00
Kaz Wesley
da21136861
Copied table-viz range pastes as Table component (#10352)
When copying from AG Grid, include additional information in the clipboard to enable the data to be pasted into the graph as a new Table component.

Closes #10275.

# Important Notes
- Data copied from the table visualization now include headers.
2024-06-28 13:51:03 +00:00
Kaz Wesley
2cb439a182
Right dock is opaque (#10394) 2024-06-28 09:05:21 -04:00
Kaz Wesley
f45da53ba9
Open multi-select when items are edited (#10308)
* Vector widget propagates child edits to parent

* Update tests
2024-06-28 08:59:31 -04:00
Kaz Wesley
b5f81eff5d
Resize handle corners are rounded (#10395)
* Right dock is opaque

* Resize handle corners are rounded
2024-06-28 08:56:45 -04:00
somebody1234
5b5279b896
Fix background color (#10397)
- Fix #10393
- Use correct background color
- Make background of Asset Panel white to match Figma design

# Important Notes
None
2024-06-28 12:54:57 +00:00
AdRiley
132039a838
Rename env variables (#10336) 2024-06-28 11:38:22 +01:00
AdRiley
3f6a3347b8
Add new icons (#10398) 2024-06-28 11:37:53 +01:00
Jaroslav Tulach
489de72828
getPublicTruffleFile may yield an exception (#10380) 2024-06-28 09:58:50 +02:00
Sergei Garin
201eec3b84
Fix infinite callstack while opening a popover (#10391) 2024-06-27 20:48:03 +00:00
somebody1234
19d5bdb9da
Fix importing .enso-project files (#10379)
- Fix #10282

# Important Notes
None
2024-06-27 17:48:51 +00:00
Dmitry Bushev
dc7aa94348
Hide dotfiles on Windows (#10376)
related #10071

Request from @jdunkerley to hide all dotfiles on Windows.
2024-06-27 17:27:08 +00:00
Paweł Grabarz
2f7adb9deb
Fix missing dropdowns in constructor subexpressions (#10382)
Fixes #10341

<img width="487" alt="image" src="https://github.com/enso-org/enso/assets/919491/af946c1c-a27f-4ed8-8346-b5098e7d5f08">

Also added a new version of vue devtools that is embedded into the dev app itself, and has much better performance than the browser plugin.
2024-06-27 15:11:28 +00:00
Radosław Waśko
db4f7ab3b5
Fixing Database tests and Snowflake Dialect - part 2 out of ... (#10319)
- Part of #9486
- Fixing our tests to not rely on deterministic ordering of created Tables in Database backends
- Before, SQLite and Postgres used to mostly return rows in the order they were inserted in, but Snowflake does not.
- Fixing various parts of Snowflake dialect.
2024-06-27 14:54:00 +00:00
Paweł Grabarz
410298e173
Implement markdown link syntax and "follow link" popup. (#10353)
Fixes #9907

Implements link support in the comment markdown editor. Supports both markdown-style links and auto-detection for raw URLs.

https://github.com/enso-org/enso/assets/919491/b38f860a-ee4a-41a8-b936-41e9ef1602b9


https://github.com/enso-org/enso/assets/919491/059beca2-7737-41a1-a136-31a42ef9ee48
2024-06-27 14:18:33 +00:00
Sergei Garin
d95ebd4836
Fix horizontal scrolling in settings (#10384) 2024-06-27 12:33:54 +00:00
Sergei Garin
88eeacf78b
Fix project manager overfetching issue (#10373)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-06-27 12:04:31 +03:00
somebody1234
5dd10e1780
Search bar for settings (#9887)
- Close https://github.com/enso-org/cloud-v2/issues/1198
- Add search bar for settings
- Note that, *unlike* the asset search bar, it has neither suggestions nor tags (name:, description:) - I don't think those add any value here (and definitely would complicate the implementation by a lot)
- Convert settings objects to JS so that they can be filtered by search

UX changes required for this PR:
- Switched `MembersSettingsSection` to use `react-query` to avoid loading the members list every time a user types into the search bar

Incidental changes added to make this PR simpler:
- Refactor search bar to be provided by a React Context so that state no longer needs to be hoisted all the way up into `Dashboard` and back down to `TopBar`

# Important Notes
- While I think highlighting the tab of the currently visible section would be a nice UX upgrade, I think it might be a bit complex for at least this initial PR.
- It's definitely possible, but almost certainly requires Intersection Observers, plus a new constant to map each Settings Section ID back to its parent Settings Tab ID
2024-06-27 07:24:07 +00:00
Sergei Garin
2fde378b15
Fix close button being shown off the tab (#10375) 2024-06-27 06:10:19 +00:00
Dmitry Bushev
2dbd8a2e71
Fix linter error (#10377)
Fixes linter error on develop.
2024-06-26 20:58:16 +00:00
James Dunkerley
d92078471b
Rename order_by to sort for Table and DB_Table. (#10372)
- Rename `order_by` to `sort` for `Table` and `DB_Table`.
- Added deprecated placeholder.
- Fixed a couple of minor deprecated mistakes.

![image](https://github.com/enso-org/enso/assets/4699705/96c32fa7-33e5-400a-9d3a-ebf330886911)
2024-06-26 17:46:09 +00:00
somebody1234
0039c4d6a3
Dashboard improvements (#10368)
- Fix most of https://github.com/enso-org/cloud-v2/issues/1322
- Implement https://github.com/enso-org/cloud-v2/issues/1323

# Important Notes
N/A
2024-06-26 14:36:14 +00:00
somebody1234
64d51c2020
Show Language Server Logs (#9745)
- Frontend side of https://github.com/enso-org/cloud-v2/issues/1046
- Add endpoint to list project sessions
- Add button to project sessions to view logs associated with a specific project session

# Important Notes
None
2024-06-26 14:14:09 +00:00
somebody1234
2638ba8d8e
Fix creating local projects (#10371)
- Fix https://github.com/enso-org/cloud-v2/issues/1331

# Important Notes
None
2024-06-25 17:33:25 +00:00
Sergei Garin
f6c79e86db
Don't cache errored requests for /user/me endpoint (#10360)
Closes  #10359

Also this PR changes the behavior of offline cache - we don't use it if user is online
2024-06-25 16:56:14 +00:00
somebody1234
b425c9d1a8
Fix opening cloud projects (#10351)
- Fix https://github.com/enso-org/cloud-v2/issues/1324

# Important Notes
None
2024-06-25 14:13:10 +00:00
somebody1234
5f2c9b32f0
Fix positioning of extended menu (#10358)
N/A

# Important Notes
N/A
2024-06-25 13:50:39 +00:00
AdRiley
6bc7d4f786
Fix signatures for distinct and duplicates (#10365)
Fixes #10364
2024-06-25 12:59:27 +00:00
Pavel Marek
9010cf93be
Extension methods can be exported by name (#10274)
Ultimately, we want to forbid the `from ... export all` syntax. This PR starts by providing a way to explicitly export extension and conversion methods by name.

Stdlib code will be modified in upcoming PR.

# Important Notes
A single name can refer to multiple extension or conversion methods. Exports are not qualified. For example,
```
type My_Type
type Other_Type
My_Type.ext_method x = x
Other_Type.ext_method x = x
```
```
from project.Mod export ext_method
```
will export both `My_Type.ext_method` and `Other_Type.ext_method`.
2024-06-25 12:08:22 +00:00
dependabot[bot]
0c2630122d
Bump Jinja2 (#9867)
Co-authored-by: Pavel Marek <pavel.marek@enso.org>
2024-06-25 13:42:24 +02:00