Commit Graph

3202 Commits

Author SHA1 Message Date
Radosław Waśko
ca68dd94da
Adding new Date/Time operations (-, date_add, date_diff, date_part) (#7221)
- Adds `Column.date_diff` for computing date/time difference as integer multiply of some unit.
- Adds `Column.date_add` for shifting date/time by a unit.
- Adds `Column.date_part` for extracting various parts of the date/time value as integer.
- Adds widgets for the 3 methods above whose content depends on the column value type.
- Adds shorthands: `Column.hour`, `Column.minute` and `Column.second` to extract these date parts.
- Extends `Time_Period` with support for milli-, micro- and nano- seconds; and adapts functions taking `Time_Period` to support these wherever possible.
2023-07-13 12:56:54 +00:00
Paweł Grabarz
4be2c7b65b
Fix node name visibility by removing remaining view-mode logic fron node output port (#7269)
Fixes #7259

Node label (and output port in general) used to depend on view-mode logic, which is currently not fully functional. Since we have removed profiling mode from the application, It's best to remove some remaining parts of it to avoid them from interfering.

Labels now work as they used to, being shown on hover or when ctrl is held down.

![image](https://github.com/enso-org/enso/assets/919491/5e6996a4-6d84-4d36-a624-03a53f7e6e8a)
2023-07-13 14:07:07 +02:00
Adam Obuchowicz
fe80ccecac
Single column in component browser (#7233)
This PR contains minimal changes to have a visual part of #7198. It updates the view of _component list only_ to the newest design. The CB panel was shrunk in process, and breadcrumbs are a bit obscured, but they will be moved around in the next few PRs.

![image](https://github.com/enso-org/enso/assets/3919101/a562e365-d512-4320-ae19-10701edaa9ac)


### Important Notes

* This does not touch proper entry ordering yet.
* The component browser background is not (yet) updated; as some colors have alphas in the design, this may affect them.
2023-07-13 12:58:58 +02:00
Jaroslav Tulach
724a788500
Convert vector elements when needed (#7271)
Adds a test case demonstrating the _use of automatic conversions_ when processing vector elements.
2023-07-12 13:05:33 +00:00
Paweł Buchowski
1d77f7cd8e
Add remoteLog function for gathering gui logs (#6582)
Co-authored-by: Michał W. Urbańczyk <mwu-tow@gazeta.pl>
Co-authored-by: Nikita Pekin <nikita@frecency.com>
2023-07-12 12:22:07 +02:00
somebody1234
af03938305
"Share with" button (#7100)
* Add backend endpoints for "share with" button

* wip

* Fix bugs

* Invite user to organization if email is not found

* Minor fix for error message

* Address review

* Address issues

* Fix React error about identical keys

* Fix "share with" modal z-index; filter out users with permissions on asset

* Fix errors; address comment

* Fix

* Change submit button text to "Already has access" when appropriate

* Address review

* Show email on hover

* Finish renaming "share with" modal

* Select multiple for "share with" modal

* Minor style changes

* Deselect other permissions when "own" permission is selected

* Fix deselecting permissions

* Remove unused svg

---------

Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
2023-07-12 10:12:39 +02:00
somebody1234
b586e32f10
Show spinner on templates when creating project (#7225)
* Show spinner on templates when creating project

* Immediately show project as loading

* Fix infinite spinner bug

* Fix bugs

---------

Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
2023-07-11 11:46:26 +02:00
somebody1234
57b9f59f3f
Fix improperly scoped styles in visualizations (#7211)
* Add `.vis-histogram` to histogram styles

* Add `.vis-scatterplot` to scatter plot styles

---------

Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
2023-07-11 09:13:13 +02:00
Jaroslav Tulach
2aeef4d844
Automatically apply from conversion when runtime argument check fails (#7009) 2023-07-11 07:23:25 +01:00
James Dunkerley
0adab6c68c
Round on a column was always adding a warning (#7246)
- Only warn if outside allowed range.
- Added `is_infinite` to In-Memory column.
- Allow integer value type for `is_nan` and `is_infinite`.
2023-07-10 17:35:23 +00:00
Dmitry Bushev
4864e5b51d
Add fileModifiedOnDisk notification (#7239)
part of #7178

Changelog:
- add: `text/fileModifiedOnDisk` notification
- update: during the auto-save, check if the file is modified on disk and send the notification. I.e. auto-save does not overwrite the file if it was changed on disk (but the save command does)
- update: IDE handles the file-modified-on-disk notification and reloads the module from disk

# Important Notes
Currently, the auto-save (and the check that the file is modified on disk) is triggered only after the file was edited. The proper check (using the file-watcher service) will be added in the next PR

https://github.com/enso-org/enso/assets/357683/ff91f3e6-2f7a-4c01-a745-98cb140e1964
2023-07-10 16:50:14 +00:00
GregoryTravis
345d6b9cb1
Add cross_join support to Database Table (#7234) 2023-07-10 16:29:37 +00:00
Adam Obuchowicz
72ec775d8c
Skip local engine version check (#7230) 2023-07-10 15:10:48 +02:00
somebody1234
b8b2f39270
Fix right click (#7237)
Fixes #7236

# Important Notes
This was caused by `userMenu` having an effect that depends on `setModal` and `unsetModal`, which were not memoized - so they would be a different value every time.
2023-07-10 09:59:57 +00:00
Michał Wawrzyniec Urbańczyk
8c2ff5ddb7
Fix Undo/Redo for visualization toggling (#7209) 2023-07-10 11:17:53 +02:00
James Dunkerley
1fb60df61b
Fixes from the live demo. (#7243)
- Removed defaults from `cross_tab`. It caused an out-of-heap space error when it attempted to build a 205k x 205k table. Now has a hard limit of 10,000 columns - we can increase this once we have more concrete test data.
![image](https://github.com/enso-org/enso/assets/4699705/bc38d41c-56dc-41bd-8a7c-fa89ecfa7f79)

- Adjusted the dropdowns on `Aggregate_Column` for `columns` and `order_by` to be dropdowns as nested Vector editors are not supported.
![image](https://github.com/enso-org/enso/assets/4699705/f4a7c7cc-6a21-462c-a39e-65fbab82c367)

- Altered `Aggregate_Column` so `new_name` now `new_name:Text=""` and not taking `Nothing` anymore. Makes it appear correctly in IDE.
![image](https://github.com/enso-org/enso/assets/4699705/196a49ba-4274-44bb-b876-0372c8f62746)

- Added dropdowns for `fill_empty`, `fill_nothing` and `replace` on `Table`.
![image](https://github.com/enso-org/enso/assets/4699705/9ee5cec2-82d5-4452-b650-67015ac9fee5)

- Added `replace` to Database table throwing `Unsupport_Database_Operation`.
2023-07-09 18:03:05 +00:00
Ilya Bogdanov
8020916f58
Resizing visualizations (#7164)
Closes #7047

Adds an ability to resize visualizations by dragging a special (invisible) shape along the bottom and right borders of visualizations.

- Visualizations are aligned to the left border of the node now.
- Default visualization width now equals to the node's width (default height is the same)
- Changing the width of the node also changes visualization width, but only if no manual drag-resizing was applied
- Visualization size is preserved when reopening visualization (but it is not saved in project metadata)
- No visual indication that resizing is possible exist, it will be implemented in #7049



https://github.com/enso-org/enso/assets/6566674/2f2525e8-cf10-4c92-953a-b69eb97a954a
2023-07-09 15:18:45 +00:00
Hubert Plociniczak
9dcf48a3e0
Cache dataflow errors (#7193)
The logic in instrumentation specifically prohibited caching of panics (added in https://github.com/enso-org/enso/pull/1611).
Except it seems that the restriction was too aggressive because dataflow errors could be cached.
This indirectly fixes the problem with dataflow error in the context of a (temporary) change in execution context, which should keep around the old value.

Closes #7140.

After the fix:
[fix_7140.webm](https://github.com/enso-org/enso/assets/292128/b8d522db-985a-4e57-bbf1-a075d14d39a2)
2023-07-09 14:45:22 +00:00
Michael Mauderer
66201dc94c
New Prototype AI Searcher (#7146)
Adds a new bare-bones AI searcher that can be triggered with `cmd+tab`. It will interpret the searcher input as a prompt to an AI model and replace the created node with the suggestion that was computed.

https://github.com/enso-org/enso/assets/1428930/f8403533-54ba-4ea5-9d3c-6bdf3cf336b5

Implements the first step of #7099.

# Important Notes
Contains some refactoring that allows us to have multiple controllers side by side. So QA testing should make sure that the Component Browser Searcher is still working as before.
2023-07-07 12:47:10 +00:00
Hubert Plociniczak
dd06c59380
Initialize Language Server's JSON RPC protocol asynchronously (#7232)
As discovered in #7224, Json RPC protocol was added to the asynchronous resource initialization stage, as part of #6306, but was not in fact initialized at that point.
Instead it was initialized when the server was started to be able to serve correctly the initialization messages. A classic Catch-22. It was really hard to discover this just by looking at the code, but the profiling clearly showed where the time was spent.

This change splits Language Server's protocol into two:
- the first one accepts `heartbeat/init` and `session/initProtocolConnection`
- the second one enriches it with the full set of supported messages

This shifts the initialization from blocking for 0.5 sec to only ~30ms, and performing the second stage asynchronously.

Closes #7224.

# Important Notes
Before the change (blocking server startup):
![Screenshot from 2023-07-05 18-53-24](https://github.com/enso-org/enso/assets/292128/bcfa9043-d00a-4b36-a44c-782a388a16b9)
![Screenshot from 2023-07-05 18-53-10](https://github.com/enso-org/enso/assets/292128/54927787-4c95-46db-bd68-f3a3b82367d5)

After the change (1st stage):
![Screenshot from 2023-07-06 14-02-34](https://github.com/enso-org/enso/assets/292128/d7a7bc34-39dc-46f1-9e64-6d350697c30b)

After the change (2nd, asynchronous initialization, stage):
![Screenshot from 2023-07-06 14-21-17](https://github.com/enso-org/enso/assets/292128/def8c0a1-f211-4fc0-9df0-7c1634312166)
2023-07-07 11:49:23 +00:00
GregoryTravis
bd26e95fd6
Add Table.replace; Change Text.replace to take a Text|Pattern, and remove the use_regex param. (#7223) 2023-07-06 16:13:11 +00:00
James Dunkerley
7749286c69
Tidy up the imports using script (#7220)
Ordering the imports to test a script.
2023-07-06 14:22:50 +00:00
Dmitry Bushev
e7a0312298
Reload externally changed file on a keypress (#7217)
part of #7178

Changelog:
- add: `cmd+alt+y` keybinding that re-opens the file, applies new content, and re-executes the program

This is the first part of the task to support the external edits. The next step will be to reload the module contents by the notification from the language server.

# Important Notes
https://github.com/enso-org/enso/assets/357683/79917e22-b846-4bd9-b03a-33a48d5f75b9
2023-07-06 13:27:47 +00:00
Adam Obuchowicz
70f79b1df4
Fix mouse hover events. (#7177)
* Special noncapturable-nonbubbleable events

* A prototype of hover handling

* Revert "Special noncapturable-nonbubbleable events"

This reverts commit abdc0cf7eff9aba44656d959f6736250c69bf206.

* Make it consistent with docs

* Update app/gui/view/graph-editor/src/component/node/output/port.rs

Co-authored-by: Kaz Wesley <kaz@lambdaverse.org>

* Optimize a bit

* Extends docs

---------

Co-authored-by: Kaz Wesley <kaz@lambdaverse.org>
2023-07-06 15:00:25 +02:00
somebody1234
c276bc035c
Enable React and strict-boolean-expressions lints (#7023)
* QoL improvements

* Enable react lints and `strict-boolean-expressions`

* Address review

* Minor bugfixes

---------

Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
2023-07-06 13:52:32 +02:00
Paweł Grabarz
d11f09c192
add support for bidirectional rectangle border and inset (#7188)
Extend rectangle shape to allow for both inner and outer borders, at any distance from the main shape body.

No additional instance parameters has been added. Instead, the negative values of both border and inset values are used to allow extra capabilities. Additionally, the small (<1px) gap between border and body caused by anti-aliasing has been fixed.

https://github.com/enso-org/enso/assets/919491/0ae709f2-db7b-4a45-a9d3-7fbb8802dc8c


<img width="657" alt="image" src="https://github.com/enso-org/enso/assets/919491/40e5963d-0717-4662-abf4-b9687aa921ed">
2023-07-05 19:10:57 +00:00
GregoryTravis
6eb46afb40
Do not rename column on fill_nothing and add version to the Table allowing filling multiple (include fill_empty as well). (#7166)
Updated Column.fill_nothing and .fill_empty, and added the same to Table. (Both in-memory and db.)
2023-07-05 17:20:23 +00:00
Michael Mauderer
cd7f17a0e4
Remove connections for a node that is being deleted. (#7185)
Fixes https://github.com/enso-org/enso/issues/7135

https://github.com/enso-org/enso/assets/1428930/85433a69-03dc-4ad9-9563-717a78ff6ff8
2023-07-05 15:28:20 +00:00
Radosław Waśko
78545b4402
Add safepoints to standard libraries Java polyglot helpers (#7183)
Closes #7129
2023-07-05 14:12:13 +00:00
GregoryTravis
966f8b773a
Combine Regex and Pattern (#7172)
Merge Pattern into Regex.
2023-07-05 13:51:53 +00:00
Hubert Plociniczak
72a6c54dfc
Update context on timeout retry (#7207)
Minor follow up on #7173. Noticed while testing nightly on Windows machine.
2023-07-05 12:22:55 +00:00
Hubert Plociniczak
a140a04689
A dataflow error with warnings reports the former (#7205)
A dataflow error resulting from calling a value with warnings now
reports only the error rather than the warning.

Closes #7141.
2023-07-05 14:18:36 +02:00
Radosław Waśko
2d73277238
Fix a bug that somehow went under CI (#7204) 2023-07-05 08:54:27 +00:00
somebody1234
b243a5f529
Support signing up to an existing organization (#7145)
* wip

* wip. includes broken code

* Pass organization id when user is created

* Make backend endpoints properly error

The "set username" screen currently returns 500 server error
2023-07-04 11:13:53 +02:00
somebody1234
80f370c3a9
Fix dashboard React errors (#7128)
* Fix dashboard React errors

* Stop trying to load Project Manager on cloud dashboard
2023-07-04 10:34:13 +02:00
Hubert Plociniczak
414b124123
Add timeout retries for project-related operations (#7173)
It is relatively easy to reach timeouts on weak systems for startup
operations on project manager. Once a timeout is reached, startup will
not proceed any further.

This PR is a bit of an experiment. It adds adds timeout retries to give a bit of a leeway to
under-powered machines and to log some progress on the way, so that we
know that certain actions are still in progress.
2023-07-03 12:44:41 +00:00
James Dunkerley
4fbe7e3830
Remove Array.new and Array.copy and move Vector functions to builtins. (#7147)
- Removed Array methods: `new`, `copy` and `new_[1234]`.
- New builtins for `Vector.insert`, `Vector.remove` and `Vector.flatten`.
- Replaced `Vector_Builder` use of `Array.copy` to a `Vector.Builder` approach.
2023-07-03 12:41:41 +00:00
Radosław Waśko
4ccf3566ce
Implement add_row_number for Database backends, fix primary key inference for SQLite (#7174)
Closes #6921 and also closes #7037
2023-07-03 11:51:42 +00:00
Hubert Plociniczak
3c93c25a5a
Reload project's config on rename (#7179)
Package's config information, once loaded, never changed. While there is typically no need for it, this was problematic when the config became out-of-sync with the filesystem, like in the case of project rename action.
In rename, the config's properties would be updated in the FS, but that would never be reflected in module's package. Therefore further compilations would continue to ask for the old namespace.

Most of the changes are cosmetic (s/`.config`/`.getConfig()`) except for the new `reloadConfig` method on `Package` that is being called in `RenameProjectCmd` handler.

Closes #7062.

# Important Notes
The reported `ExecutionFailed` error should have been mostly fixed already via #7143. This change makes sure that all the related warnings are gone as well and the compiler uses the updated namespace.
2023-07-03 09:36:19 +00:00
Hubert Plociniczak
b78a7e74e8
Provide human-readable error log during installation (#7159)
Windows insists on reporting cryptic error codes that are then hard to debug.
When identified, we can provide more cases.

As identified for #7150.
2023-07-03 08:58:23 +00:00
Adam Obuchowicz
01d1560b2c
Preview keeps showing when cursor is over it, preventing flickering (#7158)
Fixes #6379

https://github.com/enso-org/enso/assets/3919101/be509314-a5f7-41c8-be0f-a7c46deca477

Before, the quick visualization preview (ctrl/cmd + output port hover) was flickering, because shown visualization made output port no longer hovered. To fix that, the preview is hidden only when both the output port _and_ the preview stop being hovered.

Also discovered that the visualization chooser is not visible or looks ugly when visualization with HTML elements is shown over the nodes, so I made it not being visible on previews.
2023-07-03 08:47:12 +00:00
Michał Wawrzyniec Urbańczyk
8e56280821
Delay URM reset until the async initialization is done. (#7121) 2023-07-02 12:40:35 +02:00
Michał Wawrzyniec Urbańczyk
9134b1ecf4
Don't start Enso automatically after installation completes. (#7175) 2023-07-02 12:33:27 +02:00
Dmitry Bushev
bb862141e5
Truncate long error messages (#7180)
close #6958

# Important Notes
On the screenshot, the `max_length` is set to 10 to illustrate the new behavior.

![2023-06-30-205255_758x483_scrot](https://github.com/enso-org/enso/assets/357683/0b593b12-4469-49fd-a2e5-216ce54eb264)
2023-06-30 19:06:19 +00:00
GregoryTravis
c866aa7fb5
parse_to_columns should generate at least one row for a non-match (#7171) 2023-06-30 18:10:33 +00:00
GregoryTravis
550d146493
Add round, ceil, floor, truncate to the In-Database Column type (#6988) 2023-06-30 16:47:40 +00:00
Radosław Waśko
6eac095579
Add support for Filter_Condition in any, all, find, partition and index_of (#7148)
Closes #6628
2023-06-30 16:06:01 +00:00
somebody1234
8504295e5e
Separated templates and directory list (#6995)
Closes https://github.com/enso-org/cloud-v2/issues/490:
- Make templates collapsible
- Add scroll-based shadow to templates
- Move scrollbars from body to templates and directory listing

# Important Notes
None
2023-06-30 13:59:34 +00:00
Dmitry Bushev
66894bd79e
Send info about function values (#7168)
close #6957

Extend `ExpressionUpdate` message and send a function schema if the returned value is a function.
2023-06-30 13:31:48 +00:00
Pavel Marek
ebee8700ce
HashMapNode supports atoms with custom comparators (#7165)
Add proper handling for atoms with custom comparators into the hashing machinery.
2023-06-30 08:57:36 +00:00