Commit Graph

109 Commits

Author SHA1 Message Date
somebody1234
777ae9a047
Use Enso font (#8499)
- Closes #8485

# Important Notes
None
2023-12-08 18:45:42 +00:00
somebody1234
e562f65b99
Read file directly from location (#8490)
- Closes #6263

# Important Notes
- Still needs to be tested on Windows and macOS
- Currently does not check whether <kbd>Ctrl</kbd> is pressed to forcibly upload the file
2023-12-07 15:21:29 +00:00
somebody1234
f6cf8271ca
Fix node output type (#8488)
- Partially fixes #8420

# Important Notes
- Extracted out from #8461 as the other issue may need further investigation to fix.
2023-12-07 14:35:48 +00:00
Michael Mauderer
0ec3277695
Selection widget improvements (#8477) 2023-12-07 13:26:20 +00:00
Adam Obuchowicz
32f68b7ac2
Fix visualizations (#8479)
closes #8476
2023-12-07 12:31:00 +00:00
Ilya Bogdanov
503d3d86ce
Small fixes for GUI2 (#8478)
Includes the following fixes:

1. Closes #8472
Adding animation when hovering entries, align them to the left, improve vertical alignment, make sure the currently selected entry is marked with rounded background shape.


https://github.com/enso-org/enso/assets/6566674/322748de-1321-4b32-8eef-a80a07cf8215

2. <kbd>Backspace</kbd> is now used on MacOS for deleting nodes, instead of awkward combination <kbd>Fn+Backspace</kbd>.
3. Fixed layout for vector editor.

Before:
<img width="529" alt="Screenshot 2023-12-06 at 3 23 39 PM" src="https://github.com/enso-org/enso/assets/6566674/f3d3573c-c2c0-41c4-aba3-d7350b585c8d">
After:
<img width="509" alt="Screenshot 2023-12-06 at 6 21 56 PM" src="https://github.com/enso-org/enso/assets/6566674/b4581097-e555-4d07-a812-5c6d0e7a7f62">

Also includes the fix for dynamic dropdowns from #8474. Closes #8473
2023-12-06 20:28:39 +00:00
Ilya Bogdanov
c5a6859654
Reading widget configuration from the engine (#8400)
Closes #8260

<img width="846" alt="Screenshot 2023-11-27 at 5 24 57 PM" src="https://github.com/enso-org/enso/assets/6566674/da1ba325-8e9a-43e9-9e56-c672b4987e1e">

Parsed information is not used anywhere at the moment, on the screenshot you can see a temporary debug logging not included in the PR.
2023-12-06 08:04:57 +00:00
Adam Obuchowicz
c814e5efbc
Component Browser Preview Panel (#8451)
Add CB preview panel, using engine's `executeExpression` method to get input's evaluation result without changing actual code. Also, visualization evaluation failures are reported.

![image](https://github.com/enso-org/enso/assets/3919101/1c364a7e-2f90-4397-801d-e05927762658)

# Important Notes
* **The preview does not work yet due to engine issues**.
* The full screen preview does not work properly (it closes Component Browser). Will make a separate issue for that.
* The evaluated expression calls the visualization preprocessor in such a way it handles built-in visualizations properly, but not in general case. Will start discussion with engine how to fix that.
2023-12-06 08:01:52 +00:00
somebody1234
0fbb467507
Use MIME type parameter for drag instead of a unique MIME type (#8444)
# Important Notes
None
2023-12-06 07:47:46 +00:00
Adam Obuchowicz
6b837c31c5
Quickfix for editing problem (#8456)
I can edit nodes after this fix. ~~However, the cursor always lands at the end.~~ - this is also fixed.
2023-12-05 18:10:39 +00:00
Kaz Wesley
98988e8145
New AST types (#8263)
Introduce new AST type; use it to replace current uses of AstExtended; for now edits and synchronization are implemented on the old mechanisms (text edits / RelativeRange id map).

# Important Notes
- Edit-related code is commented out until the next PR because it is incompatible with the transitional IdMap-based synchronization.
2023-12-05 17:59:52 +00:00
somebody1234
71659882c6
Zoom to all/zoom to selected (#8459)
- Closes #6206
- Zoom to all/zoom to selected in visualizations, are now both `Mod+A`
- Implement Zoom to all/zoom to selected for the graph - shortcut is `Mod+Shift+A`, as `Mod+A` is "select all nodes"
- Animate zoom+pan

# Important Notes
None
2023-12-05 15:20:16 +00:00
Adam Obuchowicz
ee519e979b
Fix package (#8458)
Fixes #8457
2023-12-05 14:40:51 +00:00
somebody1234
c60bf6e892
Fallback to default visualization based on type, when no viz has been explicitly set (#8389)
- Closes #8386
- Attempts to execute `<expr>.default_visualization` to query the engine for the *correct* fallback type
- If that is not possible, falls back to checking `inputType` - first for an exact match, then falling back to `Any` (i.e. the text/JSON visualization)
- Does not decide fallback based on the shape of the returned JSON

# Important Notes
Contains pretty significant refactors of `VisualizationMetadata` to allow it to be unset.
2023-12-01 12:41:24 +00:00
somebody1234
731fd11a74
Fix node not being draggable (#8435)
Minor regression caused by #8361.

# Important Notes
None
2023-12-01 12:40:56 +00:00
somebody1234
27072622f7
Vector editor widget (#8361)
- Closes #8261
- Add vector editor widget
- Adding element to end
- Dragging elements
- Removing elements by dragging away

# Important Notes
- Both <kbd>Left Click</kbd> and <kbd>Ctrl</kbd> + <kbd>Left Click</kbd> are supported to begin a drag.
- Just <kbd>Left Click</kbd> alone is not sufficient as some widgets interact via left click
2023-11-30 20:27:04 +00:00
somebody1234
19ea8243b9
Fix Tailwind config for gui2 (#8427)
Fixes broken Tailwind config caused by recent dashboard changes.

# Important Notes
None
2023-11-30 13:20:09 +00:00
somebody1234
3de37bd7d3
Minor QoL improvements (#8422)
- Minor fixes for CodeMirror highlighting (the `!` to stop recursion was making the entire import line purple, and preventing strings inside operators from being highlighted)
- Change some icons that contain dark blue, to use `currentColor` instead
- Add execution time to hover tooltip (the LS is sending it, so might as well display it)

# Important Notes
None
2023-11-30 11:58:08 +00:00
Michael Mauderer
2014c88254
Implement Dropdown Widgets. (#8411)
Closes #8259

[Peek 2023-11-28 12-22.webm](https://github.com/enso-org/enso/assets/1428930/8696bb0f-15de-46a6-9664-a30da931d6df)

# Important Notes
Some TODOs left for after the AST refactoring:
* Updating the AST with the elected value.
* Getting the Expr ID from the parent node to determine the correct color.
2023-11-30 11:56:23 +00:00
somebody1234
dff1c0c88b
Errors on nodes (#8409)
- Closes #8288
- Show both `Panic`s and `DataflowError`s on nodes
- Update Code Editor diagnostics to use the same functionality to properly display `DataflowError`s

# Important Notes
- Does not include warnings
- ✔️ Done basic testing to ensure that errors *should* disappear and reappear as appropriate
2023-11-29 14:34:07 +00:00
somebody1234
5216b8c0cb
Make node expand to visualization width (#8394)
- Closes #8234
- Make node expand to full width of visualization
- Have a fixed minimum width for visualizations, to be able to show at least the toolbar
- Clip viz-defined toolbars to the width visualization (don't let them overflow)
- We can consider wrapping viz-defined toolbars onto a separate line, later down the line

# Important Notes
None
2023-11-29 04:40:51 +00:00
somebody1234
195faed9e4
Avoid placing a new node over a visualization (#8412)
- Closes #8368

# Important Notes
Could not repro the leftwards drift of new nodes. It is possible that this has already been fixed by another PR.
2023-11-29 03:22:50 +00:00
somebody1234
93a4937cc4
Add profiling shortcuts to GUI2 (#8406)
- Closes #8404

# Important Notes
- All relevant documentation has already been updated in #8358.
- I've tested that the keyboard shortcuts send appropriate messages over the LS connection, and have confirmed that a non-error response is received, but I'm not sure that the profiling actually works.
- There seem to be no entries in `~/.enso/`, nor in `~/enso/`
2023-11-28 14:44:46 +00:00
Adam Obuchowicz
a38680adf4
CB Fixes and Improvements (#8385)
* The "main view" (when no self type/module nor pattern is specified) contains all methods defined in top modules of every library
* Entries defined inside any "Internal" module from stdlib will be hidden by default; they will be visible only when self type is specified or the module path leading to such module internals.
* Fixed an issue with missing groups sometimes - we must wait with asking for groups for first executionComplete message.
* Modules and local variables have different default icon.

![image](https://github.com/enso-org/enso/assets/3919101/cb33691e-222b-413e-a92e-2cf84e9fe4bb)

![image](https://github.com/enso-org/enso/assets/3919101/beab202d-4feb-4b00-ba0c-c141862da53c)
2023-11-28 10:38:28 +00:00
Paweł Grabarz
1ad7a4bf5a
fix edge dragging and method argument assignment (#8388)
Fixed broken edge dragging and creating nodes from ports. Added basic support for multiple output ports, driven by already existing analysis of the port binding structure. Those constructs are not yet supported by the engine (hence the error in code), but the IDE has easier time already dealing with ports as individual binding expressions, not whole nodes.

<img width="865" alt="image" src="https://github.com/enso-org/enso/assets/919491/73126593-05c0-4553-ba6d-dad97d083c48">

Also improved the ability to interpret applied method arguments. Different cases of dynamic, static calls or partially applied functions are now properly supported.

<img width="961" alt="image" src="https://github.com/enso-org/enso/assets/919491/ffe02d79-841c-411d-a218-de89c2522f7b">
2023-11-27 16:34:34 +00:00
somebody1234
9b7e3d0f16
E2E tests (#8239)
- Closes #8179

# Important Notes
- ⚠️ These tests are currently *not run* on any CI workflow.
- There is some unused code for mocking the PM. This has been intentionally kept, as this may be useful in the future.
Note that this may be useful for testing the dashboard, however the dashboard is currently only tested in cloud mode
- that is, without the backend switcher, and with only the remote backend available. As such, currently it uses HTTP API mocks, and no PM mock.
2023-11-27 15:48:37 +00:00
Ilya Bogdanov
8516ed5cbb
Imports in CB (#8315)
Closes #8066


https://github.com/enso-org/enso/assets/6566674/ecd3d032-286b-4bfa-8dc6-96e178f595f3
2023-11-24 14:22:26 +00:00
somebody1234
b33285c634
Fix auto layout (#8345)
So it turns out auto-layout was broken if there were existing, already positioned nodes

# Important Notes
None
2023-11-24 10:49:15 +00:00
Paweł Grabarz
ec5c60b74d
fix incorrect byte array comparison (#8379)
Fixes an exception when opening the code editor. `indexedDB.cmp` doesn't accept `undefined` values. Moved its usage to a separate function to guard against that.
2023-11-24 08:54:23 +00:00
Michael Mauderer
76fb9f5c4b
All ways of creating node (+ button, dragging out edges) (#8341)
Closes #8054

[Peek 2023-11-20 13-50.webm](https://github.com/enso-org/enso/assets/1428930/064ad921-25dc-44f4-bed4-10b4f0ec0242)
2023-11-23 17:47:53 +00:00
Adam Obuchowicz
ce584862ff
Fix a set of issues in Component Browser (#8377)
Part of #8372

* Sorting was broken (sort's argument was removed)
* searching by initials now does not skip words
* icons: now we use same logic as existing nodes.
* local entities has worse score if "showLocals" option is toggled off.

# Important Notes
Please be aware that there is still an important issue with groups; sometimes they're not loaded. Reported [here](8376)
2023-11-23 15:53:59 +00:00
somebody1234
87dfb57f53
Show diagnostics in Code Editor (#8375)
As suggested by @JaroslavTulach.

- Shows diagnostics sent by `executionContext/executionStatus`
- Shows `Panic`s and `DataflowError`s sent by `executionContext/expressionUpdates`

# Important Notes
None
2023-11-23 14:15:48 +00:00
Adam Obuchowicz
2ddcaad6fe
Fix startup in the electron package (#8365)
Fixes #8334

There were two issues: one is bad code generated by vite. I needed to rephrase Rect.Zero definition. The second were missing widgets - that was caused by the fact that Vue components have a bit different properties than on test builds, apparently.
2023-11-23 11:03:23 +00:00
Adam Obuchowicz
fbe4221c46
Edges from alias analysis (#8316)
Fixes #8252

As we use proper alias analysis, we no longer display connections to overshadowed identifiers.

![Screenshot from 2023-11-16 15-50-27](https://github.com/enso-org/enso/assets/3919101/691aac6c-1951-4988-a338-4449c0413ef7)

# Important Notes
I've changed the meaning of edge's "source" - now it's expression ID of the constituted identifier, not the node ID. This will allow proper handling nodes like `[x, y] = Main.get_point` once the engine will support them.
2023-11-23 10:54:35 +00:00
James Dunkerley
ed9e71c4eb
Make ICON section work consistently between old and new GUI. (#8369)
- Handle name mismatch in icons between old and new IDE.
- Set the default icon for a few types.
- If can't find and icon use the Enso logo.

![image](https://github.com/enso-org/enso/assets/4699705/43d828b4-58cf-429e-b659-b1c389953b23)
2023-11-23 09:03:34 +00:00
somebody1234
1cf5ea96d6
More consistent reactive indices (#8353)
- Renames all `ReactiveIndex` and `ReactiveDb`s into the format `<key>To<value>`
- `ReactiveMapping`s (in `graphDatabase.ts`) currently have not been renamed - I'm not sure they need to be
- Removes various methods that have been made unnecessary by this change
- Simplifies some other methods
- Changes `SuggestionDb` to extend `ReactiveDb`

# Important Notes
None
2023-11-23 04:48:12 +00:00
Paweł Grabarz
e492d3f260
[GUI2] Render widget arguments (#8339)
Fixes #8256 #8257

Implemented displaying node argument placeholders. Refactored widgets to allow arbitrary input types, and split widget matching into two phases, separating input type validation step and allowing it to influence the derived TypeScript type of widget component props.

Connecting an edge to the placeholder is not implemented yet. Only connections to existing arguments are supported for now.

https://github.com/enso-org/enso/assets/919491/ad3bf254-5f56-4f2f-8c0d-616a7195c6d8


Nested argument lists are also supported:
<img width="396" alt="image" src="https://github.com/enso-org/enso/assets/919491/b61f6870-0f01-48c3-9b45-c7c6bc464638">
2023-11-22 14:43:58 +00:00
somebody1234
375e610660
Layout nodes without position (#8326)
- Closes #8071

# Important Notes
There is currently no way to predict the width a node, taking into account the width of widgets.
This should probably be done in another task.
2023-11-20 14:17:34 +00:00
somebody1234
062992bb8b
Fixes for GUI2 (#8310)
Addresses several issues found during book club.
- Add placeholder icons for visualizations (see screenshot)
- Also add the corresponding export to visualizations, and relevant support in the visualization store and visualization metadata DB.
- Show icon both on the visualization selector button, and in each visualization selector entry
- Adjust gaps between visualization selector entries
- Port table viz fixes (#8102) to Vue
- Fix height of table rows to avoid cutting off descenders on letters like `y` and `g`
- Make the space and enter keys work on visualization toolbar buttons, if they are selected
- `.blur()` code editor when clicking outside of it
- And similarly `.blur()` visualization selector
- Move selection brush on scroll by scaling the delta of `scrollTop` and `scrollLeft`
- Note that mouse position is technically still incorrect when scrolling past the end. I think this is fine - the new behavior is less broken, plus I am not aware of any way to fix this.

# Important Notes
None
2023-11-20 13:23:50 +00:00
somebody1234
9edc94afa0
Unify GUI2 headers (#8327)
- Closes #8304

# Important Notes
- A better long-term solution may be to remove COOP/COEP/CORP headers instead, but that is out of scope of this PR.
- Feel free to create a new issue, or discuss elsewhere, if this is something we want to do eventually
2023-11-20 11:32:40 +00:00
somebody1234
078260d8e7
Fix Geo Map visualization (#8311)
- Fixes #8300
- Fixes Geo Map visualization being completely broken
- Fixes Mapbox attribution icon in bottom right being invisible
- Fixes Mapbox attribution button being unclickable

# Important Notes
None
2023-11-20 11:25:23 +00:00
Michael Mauderer
85e2c72204
Fix component browser interactions. (#8303)
Fixes: #8064

Fixes broken interactions with of the component browser.
2023-11-17 15:28:45 +00:00
Michael Mauderer
aef3a4ffc0
enso-8194 Copy and pasting a single node (#8298)
Implements  #8194

[Peek 2023-11-13 14-15.webm](https://github.com/enso-org/enso/assets/1428930/22882487-7288-4eb7-af08-6539060b4967)
2023-11-17 03:57:30 +00:00
Paweł Grabarz
febce5dad7
[GUI2] Selection and rendering of basic node widgets (#8253) 2023-11-15 16:26:18 +00:00
Adam Obuchowicz
dc4de729b6
Fix CORS problems on built package (#8301)
Fixes #8297

Some external resources were failing due to CORS policies. This is the simplest fix.
2023-11-14 17:31:11 +00:00
Michael Mauderer
198fdece0b
Opening searcher with source node (#8279)
Implements #8065.
2023-11-14 14:42:33 +00:00
Adam Obuchowicz
5baec46466
Fix node placement (#8277)
Fixes: #8230

Fixes some rare cases caught by property tests, involving nodes with 0 width. `MultiRange` does not handle those. The thing is fixed by not using MultiRange, but by sorting nodes by the axis along which we're searching for free place.

All three reported seeds seem to be fixed.

# Important Notes
`MultiRange` is not used now, but I decided to spare it, violating YAGNI rule, as it is tested, and I feel it's a structure which may be useful.
2023-11-14 08:53:07 +00:00
Ilya Bogdanov
876cbd7b5d
Displaying progress for file uploads (#8227)
Closes #8182

Also, improved handling of multiple files – they are placed with a small vertical gap now.

The design for uploading files is non-existent, so I implemented something simple and good-looking. We can easily adjust it at any time.

You can’t move or otherwise interact with nodes while they are uploading.

https://github.com/enso-org/enso/assets/6566674/c0709d8f-3b95-4913-a6eb-caae225b6598
2023-11-13 13:50:57 +00:00
Adam Obuchowicz
c01ba83a3a
Use alias analysis to handle internal variables in CB input. (#8268)
Fixes #7926

See the new test cases to see what is the improvement.

The self still will be not ideal, but it's because it uses same logic as edges discovery. [When it will be improved](https://github.com/enso-org/enso/pull/8252) this should be improved as well.

https://github.com/enso-org/enso/assets/3919101/25efd56d-5aaa-4f10-957d-8ed6a40f3d9b

# Important Notes
It contains part of #8250. That PR may be reviewed, or here both PRs may be reviewed at once.
2023-11-13 12:59:15 +00:00
Michael Mauderer
148f34f778
Adding a new node with searcher (#8241)
Implements #8064 /

@kazcw Could you double-check that this plays well with your edge dragging implementation. Some of the code seemed a work in progress, and I want to avoid any issues with what you had planned there.
2023-11-10 14:10:44 +00:00