Commit Graph

640 Commits

Author SHA1 Message Date
Kaz Wesley
d2ae17ffc9
Disallow a confusing constructor syntax (#11856)
Previously, a constructor or type definition with a single argument defined inline could use spaces within the argument's definition without parentheses, as in the draft spec. This syntax was found confusing and is no longer allowed. No usages occurred in our `.enso` files. Fixes #10812.
2024-12-16 15:54:19 +00:00
Jaroslav Tulach
2964457d48
Intersection types & type checks (#11600)
Implementation of **type checks** for **intersection types**. The idea is to split the list of `types[]` in `EnsoMultiValue` into two parts:
- first `methodDispatchTypes` represent the types the value _"has been cast to"_
- the rest of the types represent the types the value _"can be cast to"_

By performing this separation we address the #10882 requirements. After a type check only methods available on the `methodDispatchTypes` can be invoked. However the value can still be cast to all the possible types.
2024-12-12 07:29:00 +00:00
Gregory Michael Travis
9e00b9ddcc
Clear cache on reload (#11673) 2024-12-10 18:51:26 +00:00
Paweł Grabarz
7e47a65b72
Color edges according to source node. (#11810)
Fixes #11536

<img width="238" alt="image" src="https://github.com/user-attachments/assets/e253b188-a6ce-468f-864c-9e814a8a2584">

Also fixed incorrect edge offset when dragging an target-connected edge.

<img width="140" alt="image" src="https://github.com/user-attachments/assets/d75ac860-c614-4f40-9cbc-b955e94f5a58">
(cursor painted in, because it wasn't captured by the screenshot 😅)

# Important Notes
Split away edge layout code away from the component to separate file. That code is likely to be significantly changed soon, but no significant modifications were made right now.
2024-12-09 15:29:35 +00:00
Kaz Wesley
a666ef0abe
Highlight missing required arguments (#11803)
Highlight names of absent required arguments.

<img width="947" alt="Captura de ecrã 2024-12-06, às 09 10 11" src="https://github.com/user-attachments/assets/aaf8afcc-3998-4685-9e99-81a123f920b7">

(UI demo; implementation only applies the effect to same arguments that cause a "Provide a value" error)

Fixes #11631.
2024-12-09 14:19:50 +00:00
Adam Obuchowicz
6aa4c9f35e
Visualization selector arrow is now more visible (#11800)
Fixes #11632

![image](https://github.com/user-attachments/assets/86b6fc6a-6ecc-41f1-9351-18c1b511776c)
2024-12-06 15:52:30 +00:00
Kaz Wesley
6d72a75f5e
Documentation link interactions (#11753)
* Ctrl+click to follow link; clicking link opens a popup. Fixes #11692.

- Ctrl+click to follow link (and add hover text)
- When editing, if the cursor is in a link a popup allows following the link.
- Text filters (e.g. recognizing links) now apply to text dragged into the
  editor, or pasted with the context menu, besides pasting with the keyboard
  (uses new feature from updated CM).
- Simplify CM editors by moving setup and reactivity patterns into shared
  helpers.
- Add integration tests for link interactions in component comments and documentation panel.
- Fix code editor tooltips (fixes #11740).
- All lines containing selected text show markup
2024-12-06 07:01:40 -08:00
Adam Obuchowicz
c284bcb854
Update persisted idmap when metadata changes (#11761)
Fixes #11729

The issue was quite rare indeed: it happened only when somehow nodes had idmap and metadata cleared from the file, and then only metadata change was applied.

In this case, because there was no idMap change, idMapToPerstist was also empty; metadata were stored with proper ids, but those ids weren't assigned to any span.
2024-12-06 11:49:30 +00:00
Paweł Grabarz
be1b706d0a
Function definition editor widget (#11655)
Fixes #11406

Also refactored the right panel state into its own store, so it is less coupled with the graph editor.

<img width="439" alt="image" src="https://github.com/user-attachments/assets/73e6bb92-235f-497d-9cff-126dc4110f8b">

The function definition widget tree displays the icon, name and all arguments. The name is editable, everything else right now is just read-only. The icons next to the arguments are just placeholders intended to be replaced with a "drag handle" icon.

Also fixed issues with missing rounded corners on the ag-grid widget.
<img width="263" alt="image" src="https://github.com/user-attachments/assets/cb61f62a-755c-4865-ba6c-ab9130167713">
2024-12-05 18:03:48 +00:00
Kaz Wesley
88fdfb452a
Context menu improvements (#11755)
Context menu improvements:

- Activate component context menu only for clicks on component widget area (fixes #11745).
- In a table-editor widget, if AG Grid opens a context menu, don't open the component menu.
- Enable the AG Grid context menu on OS X.
2024-12-05 15:23:45 +00:00
Kaz Wesley
cb499e2b69
Fix visualization toolbar dropdown layering (#11768)
Fixes #11647.
2024-12-04 18:18:26 +00:00
Ilya Bogdanov
4d2e44c878
Table.input for pasting tabular data (#11695)
Closes #11350

- Copy/pasting tabular data now creates `Table.input` nodes.
- Column names are always copied when you work inside Enso (excluding cases when you paste some cells into an existing table)
- When working with external apps, column names are copied only if `Copy with headers` is selected.

https://github.com/user-attachments/assets/a1233483-ee4a-47e4-84a1-64dd0b1505ef

Roundtrip with Google Spreadsheets (shows non-trivial TSV data that includes quotes and newlines):

https://github.com/user-attachments/assets/4ac662a2-809f-423a-9e47-628f46f92835
2024-12-03 15:22:15 +00:00
Jaroslav Tulach
d687365070
Enhance Managed_Resource to allow implementation of in-memory caches (#11577) 2024-12-03 15:13:22 +01:00
Ilya Bogdanov
ce1df4ebcd
Extend output port and remove selection halo (#11715)
Closes #11507

- Output port area extended twice
- Selection halo is removed (but most of the code is still there – I understood we don’t want to remove everything before testing)

https://github.com/user-attachments/assets/4c6d7837-362e-4309-aa9b-5c0679d600e9
2024-12-03 13:54:02 +00:00
Kaz Wesley
0b6b1f0954
Context menu, copy button, multi-component actions (#11690)
Context menu, copy button, multi-component actions

https://github.com/user-attachments/assets/14243102-3848-43fc-82bb-a48648536985

- The 'More' menu can now be opened under the mouse, through the context menu action (right click/control-click on Mac/menu button on keyboard).
- Add copy-components button to menu.
- The menu can now be opened while multiple components are selected; if the clicked component was among the selected components, the selection will be preserved. Some menu actions--currently *copy* and *delete*, apply to all selected components. These actions will change their displayed labels when multiple components are selected. If a single-component action is executed, the component it was applied to will become the sole selection.

Fixes #11633, #11634
2024-11-29 19:52:22 +00:00
Adam Obuchowicz
6d9699c841
Bump AGGrid version (#11684)
* Bump AGGrid version + some fixes

* Make styles in AgGridTableView global

* CHANGELOG

* Remove debug logs

* Fix integration test

* Fix unit test

---------

Co-authored-by: James Dunkerley <jdunkerley@users.noreply.github.com>
2024-11-28 14:40:29 +00:00
Adam Obuchowicz
fe299b2b3b
Tiny look improvements (#11666)
Part of https://github.com/enso-org/enso/issues/11510

1. Default values are italic
![image](https://github.com/user-attachments/assets/509a9d32-4263-4563-aad9-e7a9ee7bc039)

2. The Text widget actually displays default values as placeholders (before it was a normal text).
![image](https://github.com/user-attachments/assets/73c32317-ac15-4f1d-8824-7cc445ae47ce)

3. No more "grab" cursor over node's icon.
![image](https://github.com/user-attachments/assets/49939283-891e-4fc4-93bc-7d0c4ed7b295)
2024-11-28 13:48:19 +00:00
Kaz Wesley
7eca04a522
: operator is left-associative (#11671)
Adjust operator parsing to allow chained conversions, like `3.14 : Integer : Text`.

Change the precedence and associativity of the `:` operator, when used as a binary operator in an expression:
- It is now **left-associative**
- It now has **lower** precedence than `->` (previously they were equal)

# Important Notes
One previously-reasonable syntax has **changed interpretation**: `x->x:Type` is no longer a valid way to write a casting function, and would likely result in a type error. There was 1 instance of this syntax in our .enso sources.
2024-11-27 04:45:39 +00:00
Ilya Bogdanov
b5f93f065e
Implement partially transparent visualizations (#11582)
Closes #11534

- Visualizations are partially transparent by default
- The initial z-order is undetermined at the project load
- Node is moved on top of other if it is dragged (before it only happened if it was **selected**, which is not the same)
- Changed rendering for edges slightly, to avoid visible edge ends underneath visualization. The implementation of additional offsets is rather naive, but it works.

https://github.com/user-attachments/assets/fba44816-eed9-471d-83a7-8fe6e5892477
2024-11-25 13:28:37 +00:00
Kaz Wesley
a2e87d37a9
Look and feel: Lists and dropdowns (#11620)
https://github.com/user-attachments/assets/d8c039e6-670c-4ff5-9d71-c07ee6114570

Lists:
- Drag handles are icons.
- List controls are shown only when component is sole selection.
- Each item has delete button.
- Integration tests cover dragging, adding, removing.

https://github.com/user-attachments/assets/58054cb2-22bc-4279-850c-0bc4929fc246

Dropdowns:
- Arrows are shown when hovered or component is sole selection.
- Arrows change opacity when hovered.

Implements #11533.
2024-11-22 14:55:23 +00:00
Kaz Wesley
c431a6bd2e
Autolinks in documentation editor (#11597) 2024-11-21 20:24:57 +00:00
Ilya Bogdanov
80ae5823dd
Table.input instead of Table.new (#11612) 2024-11-21 12:19:04 +00:00
Kaz Wesley
70253e73ed
Render tables in documentation. (#11564)
* Render tables in documentation.

Also:
- Separate parser for our flavor of Markdown from the CodeMirror integration;
  move the parser into ydoc-shared and use for Markdown line-wrapping.
- Introduce our own version of yCollab extension; initially just the upstream
  version translated to Typescript and our code style.
- Refactor CodeEditor.

* CHANGELOG, prettier

* Apply @farmaazon review.

* Fix

* Lint

* Cleanup

* Integration tests for GraphNodeComment

Also a little refactoring in preparation for new implementation.

* Workaround stuck CI

* Revert "Workaround stuck CI"

This reverts commit 74313842ba.

* Fix merge

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-11-20 10:40:24 +00:00
Adam Obuchowicz
af39e0ec50
Pasting image in Documentation Editor (#11547)
Fixes #10059

https://github.com/user-attachments/assets/a528e26a-b388-4a2a-9bf4-3ccc734373f6

# Important Notes
* I put the logic for project's files management to a single composable "projectFiles"
2024-11-19 15:47:46 +00:00
James Dunkerley
0543cfaec5
New Table.input function (#11562)
* New Table.input function for GUI allowing auto parsing and type control

* CHANGELOG.

* Missing import.

* Char not Text.

* Fix imports.
2024-11-15 10:50:21 +00:00
Ilya Bogdanov
3d38b7174f
Add Write button to component menu (#11523)
Closes #10486

https://github.com/user-attachments/assets/df492946-0c54-481e-8499-992b3ae9e35d
2024-11-13 19:45:32 +00:00
Radosław Waśko
e76fe907d3
Initial implementation of Data.read_many (#11490)
- Part of #11311
- Adds ability to read a list of files (Vector, Column, Table) into a Vector.
- Reading into a Table of objects or merged will come in a next PR.
2024-11-08 19:03:47 +00:00
Kaz Wesley
867c77d5cc
New markdown editor (#11469)
Implements #11240.

https://github.com/user-attachments/assets/4d2f8021-3e0f-4d39-95df-bcd72bf7545b

# Important Notes
- Fix a Yjs document corruption bug caused by `DeepReadonly` being replaced by a stub; introduce a `DeepReadonly` implementation without Vue dependency.
- Fix right panel sizing when code editor is open.
- Fix right panel slide-in animation.
- `Ast.Function` renamed to `Ast.FunctionDef`.
2024-11-06 16:54:32 +00:00
James Dunkerley
c5734a8fc8
Improved Google Analytics integration (#11484)
- Enhanced Google Analytics API.
- Now published as a type with static methods not a module.
- Bump version and add Admin API.
- Moved the reading logic to Java from Enso.
- Add dependency on Standard Table allowing report to be built into a Java Table directly.
- New `Google_Credential.new` method.
![image](https://github.com/user-attachments/assets/54e3ad87-045f-4e40-b609-337d827c5d02)
- Ability to list accounts for a credential (`Google_Analytics.list_accounts`).
![image](https://github.com/user-attachments/assets/296c6dcc-3b24-43fa-b909-5e74c40d77a1)
- Ability to list properties (either for an account or for all) (`Google_Analytics.list_properties`).
![image](https://github.com/user-attachments/assets/e420c824-d08e-48d0-b21c-560b4c7c4809)
- Simple object structure of `Google_Analytics_Account`, `Google_Analytics_Property` and `Google_Analytics_Field` with some helper methods.
- Widget for `account`, `property` and `credentials`.
![image](https://github.com/user-attachments/assets/221c1450-964d-4fce-af8b-2273aa8739a1)
![image](https://github.com/user-attachments/assets/e1daf1dd-2ade-4c33-875c-4e3cb1544fe6)
![image](https://github.com/user-attachments/assets/cd37b018-4fad-4771-9f48-1448f0076ef9)
- Widget for `dimensions` and `metrics` with defaults and then reading from Admin API.
![image](https://github.com/user-attachments/assets/3a4b1d42-9555-499d-90da-04d7586ab4c1)
![image](https://github.com/user-attachments/assets/16efcb11-3547-4eaf-9f28-944fa21c4aa2)
- Added widget for `start_date` and `end_date` on `Google_Analytics.read`.
- Bug fix for `parse` with auto type by reordering to allow numeric dates to be parsed.
- **ToDo**: better exception handling.
2024-11-05 10:11:42 +00:00
Ilya Bogdanov
d3beac3a90
Consider additional self types (#11451)
Fixes #11427

Before:

https://github.com/user-attachments/assets/fc16cefd-f264-4410-bd30-1747c580da1a

After:

https://github.com/user-attachments/assets/e85b8fb3-35c4-4d18-a9a0-2aeb69201b6f
2024-11-04 15:08:59 +00:00
Adam Obuchowicz
2bbd909705
Implement the limit of 256 cells in the Table Editor (#11448)
Fixes #10864

[Screencast From 2024-10-30 13-45-48.webm](https://github.com/user-attachments/assets/9ed2384a-de85-4059-a0fe-c0a45b2fe07c)
2024-11-04 09:10:59 +00:00
Paweł Grabarz
950a93ddeb
Display error message when viewed graph doesn't exist. (#11452)
Fixes #11211

<img width="258" alt="image" src="https://github.com/user-attachments/assets/7adea4f6-774a-49ac-8c86-5e785df2acff">

When the "go back" button is clicked, the user is sent back to the `main` function graph. The breadcrumbs are also present on that view and can be used for navigation.

Current design of the error state is improvised, likely to be changed once we have some design guidance about it.
2024-10-31 07:48:48 +00:00
Ilya Bogdanov
0d731adeff
Add undo/redo buttons to the top bar (#11433)
Closes #11222

https://github.com/user-attachments/assets/66f8dfd1-a7c4-497a-8ff6-a22f56dbb1dd
2024-10-30 17:01:35 +00:00
Paweł Grabarz
0cf1c021ce
Add enter node button to the dropdown menu (#11447)
Fixes #11179

<img width="223" alt="image" src="https://github.com/user-attachments/assets/9b5ba054-717f-4124-98df-3d076bc73b32">
2024-10-30 16:55:12 +00:00
Paweł Grabarz
29f1f0d4e1
Add IDE version to window title. (#11446)
Fixes #10966

![image](https://github.com/user-attachments/assets/a46e38e9-1ff3-4eb4-9a88-901d684dc205)
2024-10-30 13:48:59 +00:00
Gregory Michael Travis
dc50a7e369
HTTP response caching, with TTL and LRU logic (#11342) 2024-10-30 12:50:35 +00:00
Adam Obuchowicz
39c44e7adb
Table Input Widget: Size persistence (#11435)
Fixes #10861

Every widget may set metadata on its AST. Because once widget picker will be implemented a single AST node may have many possible widgets, their settings are kept in a map keyed by their name/key.
2024-10-30 09:34:58 +00:00
James Dunkerley
78d9e34840
Excel before 1900 and AWS signed requests. (#11373) 2024-10-28 20:20:06 +00:00
Ilya Bogdanov
6111a35ccc
New component menu (#11398)
Closes #11244

- The new dropdown contains all buttons that were present on the wheel before. (except for disabled ‘Write always’)
- The color component stays the same for now
- The visualization toggle button does not change the color depending on the state.


https://github.com/user-attachments/assets/a4d711be-5526-41aa-8e24-6be52e187844

**UPDATE**:

The ‘Edit component’ button was replaced with the ‘Help’ button, which toggles the Help tab of the right-dock panel. The behavior is displayed on the video:

https://github.com/user-attachments/assets/6da8c34a-8bc3-4be4-b0b6-982bf709e986

The ‘Help’ item in the dropdown list preserves its current behavior (opening API docs in the browser).

# Important Notes
- I failed to fix an issue with the unmatching colors of the dropdown menu and the circular menu. If somebody wants to check it out – you are welcome. For now, we just transition to pure white without any transparency to mitigate the issue.
2024-10-26 19:36:16 +00:00
Adam Obuchowicz
08fd9213e4
Table Input Widget: Add column with plus (#11388)
Fixes #10863

(The `Column #3` in a screenshot below is just created and actually existing).

![image](https://github.com/user-attachments/assets/995d1a85-eb04-4b8d-bf23-b47ea61185e4)
2024-10-25 12:26:21 +00:00
Radosław Waśko
ca9df70ebf
Saving data links to a DB_Table (#11371)
- Closes #11295
2024-10-24 13:18:49 +00:00
Kaz Wesley
33904912ee
Move annotations into fields of Function and ConstructorDefinition (#11374)
Move annotations into fields of Function and ConstructorDefinition.

# Important Notes
New syntax: Constructor argument-definition lines
- Each argument in a type-constructor definition may be specified on its own (indented) line.

Relaxed syntax: Unparenthesized arguments to annotations
- A generic annotation now uses the rest of the line as its argument expression; the expression no longer needs to be parenthesized.
2024-10-23 20:35:06 +00:00
Kaz Wesley
ec0306ece0
Enable cloud file browser in local projects (#11383)
Implements #11139.
2024-10-23 18:25:00 +00:00
Adam Obuchowicz
7718734bf2
Limit light selection to "widget-colored" widgets only (#11358)
Fixes #10862

Before, we set selection to whit on entire node, but this looked bad in Table Widget.

[Screencast From 2024-10-18 15-23-40.webm](https://github.com/user-attachments/assets/cdc3e5f0-05f3-4858-ac98-c634ca283244)
2024-10-21 13:38:57 +00:00
Adam Obuchowicz
fa87a1857a
Copying and pasting in Grid fixes. (#11332)
Fixes #10760
Fixes #11141

[Screencast From 2024-10-17 13-51-45.webm](https://github.com/user-attachments/assets/78924f87-6bdb-4cb6-8f95-d9f97c63aea4)

This PR also changes the name of new columns to `Column #n` where n is index of column - this way it's easier to quickly create tables with non-conflicting column names.
2024-10-21 07:27:46 +00:00
Adam Obuchowicz
a45e233f03
Table widget: reordering rows and columns (#11271)
Fixes #10759

[Screencast From 2024-10-14 13-51-24.webm](https://github.com/user-attachments/assets/372c6f1b-8281-4bdc-9f46-fa90c3e32764)

# Important Notes
In this task, I also fixed some badly looking spacing after editing vector.
2024-10-17 07:49:01 +00:00
Radosław Waśko
3458fe4fe1
Accessing and modifying description and labels of Enso Cloud assets (#11255)
- Closes #11227
- Additionally, it should fix #11278 by ensuring that every scheduled message goes to the desired endpoint, by splitting each batch by endpoint.
2024-10-10 12:11:10 +00:00
Gregory Michael Travis
47bf591b5a
Add format parameter to Float.parse (#11229) 2024-10-07 15:43:57 +00:00
Gregory Michael Travis
cce50fab3a
Extend the range of int/float arguments to outside the range of Java long, in ceil, floor, and truncate (#11135) 2024-10-07 11:36:17 -04:00
Radosław Waśko
0399a4570d
Resolving ~ in Enso asset paths to user home (#11235)
- Closes #11226
2024-10-02 18:49:43 +00:00