Commit Graph

770 Commits

Author SHA1 Message Date
Michael Mauderer
10a95e43d6
Add functionality to handle Expression Updates to GUI2 (#7982)
Implements #7783. Adds functionality to handle and store expression updates, as well as show the output type of node.



https://github.com/enso-org/enso/assets/1428930/31ffff78-ff2c-4e0b-bcde-ddc507cc0226
2023-10-09 05:55:12 +00:00
somebody1234
44f2f425c0
[gui2] Language Server binary protocol, and loading of visualization data (#7873)
- Depends on #7773.

- Implements binary WebSocket protocol (data protocol)
- Performs some editor initialization (the bare minimum so that visualizations work)
- Adds event handlers to receive visualization data updates

# Important Notes
None
2023-10-07 20:57:47 +00:00
Ilya Bogdanov
3b6f13c7b9
Create and edit nodes in temporary ast nodes with execution context disabled (#7779)
Closes #6417

Creating and editing nodes with a component browser does not edit the node in place but creates a temporary AST node with the execution context switch. When the node is committed, the original AST is replaced by the new one, and the temporary node is removed.

This solves several issues:
1. Previewing suggestions or editing nodes should no longer produce unwanted side effects, as the edited node expression is always evaluated with the output context being disabled.
2. Errors no longer propagate down the graph when you edit the node. The edited node has no outputs connected. Inputs behave normally, though.
3. Undo-redo and editing abort is much simpler. To abort editing, remove the temporary node.

https://github.com/enso-org/enso/assets/6566674/8d38e6bc-a4de-4e69-8d48-52d9b45b6554

# Important Notes
The code is a bit awkward in a few places. This is the consequence of previous architecture.
2023-10-06 14:56:09 +00:00
Dmitry Bushev
5a1aaed952
Remove extra dot in error messages (#7974) 2023-10-05 15:06:07 +03:00
Ilya Bogdanov
022a5b0d1b
Make the code editor editable again (#7844)
Fixes #7474

Again, a quite complicated issue. The code editor was broken by https://github.com/enso-org/enso/pull/7167 for a few reasons:
1. The text component's shortcuts depend on the `focused` FRP endpoint, which is controlled by `deprecated_(de)focus` inputs. `focused` output was not changed by the code editor `model.focus()` call. (we still use `deprecated_focus` for all other components)
2. `focus()` FRP input was added to the text component but never triggered. It's too easy to confuse it with the `focus()` method of the `object::Instance` (Deref is evil!)
3. The graph editor handles clicks on the background by `blur_tree()`, effectively blurring any focused element in the application. But clicking on code editor (to focus it) also causes a click on the background! So we focus the code editor, and then handle the background click, defocusing it from the graph editor's point of view. It allows graph editor to open CB on <kbd>Enter</kbd> while the code editor is still active.

I solved (3) by disallowing CB opening while code editor is visible. Not ideal, but I guess it solves the issue.

Do you think the other solution is possible – to add some overlay for the code editor and avoid triggering `blur_tree` when clicking on it? That won't work because you still can't defocus the code editor using the new API, so it will always be focused.

So we have a situation when half of the app uses the new focus system, another half uses the old one, and none works properly.


https://github.com/enso-org/enso/assets/6566674/3a0d36ed-4d50-4606-9486-272fbd5d9cb7
2023-10-05 08:40:52 +00:00
Ilya Bogdanov
2cd3912402
Add automatic generation of missing group colors (#7902)
Closes #7823

We set fallback color for components without an assigned group, use a color defined in the group, or otherwise derive the color from the group name.

All group colors are available in the graph editor as CSS variables so that they can be dynamically edited and debugged via dev tools.

For deriving the color, we use [murmurhash](https://www.npmjs.com/package/murmurhash), which quickly produces sufficiently uniformly distributed 32-bit values and [oklch](https://evilmartians.com/chronicles/oklch-in-css-why-quit-rgb-hsl) colorspace. We will still have *some* hash collisions between different groups, but it shouldn't matter that much. I have also tried a few other hashes (namely `cybr53` and Java's string hashing), and the results were more or less similar.

`oklch` is rather a new thing in CSS, but it is available starting with Chrome 111, which is exactly the version we're using in Electron.


https://github.com/enso-org/enso/assets/6566674/7177f041-93e9-4536-b19f-6b67a2da8b7e
2023-10-04 11:24:10 +00:00
Paweł Grabarz
ad0c1bc188
[GUI2] Fix and add tests for delta format translation. (#7968)
Fixes #7967

The text updates should no longer be rejected after applying edits containing newlines. The tricky update translation logic was also covered with property-based unit tests.

https://github.com/enso-org/enso/assets/919491/0bfb6181-7244-4eff-8d72-5b1a4630b9a6
2023-10-04 10:53:54 +00:00
somebody1234
0228022809
Fix lint error when running compile-server (#7969) 2023-10-04 05:11:17 +02:00
somebody1234
7e7b0f8c43
Hotfix code editor focus (#7965)
This fixes not being able to click the code editor.
This is a regression introduced by:
- #7893

# Important Notes
None
2023-10-03 20:56:40 +00:00
Michał Wawrzyniec Urbańczyk
2d39e644b8
New GUI/IDE build script support (#7832)
This PR adds support for the new Vue-based GUI (aka `gui2`).

The user-facing changes are primarily:
* support for `./run gui2` and `./run ide2` commands (that build just the new GUI and the whole IDE package with new GUI embedded — respectively);
* the top-level `test` and `lint` commands will now invoke the relevant commands on the new GUI

---------

Co-authored-by: Paweł Grabarz <frizi09@gmail.com>
2023-10-03 20:07:20 +02:00
Michał Wawrzyniec Urbańczyk
8d8c0b62d6
Disable broken lints (#7961) 2023-10-03 19:30:24 +02:00
Adam Obuchowicz
608ff2da09
Loading suggestion db (#7940)
PR adds initialization of suggestion db from the language sever (instead of fetching some mock). Also support for applying updates.

---------

Co-authored-by: Paweł Grabarz <frizi09@gmail.com>
2023-10-02 15:15:22 +02:00
Paweł Grabarz
af050f522b
[GUI2] Module contents editing and synchronization (#7938)
Added bidirectional synchronization of module edits with language server. All document edits made by any of the Yjs peers are sent to language server to apply to the file. Any local file changes cause reload, which is synchronized back to Yjs by finding a diff.
2023-10-02 12:01:03 +00:00
somebody1234
3a010a00a7
Implement connector button and context menu action. (#7891)
- Closes https://github.com/enso-org/cloud-v2/issues/686

# Important Notes
For now they use the backend endpoints for secrets.
2023-10-02 10:52:26 +00:00
somebody1234
b59e7c088e
[gui2] Shortcut manager + shortcuts for selecting nodes (#7893)
- Closes #7874
- Chosen solution: Use the dashboard's shortcut manager to register keybinds and match mouse shortcuts
- Switch existing shortcuts to shortcut manager as well
- Switch visualizations to use the shortcut manager too
- Closes #7865
- Implements all shortcuts for node selection, *except* the arrow key shortcut
- Adds circle cursor selection brush
- The fade out from inactivity (which is present in the Rust source code) is currently missing

Other changes:
- Change everything to use `pointerdown` as appropriate, to ensure the event handlers are called in the right order

# Important Notes
The arrow key shortcut to navigate to the nearest node in that direction *has not* been implemented.
This may need discussion on how it should work

The implementation in general is pretty inefficient - this is intentional, performance can be optimized in the future
2023-10-02 09:03:47 +00:00
somebody1234
657be61c30
(even more) Dashboard fixes (#7877)
- Fixes display of the assets table in Firefox. Before this fix, the table header grows instead of the table footer.
It seems like the correct behavior for tables is to [not be valid flex children](https://stackoverflow.com/a/41421700/3323231), so the correct fix is to add a `flex` wrapper div.
- Fixes missing error toast notification when `startup.project` is invalid
- Fixes #7589
- Enter (incorrectly) causes projects to be opened when the name is being edited
- Gracefully fail when `projectState` is missing from an asset
- Avoid opening editor for previously opened project, when `startup.project` is provided
- Fixes https://github.com/enso-org/cloud-v2/issues/688
- Fixes CSS for search bar
- Fixes https://github.com/enso-org/cloud-v2/issues/689
- Adds "New <X>" entries back to context menus for regular assets
- Fixes https://github.com/enso-org/cloud-v2/issues/692
- Fix `z-index` of top left (page switcher) icons
- Fixes https://github.com/enso-org/cloud-v2/issues/693
- Fix restoring local projects after closing and reopening
- Adds blur to top right menu bars for extra visibility

# Important Notes
Testing should test Firefox and Chrome (testing on Safari is optional) to make sure the following is working correctly:
- The table looks normal
- The context menu still triggers below the table (both with and without items being selected)
- There is no scrollbar if the table is shorter than the viewport
2023-09-29 13:40:02 +00:00
Michał Wawrzyniec Urbańczyk
421d6e2a19
Fixes for AG Grid License handling (#7914)
Fixed issues in passing our AG Grid license key during the CI builds.
2023-09-29 12:56:12 +00:00
Dmitry Bushev
71442fe32c
Open projects using the packaged language server (#7868)
close #7750
close #7834

Changelog:
- update: project manager uses the packaged language server to open projects
- fix: remove stack traces from connection errors on initial ping handler request (when the language server is booting)
- update: add engine and edition versions to the `initProtocolConnection` response for easier debug
- update: do not resolve project ensoVersion in the `project/list` to eliminate unnecessary network calls
2023-09-28 14:13:14 +00:00
Adam Obuchowicz
cf16d32894
Create execution context on GUI2 start (#7894)
Because several tasks require execution context, this is a fast PR making one.

# Important Notes
* Changes in languageServer.ts and languageServerTypes.ts were directly ported from #7873
* We display warning about missing namespace, because the dashboard does not provide us any. Needs to be fixed at some point.
2023-09-27 15:33:41 +00:00
somebody1234
a7c2e7590a
Trash and Recent categories (#7682)
- Closes https://github.com/enso-org/cloud-v2/issues/617
- Trash category
- Do not open "confirm delete" modal when on remote (cloud) backend
- Permanent deletion has been superseded by the trash category
- Save current category to `localStorage`
- Also implements "Recent" category. Differences to Home category:
- Hides sort indicators
- Disables sorting

Other fixes:
- Allow overriding cloud environment through environment variable
- Prevent triggering rename on click when multiple items are selected
- Remove "move to trash" context menu option when user is not owner

# Important Notes
- This registers the "Ctrl + R" (Cmd + R) shortcut for restoring an item from trash. This is the same shortcut used for renaming, however I think it is fine because items in trash cannot be renamed.
(As usual though, this is very simple to remove/change so it's not a big deal to remove/change it.)

- The "Recent" category lacks backend support - so it falls back to the default category, as the deserialization of unknown values falls back to the default category.
2023-09-27 07:22:48 +00:00
somebody1234
2ad19a5366
Fix password validation; add autocomplete attributes (#7896)
- Fixes https://github.com/enso-org/cloud-v2/issues/690
- Fixes password validation never becoming successful after failing once

Other changes:
- Add autocomplete attributes (Chrome said I should so 🤷)

# Important Notes
None
2023-09-26 13:02:16 +00:00
Ilya Bogdanov
fbfaeb5530
Minor changes to the top bar styles (#7802)
My first attempts to work with the `gui2` codebase. When looking at the IDE, I noticed that the top bar seems slightly off. I checked and confirmed that the sizes (heights) of some elements were not matching Figma.

Also, I tried using the `M PLUS 1` font, and it has a _completely_ different baseline than our previous one, effectively shifting all text down. I think we need to start using it as soon as possible, or else we will fix CSS rules everywhere.

I understand that the way I added the font is not the correct one, but I guess we can live with that until we properly include the files to the package.

Please forgive me, gods of Vue.js, @Frizi and @somebody1234, for this murder.

Before:

<img width="405" alt="Screenshot 2023-09-13 at 12 19 18 AM" src="https://github.com/enso-org/enso/assets/6566674/8ca81db8-1719-4761-97a1-741c2f76b45d">


After:

<img width="480" alt="Screenshot 2023-09-19 at 8 01 18 PM" src="https://github.com/enso-org/enso/assets/6566674/eb9783d3-0a34-4f1e-8afd-2f06a1b6db4f">



Dropdown animation:


https://github.com/enso-org/enso/assets/6566674/bab6baa9-23e3-4c2d-8494-1d464ba6902b
2023-09-26 11:17:51 +00:00
Michael Mauderer
f8c4f9ec32
Add CodeEditor component to GUI2 (#7806)
Adds a new code editor to the new GUI prototype.


[Peek 2023-09-25 12-12.webm](https://github.com/enso-org/enso/assets/1428930/58a926de-1042-4f2b-8e2c-29da953816b0)

# Important Notes
Not yet hooked up to any integration.
2023-09-26 10:22:15 +00:00
somebody1234
0a70f2edf5
Vue visualizations (#7773)
- Closes #7733
- Add infrastructure for defining custom visualizations
- Add all visualizations

# Important Notes
⚠️ Changes made:
- "Fit all" has been changed to always animate - this is because behavior was previously inconsistent:
- the scatterplot would always animate on "Fit all", but
- the histogram would never animate on "Fit all"
2023-09-26 08:14:56 +00:00
Adam Obuchowicz
d139449bb6
Add ArgumentInfo to infix argument (#7530)
Adds proper argument information to span tree. Fixes #7107

https://github.com/enso-org/enso/assets/3919101/f7773412-5f0f-46c9-9848-2dc653aee882

# Important Notes
Nodes where the left operand (target) is missing still does not work, because the engine still does not send us any method pointer (perhaps due to its internal design).
2023-09-25 14:24:56 +00:00
Paweł Grabarz
42a7cb2d23
[Gui2] Opening projects and language server connection (#7813)
# Important Notes
- Binary LS endpoint is not yet handled.
- The parsing of provided source is not entirely correct, as each line (including imports) is treated as node. The usage of actual enso AST for nodes is not yet implemented.
- Modifications to the graph state are not yet synchronized back to the language server.
2023-09-22 03:43:25 +00:00
Ilya Bogdanov
b0a5ac2c19
Fix static methods in dropdowns (#7845)
Fixes #7824

The issue was caused by me who didn't think that we can use static methods in dropdowns.


https://github.com/enso-org/enso/assets/6566674/5045c5ce-e33b-48ff-9488-4228c016b563
2023-09-21 08:33:53 +00:00
Adam Obuchowicz
c78291a153
Fitering entries in Vue IDE + suggestion database mock (#7804)
Fixes #7737

Added structures representing Suggestion Database entries. Currently, the db is loaded from a snapshot from the old GUI.

Added an input to CB and use it to filter components. The interpretation is simple: the input is split by the last dot, and the left part is considered a qualified name, and the right part is a function name written by the user so far. I rewrote the filtering algorithm designed by @jdunkerley, changing it a bit, so we support qualified names instead of just a type name.

https://github.com/enso-org/enso/assets/3919101/76a957f6-e53f-49ad-996c-398cd7112fc6

# Important Notes
* The component list is now sorted from "first to select" to "least interesting". The panel itself cares about putting the first on the bottom.
* The suggestion db snapshot is very big, so it's instead loaded from external server.
2023-09-20 09:16:18 +00:00
Ilya Bogdanov
c6603df7a1
Stable order for filtered components (#7810)
Fixes #7591

https://github.com/enso-org/enso/assets/6566674/ddde9f3a-cff8-4c15-a0fe-b7468c917b6a
2023-09-18 09:43:10 +00:00
somebody1234
f7e079aa43
Fix Esc not closing CB (#7800)
- Fixes #7799

The PR that introduced this bug stopped event propagation in certain cases, in order to fix another issue.
This PR introduces a way to run an event handler, but indicate failure so further handlers (if any) are run, otherwise the event will be propagated all the way to the document root.

# Important Notes
None
2023-09-15 15:04:45 +00:00
Hubert Plociniczak
1ee3d8f4f0
Rename Decimal to Float (#7807)
Implements #6889.
2023-09-14 15:01:30 +00:00
Kaz Wesley
b9ec6d4ec3
Context restoration (#7662)
Add support for recovering from GL context loss. When the context is restored, the loading spinner is shown until shaders finish recompiling.

[vokoscreenNG-2023-08-25_09-39-11.webm](https://github.com/enso-org/enso/assets/1047859/cfa90ec5-72a1-41e6-bafa-177fa5e85fb2)

*While the context is missing, the loading spinner is rendered in the 0% state. (This condition will not normally be observed, except momentarily, as the browser should restore the context immediately if it is lost while the page is visible.) When we receive a new context, the spinner switches to the 90% state until restoration completes. Restoration is fast, as we don't need to do much work except recompiling shaders.*

# Important Notes
- A new debug hotkey, Ctrl+Alt+Shift+X, causes context loss for testing. Pressing it a second time causes context restoration.
- `Texture` is still a CPU-bound texture. It now uses the "immutable" `texStorage/texSubImage` API, which is a ["preferred alternative"](https://registry.khronos.org/webgl/specs/latest/2.0/#3.7.6) to the `texImage` API because it can be more efficient.
- The type for texture uniforms is now `Uniform<Option<Texture>>`. Texture uniforms are decoupled from the context.
- A new `ContextLost` error type can be returned by functions that cannot complete if the context is lost.
- Fix some crashes that could occur when context was lost.
- Clarify ownership of some rendering-related types: Externalize, and where possible eliminate, `Rc/RefCell`s.
2023-09-14 14:40:28 +00:00
Ilya Bogdanov
51491c1fa1
Fix visualization closing when cmd shortcut is pressed (#7798)
Fixes #7457

The issue was caused by the FRP logic that assumed we wanted to close the preview even if it wasn't opened in the first place.

https://github.com/enso-org/enso/assets/6566674/ceb4996b-c878-4ff1-8bca-7d2a0b817769
2023-09-13 21:52:26 +00:00
somebody1234
e875781e29
Vue widgets (#7728)
Adds widgets:
- Checkbox (with sorting)
- Numeric slider
- Dropdown (accepting a list of strings)
- Closes #7731
- Placeholder (underscore - has no actions)

# Important Notes
The widgets are currently added to every node, but are not synced with the yjs representation. This is intentional, as (afaict) the format for the AST representation is not yet finalized.

There are a number of design differences, for practical reasons:
- The dropdown now has a scrollbar.
- As a side effect, the sort button needed to be moved left, to avoid overlapping with the scrollbar.
- Note that it is *not* centered in the 8px horizontal padding. It is 4px wide, and has 1px left and 3px right padding: `.||||...`. (Note that the 8px horizontal padding from the design is retained.
- 4px of vertical padding has been inserted, so that there is *some* padding between the bubble for the selected item, and the outer dropdown container, when the first item is selected. Note that this is different to the 8px
- 16px of right margin has been inserted after every item. This is the same amount of padding that is added by the bubble. This means that the dropdown does not change in width when a long item is selected.

Design issues:
- The sort button for the dropdown overlaps the text
2023-09-13 10:06:24 +00:00
Ilya Bogdanov
6fd2295cc6
Do not lose focus when clicking fullscreen visualization (#7782)
Fixes #7524

The issue was caused by the fact that fullscreen visualization does not have hover area, so clicking anywhere was deactivating it because we used `deselect_click = scene.on_event::<mouse::Down>();`


https://github.com/enso-org/enso/assets/6566674/08a463f3-764f-4b2c-b41f-13521f5cfc56
2023-09-12 10:28:13 +00:00
Ilya Bogdanov
f6693a844c
Forbid node pasting when editing (#7768)
Closes #7759. The reason was a missing condition in the shortcut setup.

https://github.com/enso-org/enso/assets/6566674/d4475d48-f459-4dd9-ba9b-42e8110b541c
2023-09-11 08:18:29 +00:00
Adam Obuchowicz
3c00cb400e
First iteration of Component Browser Panel in Vue (#7718)
Updated the Component Browser stub from @Frizi's branch. Filled with some mocked data and implemented highlight and navigation.

https://github.com/enso-org/enso/assets/3919101/6af57413-bcb6-4402-9a4a-a992d58504ba

# Important Notes
Still missing the input panel, and obviously, the integration with anything will be a part of another task.
2023-09-08 09:57:02 +00:00
Michał Wawrzyniec Urbańczyk
03aebc136e
wip (#7745) 2023-09-08 11:26:39 +02:00
somebody1234
5ab74b5218
Vue project title, execution mode selector, and breadcrumbs (#7726)
- Closes #7730. Adds top bar containing:
- Project title
- Execution mode selector (design/live)
- Navbar containing:
- Navigation previous/next button
- Breadcrumbs

# Important Notes
Icons are currently all separate files. This may need to be changed to a single svg containing individual icons in `defs` if(/when) that is merged into `develop`.
2023-09-07 15:02:55 +00:00
somebody1234
db425e7a77
Rename trash to delete; fix search bar autofocus (#7710)
- Renames "Move To Trash" to "Delete" on local backend
- This is because the local backend does not have a trash category (or categories at all)
- Fix search bar autofocus
- The "delete" hotkey was focusing the search bar - this was because the shortcuts handler, and the autofocus handler, were both registered on the same `EventTarget`. The fix is to do `stopImmediatePropagation()` to stop running any other event handler, even ones on the same `EventTarget`.

# Important Notes
None
2023-09-07 13:06:54 +00:00
somebody1234
2155daa935
Fix unnecessary /versions calls (#7747)
- Fixes https://github.com/enso-org/cloud-v2/issues/659

`getProjectDetails` was calling `listVersions` to get a fallback IDE version, creating a lot of unnecessary requests to the backend, *especially* because `getProjectDetails` is called periodically when a project is opening.

In this PR, the implementation has been changed to cache the fallback version for one day, meaning the extra `listVersions` calls should now only ever happen once per client per day.

# Important Notes
None
2023-09-07 12:59:02 +00:00
Paweł Grabarz
9b0f551881
Gui2: integrate rust Enso parser (#7753) 2023-09-07 12:54:01 +00:00
Ilya Bogdanov
66bd08ccea
Use only a single node color (blue) (#7764)
Closes #7456 by using a *completely random* color for all nodes.

Proof of randomness, ensured with modern LLM:

<img width="720" alt="Screenshot 2023-09-07 at 1 46 41 PM" src="https://github.com/enso-org/enso/assets/6566674/fc3fecd8-c5f6-4167-a646-973c4efedc18">


<img width="1380" alt="Screenshot 2023-09-07 at 1 43 44 PM" src="https://github.com/enso-org/enso/assets/6566674/0b4a91c7-fac2-4bab-921f-39861f891898">

# Important Notes
We can peek any other color if you'd like.
2023-09-07 12:50:12 +00:00
somebody1234
58fbd8e9e8
Async execution controls (#7592)
- Closes https://github.com/enso-org/cloud-v2/issues/619
- Async execution controls

# Important Notes
There is no design for this, as such, implementation details use placeholder designs.

- The context menu uses a play icon. An icon similar in style to the "copy" icon *may* work to represent "run in background", but it may be difficult to visually represent that it is being run in the background, without obstructing it with a foreground window
- The icon for projects being run in the background have a green tint, to distinguish them from projects that will be (or are currently) opened in the editor.
- this will ***almost certainly*** need to be replaced with a proper design
- This *may* also make sense for the local backend, *however* as I don't know whether there is a way to access the completion progress of execution from the PM API, local backend support is currently *not* implemented in this PR.
- On a related note: as far as I am aware, there is also no such endpoint for the cloud backend. However, support for async execution was recently added, so I am adding the basic functionality corresponding to the `executeAsync` project state.
- Whether a project is being run in the background is currently lost on refresh. This is because the async execution state is currently not sent by the backend.
- Placeholder shortcuts have been added (Shift+Enter - Cmd+Enter is already taken by the "share" action, and shift+double click). These are totally optional, and can easily be removed.
2023-09-07 12:36:03 +00:00
Ilya Bogdanov
fff1386c6d
Fix new node position (#7680)
Closes: #7309

The changed origin of the visualization container caused the issue. Now, the origin is at the top left corner of the visualization, and bounding box abstraction expects the origin at the bottom left. Despite the comments in the code, the bounding box is designed to work with bottom-left origin only.


https://github.com/enso-org/enso/assets/6566674/273abfaa-45b6-4374-8d4c-3b8c4e2c1fc2
2023-09-06 14:20:45 +00:00
Adam Obuchowicz
e91633b2e7
Bump electron version (#7707)
Again I hit the problem with shader compilation failing with no apparent reason, and again bumping electron version helped me.

# Important Notes
I bumped to latest `25.x` version as I haven't dared to change major version expecting breaking changes.
2023-09-06 12:02:16 +00:00
Ilya Bogdanov
1f8675a031
Fix atom types in dropdowns. (#7670)
Fixes #7468

The fix is pretty simple: we reuse the existing functionality for importing stuff and generating expressions. It fixes issues with `Nothing` or `Report_Unmatched` types.


https://github.com/enso-org/enso/assets/6566674/4e7addf9-2175-4f2a-a571-4ef823de5cb0

While debugging, I found it easier to work with a suggestion database when exported to some external format. Hence, I implemented serde serialization support for database entries and also a new debug shortcut <kbd>ctrl</kbd>+<kbd>shift</kbd>+<kbd>u</kbd> to dump all entries to the console.
2023-09-05 14:51:33 +00:00
somebody1234
abdbcfcdb1
Fix double clicking projects to open them (#7690)
- Fixes #7689
- Fix double clicking projects to open them

# Important Notes
None
2023-09-05 09:16:28 +00:00
Paweł Grabarz
82f634b7f8
Add Vue gui project (#7696)
Add a separate `gui2` project with Vue application. Does not modify any existing project files.

![image](https://github.com/enso-org/enso/assets/919491/c7a83521-bf83-4c6a-8d17-91c5eab1f827)

# Important Notes
Currently not integrated with existing build and testing system.
2023-09-04 22:27:33 +00:00
somebody1234
73b864640b
Home screen (#7517)
- Closes https://github.com/enso-org/cloud-v2/issues/580
- Adds home screen

Other changes:
- Typing in the search bar from the home page, switches to the drive page. This is easy to change/remove, of course

# Important Notes
There are minor differences from the design:
- The Enso logo has opacity 0.6 to match the text color, rather than 0.665
- The list of samples is different
- The border-radius on the "create empty project" tile was changed from 18px to 16px, to match every other border-radius (especially the ones on the tiles for the other samples)

Implementation notes:
- The "new project" circled plus icon has a different color to the primary text color as well, but that has been left as-is
- The sample descriptions have a backdrop-blur, but the background image no longer extends underneath it
- There are currently no inset shadows for the home screen, but it will be easy to copy them from the old implementation from the old templates list
- "Read what's new in Enso 3.0 Beta" currently links to https://enso.org/, rather than a blog post (which does not yet exist)
- The new template backgrounds have been replaced with SVGs. The Excel one uses the Excel logo from Wikipedia; the new geospatial analysis one was converted to SVG via auto-tracing.

There are also several placeholders:
- Sample author icon
- Sample author
- Sample open count
- Sample like ount
2023-08-31 15:03:39 +00:00
Paweł Grabarz
226c5cf7c7
Revert "Handle wasm panics, display a message and allow a restart (#7507)" (#7708) 2023-08-31 13:30:01 +02:00
Ilya Bogdanov
b49cc25d38
Copy-pasting nodes (#7618)
Closes #6261

- Adds support for copy-pasting nodes with `cmd + C` and `cmd + V` shortcuts.
- Only a single, currently selected node will be copied. Adding support for multiple node copies seems easy, though (but was out of the scope of the task).
- We use a custom data format for clipboard content. Node's metadata is also copied, so opened visualizations are preserved. However, the visualization's size is not preserved, as we do not store this info in metadata.
- For custom format to work, we use a pretty new feature called [Clipboard pickling](https://github.com/w3c/editing/blob/gh-pages/docs/clipboard-pickling/explainer.md), but it is available in Electron and in most browsers already.
- Pasting plain text from other applications (or from Enso, if the code is copied in edit mode) is supported and is currently enabled. There are some security concerns related to this, though. I will create a separate issue/discussion for that.
- Undo/redo works as you expect.
- New node is pasted at the cursor position.


https://github.com/enso-org/enso/assets/6566674/7a04d941-19f7-4a39-9bce-0e554af50ba3
2023-08-30 13:04:21 +00:00
Paweł Grabarz
c834847c48
Handle wasm panics, display a message and allow a restart (#7507) 2023-08-30 13:31:08 +02:00
somebody1234
d9768ca63e
Change folder icon to arrow on hover (#7673)
- Closes https://github.com/enso-org/cloud-v2/issues/628
- Change folder icon to arrow on hover

# Important Notes
The arrow used is the same one used in the chat side panel.
2023-08-30 06:30:29 +00:00
somebody1234
b69fa516b7
Fix play button on local backend (#7688)
If the user does not have sufficient permissions to open the project, the project no longer shows the play button. However, this does not work on the local backend because the local backend lacks permissions completely.

# Important Notes
None
2023-08-29 16:33:14 +00:00
somebody1234
c558dec315
Fix context menu option visibility (#7686)
Fixes context menu options incorrectly being hidden due to incorrect logic when determining whether someone else is opening a project

# Important Notes
None
2023-08-29 15:19:51 +00:00
somebody1234
78c36ddfc7
Fix "opened by" being missing for new projects (#7684)
Fixes the project icon for new projects being disabled, because `opened_by` is missing, making the frontend think the current user was not the one that opened the project.

# Important Notes
None
2023-08-29 10:07:13 +00:00
somebody1234
e0ef0a258d
Improve assets table display (#7500)
- Closes #7463
- Makes table header sticky
- Clips table body so it does not overlap table header

Other changes:
- Clip table header row so it does not overlap extra columns selector
- Hide extra columns selector on local backend (PM backend)
- Focus search bar if the keypress will type regular text
- Change row height from 40px to 32px
- Add "Share" button when the editor is open
- Make entire area of backend selector (Cloud <-> Local) clickable (previously, the padding was not clickable)
- Remove the up-arrow icon to open a project. Projects are now opened by switching to the project tab using the tab selector on the top left (or by double clicking the row).
- Fix opening newly created folder (previously its entries were appended to the end, rather than under the folder)
- Indent background of "name" column (the first column)
- Minor code style changes
- Add background back to "change password" modal (oops)
- Hide "open" context menu entry and show "stop" entry, when a project is currently running
- ℹ️ It might be a good idea to support the "open" action on directories as well, however it is difficult without the assets table refactor in #7540. As such, this functionality will not be added in this PR.
- Fix horizontal padding on "sign in" user menu entry
- Hide email/password validation when using oauth logins

More fixes for assets list:
- Project is inserted at start of list when there are no existing projects
- Project is inserted at start of children when there are no existing children
- Deleting a folder collapses it (hides its descendants)
- Adding children to a newly created folder puts them at the correct depth, rather than depth 1

# Important Notes
None
2023-08-28 18:01:40 +00:00
somebody1234
8b3578b4e7
Fix "localStorage has already been declared" (#7675)
Fix issue caused by latest PRs being auto-merged improperly

# Important Notes
None
2023-08-28 15:51:32 +00:00
somebody1234
704ddff624
Disable opening projects that are already opened by other users (#7660)
- Closes https://github.com/enso-org/cloud-v2/issues/568
- Disable project with an `openedBy` that is not the current user

Fixes other issues:
- Fixes freshly restored saved projects not being unset when clicking stop before the editor first opens
- Changes "unable to" in errors to "could not", for consistency
- Users with insufficient permissions now see a network (node graph) icon instead of a play button:

![image](https://github.com/enso-org/enso/assets/4046547/0464ae66-4da7-4374-a4aa-80dd74fa1dc0)

# Important Notes
None
2023-08-28 13:21:36 +00:00
somebody1234
01aab4a2cc
Fix unsetting saved project on close (#7661)
Extracted from #7660.
Fixes the bug that happens when you do:
- Open the app with a saved "last opened project"
- The app will immediately restore the project
- Close the project
- Reopen/reload the app
- The same project will start opening again.
- Expected behavior: The project does not start, because it was previously manually closed.

# Important Notes
None
2023-08-28 13:15:12 +00:00
somebody1234
f6225882ed
Add Provisioned project state (#7658)
- Closes https://github.com/enso-org/cloud-v2/issues/647
- Add handling for `Provisioned` project state to frontend

- Also fixes bug causing cloud project loading message to not disappear (oops...)

# Important Notes
- sometimes the editor opens fine, but the websocket times out
- when checking requests, I don't see a request that returns `Provisioned`, so I can't be 100% sure that the handling for the `Provisioned` state actually works
2023-08-28 11:05:41 +00:00
somebody1234
37c487f530
Fix restoring cloud projects that have been closed (e.g. from inactivity) (#7584)
Fix issues restoring cloud projects that have been closed.
On current develop, the frontend assumes cloud projects are still open from the last time they were open. If this is not the case, it tries to open WebSocket endpoints that no longer exist

# Important Notes
For a relatively easy way to test:
- Run `Enso.dmg` or `./ide run watch`
- Open a cloud project
- Refresh Electron to make sure restoration is working
- Go to `localhost:8080`
- Close the project
- Refresh Electron to make sure startup + restoration is working

Should also test restoring local projects to make sure that didn't break.

I was unable to properly test cloud projects (the one I tested with opened, but was blank with just the IDE background and no cursor and no nodes, for some reason)
2023-08-25 13:19:31 +00:00
somebody1234
aa2f72cbd0
Allow configuring Project Manager server host and port (#6774)
- Closes #6730
- Changes config to allow environment variables to override server host and port
- Adds port scanning to Electron app to ensure the PM is started at a free port

# Important Notes
- `SERVER_PORT=abcd enso.AppImage` does NOT work. It would not be difficult to implement, but it probably needs discussion on how exactly it should be implemented - for example, `SERVER_PORT` is quite a generic name, should the Electron app pass though something like `ENSO_PM_SERVER_PORT` to the PM as `SERVER_PORT` instead?

⚠️ Port scanning is *only* implemented in the JS frontend. It is not implemented:
- In Scala, because the JS/Rust code calling it needs to know the port as well. There shouldn't be any problems with adding port scanning though, if that's desired
- In Rust, because I'm not sure parsing the host and port from a string is a good idea.
- (This also applies to JS, but it *must* work in JS, and port scanning is already a dependency there so it's quite a bit easier)

- QA *will* need a new PM (`sbt buildProjectManagerDistribution` or `./run backend sbt` -> `buildProjectManagerDistribution`), and the path must be supplied as: `-engine.project-manager-path=path/to/new/pm/here`
2023-08-25 07:33:31 +00:00
somebody1234
a3377a5434
Fix "manage permissions" modal losing focus (#7628)
Fixes "manage permissions" modal losing focus after typing a single character

# Important Notes
None
2023-08-25 07:20:55 +00:00
somebody1234
6af51d7c82
Properly hide "delete all" when no items are selected (#7606)
- Fixes #7603
- "Move All To Trash" option sometimes appears even when the list is empty

# Important Notes
This appears to be caused by multiple things:
- deleting a single item does not remove it from the set of selected keys
- waiting for `project/close` to make sure a project can be `project/delete`d, takes a while.

Both issues have been fixed, by adding a new `AssetListEvent` to let the assets table to immediately remove the asset's key (its id or placeholder id) from the set of selected keys
2023-08-25 07:16:12 +00:00
Michael Mauderer
e21c5b1427
Replace old breadcrumb implementation in the top bar with new breadcrumb component. (#7619)
Implements #7312:  Replace the legacy code used for the project breadcrumbs and update them to the new design.

![Peek 2023-08-21 13-40](https://github.com/enso-org/enso/assets/1428930/32d8f066-c80d-4915-8133-6dbc1edf70b3)

![Peek 2023-08-21 13-41](https://github.com/enso-org/enso/assets/1428930/a1e5aa7e-8776-4438-9c1e-80ac1afd0292)

# Important Notes
There is some ugly code around updating the theme. This should be fixed by providing a better mechanism to re-use components with different styles. The current mechanism assumes that a component will use the same theme for every instance. Implementing this is out of scope for this task, though.
2023-08-24 22:01:46 +00:00
Michael Mauderer
a205ad79d3
Add double-arrow cursor for visualization resizing (#7644)
This commit introduces a new cursor shape, a double arrow, to be displayed during the hover over the resize grip in the graph editor's visualization component. The rotation of the double arrow depends on whether the cursor is to the left or right of the dividing line from the top left to bottom-right corner of the grip. This gives a more intuitive visual cue to users about the direction of resizing.

![Peek 2023-08-23 13-57](https://github.com/enso-org/enso/assets/1428930/d0f19205-85f3-4046-b3ef-7540030c9ab5)
2023-08-24 22:01:23 +00:00
Michael Mauderer
dbd6bff0bc
Increase visualization offset to improve ease of creating a connection. (#7620)
Fixes #7365

![Peek 2023-08-21 14-32](https://github.com/enso-org/enso/assets/1428930/64018a5b-46a2-4e91-8e87-77e091c43a73)
2023-08-24 17:01:41 +00:00
Dmitry Bushev
4203a6e778
Display only static methods when creating new node without self-argument (#7632)
close #7503

Implemented @jdunkerley's proposal https://github.com/enso-org/enso/issues/7503#issuecomment-1678852541 of filtering non-static methods when creating a new node without self-argument.

# Important Notes
![2023-08-22-162717_971x765_scrot](https://github.com/enso-org/enso/assets/357683/69a7106f-a071-4163-91c2-54aae437396e)
2023-08-23 10:21:59 +00:00
somebody1234
b3e9ea8714
Rework ide-desktop CI (#7596) 2023-08-22 18:23:30 +03:00
Dmitry Bushev
5dc2c4c5fd
Notification about the project rename action (#7613)
close #7604

After moving the rename action to the dashboard, IDE is unaware of the new project name. PR implements a new `refactoring/projectRenamed` notification that is sent from the server to clients and informs them about the changed project name.

# Important Notes
https://github.com/enso-org/enso/assets/357683/7c62726d-217e-4e69-8e48-568e0b7b8c34
2023-08-22 11:32:46 +00:00
somebody1234
06b2280ee6
New user menu (#7581)
- Closes https://github.com/enso-org/cloud-v2/issues/610
- New user menu
- Remove "go to profile" action that does not currently have an action, and does not exist in new design
- Add placeholder icons for existing actions

- Re-style "change password" modal to fit in with the design

# Important Notes
There are many differences from the design - none are visual differences though:
- The list of actions is completely different - there are no menu entries in common between the design and the current
- This also means that *all* current icons are placeholders. There are no appropriate icons in the "icons" Figma tab either.
- The user icon is still a placeholder, as there is no backend support for user icons yet.
- The user menu entries are highlighted on hover (not specified in the design), but to make this look nice, some of the padding has been moved from the outer container to the individual menu entries.
- The menu entries use the same component as the context menu, so they *do* support shortcuts, and adding shortcuts to them will be very easy, *however* no shortcuts have been set for the new actions, because they are different from the actions in the Figma design (and so they don't have an official default shortcut)
2023-08-21 15:05:57 +00:00
somebody1234
f3f2f06bd9
Sort assets (#7540)
- Closes https://github.com/enso-org/cloud-v2/issues/511
- Adds sorting. Currently supported columns: "Name" and "Last Modified"

# Important Notes
The sort arrows have a slightly thicker border (changed from 2px to 2.14px), to remove the (very small) internal hole in the Figma design. It is possible to make the shape more accurate to the original design by using a polygon (or a path) that traces around the original outline instead, but I figured it's not worth spending the extra time on a fix that may not be correct.

ℹ️ The comparison function for sorting is quite complicated. I think this is the least intrusive change for now, but it is worth considering changing `AssetsTable` to store items internally as a tree instead, and do a preorder traversal to flatten it into an array when needed.
2023-08-18 15:47:23 +00:00
somebody1234
d4e69192fd
Category switcher (#7586)
- Closes https://github.com/enso-org/cloud-v2/issues/615
- Add category switcher

# Important Notes
None of the buttons currently do anything. This is intentional, as the corresponding backend functionality does not yet exist.
2023-08-18 11:23:27 +00:00
somebody1234
de81643a72
Change context menu styling for non-macOS platforms (#7578)
- Closes #7576
- Stop using icons for non-macOS platforms, because it is non-standard to use icons
- Increase width otherwise entries will line wrap

# Important Notes
None
2023-08-18 10:25:22 +00:00
somebody1234
42db519a43
Disable shortcuts in modals (#7602)
- Fixes https://github.com/enso-org/enso/issues/7600
- Prevents all `keydown` events from propagating out of modals

# Important Notes
None
2023-08-18 09:39:25 +00:00
somebody1234
4bdc1af720
Fix z-index of top bar (#7537)
- Closes #7536
- Top bar is now below fullscreen visualizations

Other changes:
- Fully hides mouse cursor in editor view

# Important Notes
There should be basically no logic changes - check the code to be extra sure.
The main things that should be tested are:
- cursor should be hidden on top bar in the editor, and visible when not in the editor
- cursor should be visible in the "change password" modal
2023-08-18 05:04:51 +00:00
Kaz Wesley
1dfdee5808
Use Enso Font (#7516)
Use the new Enso Font; also change the anti-aliasing logic to be based on device pixel ratio, rather than platform. This will improve the clarity of font rendering on Windows/Linux machines with high pixel densities.

Design reference:

![image](https://github.com/enso-org/enso/assets/1047859/934ec9ac-52c3-4a81-a9f9-143378ecb658)

Tested on various combinations of DPR/platform:

OS X, `devicePixelRatio` = 2 (should look similar to how we were already rendering *mplus1* on OS X):
<img width="1440" alt="Screenshot 2023-08-07 at 5 46 11 PM" src="https://github.com/enso-org/enso/assets/1047859/2fdf251a-ba5e-426f-b6c4-194347a9cee4">

Windows, `devicePixelRatio` = 1.25 (should look similar to how we were already rendering *mplus1* on this platform/DPR):
![image](https://github.com/enso-org/enso/assets/1047859/55c4a129-4fff-4a9b-8e55-51a5d206e659)

Linux, `devicePixelRatio` = 1 (should look similar to how we were already rendering *mplus1* on this platform/DPR):
![image](https://github.com/enso-org/enso/assets/1047859/c5ac61f0-e3c5-43ca-8ee7-e1e04e84d35e)

# Important Notes
Style changes:
- Use the Enso Font for code in Rust, replacing the DejaVu fonts.
- Use the Enso Font in HTML: code in documentation, and error visualizations.
- Change SpanWidgets from Bold to Extra Bold, to match the design.

Implementation improvements:
- The new font download is cached (and Github-authenticated); this should eliminate a "rate limit" build failure I've
encountered in the past.
- Clean up DocSection HTML rendering a bit.
- Remove a CSS file that seems to have been superseded.
2023-08-17 18:36:12 +00:00
Kaz Wesley
d15b3db0ac
Pending nodes (#7541)
Implement *pending* node status (#7435).

Design reference:
https://user-images.githubusercontent.com/3919101/257222729-838cfe84-7447-40a3-8aa1-5424de66b0b7.png

Demo:
[vokoscreenNG-2023-08-09_22-29-13.webm](https://github.com/enso-org/enso/assets/1047859/2906599d-920f-44df-9c0f-c617ebbd5ecc)

# Important Notes
- Reduce alpha value of node backgrounds, label widgets, and method widget icons while the engine reports "pending" state.
- Use FRP and themes for method widgets.
- Update node input area to use `define_endpoints_2`.
- Also remove some code supporting the disused *profiling mode*.
2023-08-17 16:40:50 +00:00
Ilya Bogdanov
ea6fe3bbef
Fix the panic on resize to tiny window dimensions (#7594) 2023-08-17 20:37:23 +04:00
somebody1234
d11745a205
Fix validation regexes (#7499)
- Closes #7498
- Validation regex previously disallowed non-ASCII characters, now fixed
- Changes every password input to use the correct regex. For old/new passwords, it uses the regular input. For password confirmations, it uses the new password, converted to a regex. This makes it so that the password confirmation input's validation only succeeds when it exactly matches the new password.

# Important Notes
None
2023-08-17 10:32:53 +00:00
Ilya Bogdanov
02ba9a1a11
Documentation panel redesign (#7372)
* Support arguments list in the doc parser

* Support new doc sections in documentation panel

* Remove headers

* Remove outer dom and place breadcrumbs

* Fix methods icon

* Use unordered list class in css

* Improve tags styles

* Remove virtual component groups docs

* Cleanup top-level css styles

* Small adjustments to headers

* Add styles for emphasized text

* Add bold font for arguments

* Self-review

* Remove redundant placeholder struct.

* Update outdated doc.

* Avoid allocation when comparing strings.

* Avoid empty paragraph.

* Reduce allocations.

* Update test to remove empty paragraph.

* Fix rebase issues.

* Improve padding and size handling in UI themes

Added padding_x and padding_y to hardcoded theme's breadcrumb settings to ensure consistent padding. Also, these padding settings and breadcrumb_height are now used directly in the Style structure, eliminating hardcoded values in the view documentation.

* Adjusted breadcrumb background dimensions calculation.

* Add support for improper arguments formatting in documenation comments

* Do not include Icon tag into the docs

* Fix documentation panel resizing

* enso-formatter

---------

Co-authored-by: Michael Mauderer <michael.mauderer@enso.org>
2023-08-15 17:11:36 +04:00
Michael Mauderer
7f19b09d13
Sync breadcrumbs and documentation panel. (#7508)
Implements #7310.

![Peek 2023-08-09 16-07](https://github.com/enso-org/enso/assets/1428930/1a244e38-5c34-4c8b-8885-1cf84ac7b6a7)
2023-08-15 11:01:24 +00:00
Michael Mauderer
1272486a00
Fix broken text vis layout (#7532) 2023-08-14 15:31:42 +00:00
Paweł Grabarz
4a09cde7e3
Proper dropdown active area and arrow placement (#7561)
Fixes #7423

Refactored widget matching algorithm to allow creating wrapper widgets even in cases where the widget config override is present. That allowed the widgets to be reordered, such that the argument name ends up being inside the dropdown widget. That way clicking it opens the dropdown.

Added explicit manual layout for the dropdown arrow position. Now it is positioned on the center of a selected appropriate child widget. For prefix chains, the leftmost part of the prefix application (the method or constructor) is selected.

https://github.com/enso-org/enso/assets/919491/86678b9d-c04e-4545-8d11-2d1e85b9b951
2023-08-14 11:52:05 +00:00
somebody1234
937898826f
Load a maximum of one IDE entrypoint (#7570)
Fix for `showLogs` when opening a second cloud project. Alternative to #7568.
This one avoids loading the cloud's `index.js.gz`, unless it is in the cloud - and in the cloud, it only loads the first `index.js.gz`.
2023-08-14 11:28:40 +00:00
Adam Obuchowicz
334ed64b99
Simplify CB names (#7534)
1. When opening CB with source node, the type name is skipped and only method names are displayed. Fixes #7471
2. When entered Main module of some library, the module names are no longer displayed with their full qualified name.

![image](https://github.com/enso-org/enso/assets/3919101/2d1fe4ad-6391-41d6-89a1-410492457b57)

# Important Notes
Refactoring: I changed the internal representation of `ImString` to `Rc<str>` instead of `Rc<String>` to reduce the number of allocations and memory jumps. I even tried to remove `ImString` altogether, but it was not easy, and the main problem was lacking Default implementation.
2023-08-14 07:22:50 +00:00
Adam Obuchowicz
fd972f8b0a
Change shortcut for opening Component Browser to enter (#7527)
This was meant to be a trivial change, but actually a dirty workaround needed to be applied. Because enter is used  to both open searcher and accept input/entry, both actions were fired at once. I fixed it by debouncing opening searcher event (so the searcher will be opened only once key event handling is over)
2023-08-11 18:05:17 +00:00
Michał Wawrzyniec Urbańczyk
87f5ea021f
Fixes for importing project bundles (#7558)
This fixes a few issues:
* support for `enso-project` bundles that were compressed in a way that includes leading `./` in the paths;
* partially undos #7305 — projects won't be renamed on import.

Many thanks to @somebody1234 for the help.
2023-08-11 16:30:49 +00:00
Ilya Bogdanov
9f4a5f90c0
Correctly display connections to lambdas (#7550)
Closes #7261

It's impossible to connect to the lambda arguments, but they are displayed as in code, and the correct span tree is generated for the lambda body. (hence you can connect to items inside)

https://github.com/enso-org/enso/assets/6566674/60af6413-e1b9-4e8c-a958-2906b5534d62
2023-08-11 14:45:15 +00:00
somebody1234
2cc35fde01
Fix IDE bug on cloud backend (#7564)
Fixes cloud projects not being able to be opened.
The cause is because the IDE React component was calling `document.body.removeChild()`, but the script was being added to `document.head`. The `removeChild()` has now been replaced with `child.remove()` to prevent this from happening again.

# Important Notes
None
2023-08-11 12:42:11 +00:00
Ilya Bogdanov
c2ca848d6d
Display user-provided project name in the top bar (#7533)
Closes #7409

https://github.com/enso-org/enso/assets/6566674/d4cb6733-dc9f-454e-ba1b-e76260bda467

# Important Notes
A new config parameter was added, `startup.displayedProjectName`. When connecting IDE to the LS, it must be provided directly with the `rpcUrl` and `dataUrl` parameters. If not provided, `startup.project` will be displayed in the IDE instead. Remember that `startup.project` must be a valid Enso project name, so-called `normalized name`.
2023-08-11 12:32:46 +00:00
somebody1234
e035b2d50a
localStorage manager (#7467)
Closes https://github.com/enso-org/cloud-v2/issues/571
- Moves all interaction with `localStorage` into a `LocalStorage` class
- Saves and loads current tab (dashboard, or IDE)
- Saves and loads currently open project

Unrelated fixes:
- Changes authentication toast notifications to replace loading toast, rather than creating a new toast

# Important Notes
⚠️ `remoteLog` has not been parametrised with `projectId` (and `sessionId` for cloud projects)

There are several places that previously used manual `localStorage.setItem` and `getItem`:
- Whether the templates list is currently open
- The current project management backend (local, or cloud)
- The path to the current directory is (as far as I can tell) obsolete, as the new directory view always displays the root directory, and so it has been removed
2023-08-11 05:16:54 +00:00
somebody1234
f1c224e62e
New context menu (#7431)
Closes https://github.com/enso-org/cloud-v2/issues/560
- New context menu
- Global keyboard shortcut handler
- Moves the existing "escape" keybindings (close modal, cancel editing names) to global keybind handlers

# Important Notes
- The "Upload To Cloud" action is not present in the Figma design. As such:
- Its current icon is an edit of the "cloud_from" icon, with the arrow upside down
- It does not have a corresponding keyboard shortcut
2023-08-10 15:31:53 +00:00
somebody1234
af0e738dec
New sharing menu (#7406)
- Closes https://github.com/enso-org/cloud-v2/issues/561
- New "Invite" modal
- Change autocomplete multi-select behavior
- Fix scrolling for autocomplete
- Scrolling when there are many users with permissions
- New backend permissions

- ⚠️ Intentional differences from Figma design:
- The permission type selector (the secondary modal) is slightly wider. This is because of minor changes to the text - check thread for details.
- The permission type selector for sharing with new users (the top one, next to the input) is vertically offset 4px more than usual. This is intentional; it means there is roughly the same spacing on either side of the input's border, and also means there is spacing between the "invite" button and the permission type selector
- Many buttons are faded out (`opacity-50`) when they are not interactable.
- Text changes
- "Invite" changes to "Share" in blue button
- "File" changes to "<asset type>" in permission type selector

# Important Notes
Some options don't work because the backend representation for permissions is currently different - in particular, the `admin`, `edit`, and `read` permissions, and the `docs` sub-permission.

ℹ️ Currently only works with new backend permissions - i.e. `ENVIRONMENT` must be `'pbuchu'` in `config.ts`.
2023-08-10 09:09:31 +00:00
Adam Obuchowicz
5d6f902383
Hide private entries in Component Browser (#7497)
As in description.

Fixes #7464
2023-08-09 11:07:13 +00:00
somebody1234
0e20644e47
Upload and download .enso-projects from the local backend (PM backend) (#7305)
- Closes https://github.com/enso-org/cloud-v2/issues/478
- Download local project as `.enso-project` archive
- Requires latest nightly version of Project Manager
- Closes https://github.com/enso-org/cloud-v2/issues/510
- Allow uploading `.enso-project` to local backend
- Closes https://github.com/enso-org/cloud-v2/issues/477
- Promote local project to cloud
- Currently errors with 500 (when uploading a small bundle) or 413 (when uploading a large bundle). May be fixed soon

# Important Notes
The "upload project to cloud" context menu action does not currently have an entry in the new context menu, so that will probably need an official design at some point
2023-08-09 09:30:40 +00:00
Adam Obuchowicz
59329bd59a
New Top Bar (#7488)
Fixes #7411

So far, this branch removes window control buttons and go-to dashboard (hamburger icon), and adds option for dashboard to set offset of the rest of top bar panels.
2023-08-08 15:23:41 +00:00
somebody1234
4fe399feed
Fix dispatching events to assets table (#7430)
* Fix creating first local project

* Fix ESLint warning

* Fix bug

* Fix bug

* Remove `isRunning` from row state

* Fix row state resetting when placeholder is being forcefully shown

* Remove `forceShowPlaceholder` option from `table.tsx`

* Rename `DirectoryView` to `DriveView`

* Attempt to fix events

* Always keep `Delete` action enabled

On the local backend, now waits for project to fully open before deleting

* Only allow one project open at a time

* Fix "invalid params" error when creating new project

* Fix "invalid params" when creating many projects quickly

* wip: Fix cloud project loading modal not being dismissed

* Maybe fix opening cloud project after refresh

`/open` is no longer sent according to DevTools

* wip: Switching to local backend with cloud project open results in "invalid params"

* Fix "invalid params" when switching to local backend with cloud project open

* Fix logic for showing errors on buttons

* Don't close project when switching backend

* Fix minor error
2023-08-06 16:21:19 +02:00
Michał Wawrzyniec Urbańczyk
90e3f9ccef
Introducing new notifications to the GUI (#7458)
This PR replaces statusbar and popup components with the new notification API.

I have moved debug mode status notification to the bottom of the window, so it is separate from other notifications.

![obraz](https://github.com/enso-org/enso/assets/1548407/0e28bdd5-3567-4d8c-b580-d53099a00715)

![obraz](https://github.com/enso-org/enso/assets/1548407/47468d56-c4fc-4a0a-876d-2b059509a29c)

![obraz](https://github.com/enso-org/enso/assets/1548407/359dd764-305a-4a75-b9a4-75674bcc9990)
2023-08-04 16:48:23 +02:00
Adam Obuchowicz
6534d0a925
Two fixes: hidden CB entry and scrolling in text vis. (#7475)
Fixes #7405 
Fixes #7445 

The "hidden entry" bug was caused by wrong component browser position and size set when all displayed entries fit the viewport.

The scrolling issue was due to change various "hover rectangles" order - some were above the scroll bars.
2023-08-04 14:55:25 +02:00
Kaz Wesley
ed8dcaa128
Fix CB scoring for new label format. (#7484)
- Tweak the definition of "first-word match" so that, now that all components except aliases contain `.`, the delimiter doesn't result in penalizing non-alias matches.
- Fix matching of aliases containing spaces, and add test.
2023-08-03 08:34:26 +00:00
Michael Mauderer
cd29305473
Fix broken text vis layout on slow loading (#7429) 2023-08-03 08:07:53 +00:00
Nikita Pekin
acce6108d9
impr(cloud-v2#494): Remove OpenSSL as a dependency (#7404)
* add npekin auth config

* fix: use rustls

* remove native-tls

* impr: update npekin pool details

* set env to production

* remove deps

* prettier
2023-08-02 12:11:53 +02:00
somebody1234
6f90711f0f
Auth flow improvements (#7451)
* Improvements to sign up flows

* Change "offline" text to "not signed in"

* Debounce validation
2023-08-02 11:43:06 +02:00
Adam Obuchowicz
a80024a667
Fix Component Browser Preview (#7441)
Fixes #7006
Fixes #6999

Fixed several issues around visualizations:
1. The visualizations of previewed CBs are displayed. For some reason, the code which showed them wasn't there.
1. The AST ID is assigned to view ID before attaching visualization. This makes previews work in the first place.
2. The visualizations are restored after fixing an error on node.
2023-08-02 08:58:53 +00:00
Paweł Buchowski
74551b3188
Add missing cognito oauth scope (#7450)
For some reason, the hosted UI for both email and password and SSO, as well as the `Auth.federatedSignIn({provider: 'Google'})` call require the `aws.cognito.signin.user.admin` scope to be enabled to fetch and update user attributed. However, a call to `Auth.signIn(email, password)` does not. This is not well documented in AWS Cognito.

# Important Notes
`aws.cognito.signin.user.admin` gives you access to all Cognito User Pool APIs. Which federatedSignIn with google provider uses to get `currentUserInfo()` where we store optional `organizationId`. It does not provide any admin level access to other cognito or AWS parts.
2023-08-01 15:50:16 +00:00
somebody1234
7441a9a62c
Fix .png and .svg loading errors (#7442)
* Fix resource building

* Simplify plugin regex

* Include `.svg` files in regex
2023-08-01 13:08:31 +02:00
somebody1234
ece18537e4
New top bar (#7392)
* wip

* wip

* New backend switcher

* New user bar (user and chat buttons)

* Page switcher

* New search bar; minor style fixes

* Address QA

* Refactor HTML `button`s into `Button` component

* Add cloud color back to Tailwind

* Fix icons shrinking

* Fix bug

---------

Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
2023-08-01 11:32:32 +02:00
somebody1234
c1e24629b0
Fix startup.project (#7393) 2023-07-31 19:52:28 +02:00
Dmitry Bushev
8416e19eef
Refactor project normalized name (#7444)
Followup to #7397. When started this refactoring I only changed the config types and forgot to change the API.

Changelog:
- refactor: rename `projectModule` to `projectNormalizedName` in the API

# Important Notes
https://github.com/enso-org/enso/assets/357683/a840dc90-15f8-4b6d-bbfb-571c53cd2f7d
2023-07-31 17:47:28 +00:00
somebody1234
7fbf9ca697
Fix opening projects after switching backend (#7439)
* Fix opening projects after switching backend

* Use cloned config options everywhere else
2023-07-31 18:42:32 +02:00
Ilya Bogdanov
73237b7b25
Rearrange CB panels (#7350)
Closes #7244

- Section navigator removed
- Added a button panel on top of the documentation
- Show/hide documentation panel button is functional, documentation panel has animation.
- All other buttons are read-only (unclickable).
- "Hovered item preview" caption was removed from the documentation panel
- Breadcrumbs are flying in the temporary position. They should be functional but will be moved to the documentation panel in a separate task.
- Sizes and layouts of the CB panels match the design.
- The color of the application background changed. Also fixed a bug because of which the stylesheet setting of the background was not taken into account.

Known issues:
- ~~The buttons panel partially hides the topmost entry in the list. To fix that, we would need API changes to the grid view, I decided not to do that as part of the PR. We need to add padding on top of the scroll area content.~~
- Scrollbar is not rendered correctly at the bottom – the scroll area mask should crop it.
- Component list entries are not exactly as in design – I didn't touch this part of the code.
- Breadcrumbs are in the wrong position.

https://github.com/enso-org/enso/assets/6566674/409bebb5-572a-4760-852d-f666124689a2
2023-07-31 15:33:54 +00:00
Michael Mauderer
e5a20ee15e
Refactor icons and breadcrumbs into separate crate. (#7419)
Implements #7363
2023-07-31 11:54:05 +00:00
Adam Obuchowicz
1cb0314c56
Fix panic when closing project while some GUI elements are still in executor. (#7422)
Fixes #7301

When dropping the entire Application, we were removing the scene first, and only then the executor. But when executor had tasks containing still some GUI elements, those elements tried to reach scene on drop, what caused panic.

Here we clear the executor earlier, so the scene is deleted when nobody should try to access it.
2023-07-31 09:36:58 +00:00
somebody1234
fe160ac287
Fix dashboard regressions (#7414)
* Fix dashboard regressions

* Restore templates spinner

* Fix bug

* Fix bug

* Faster reactive event implementation

* Fix event implementation; fix "New Project" button; fix `uniqueString`

* Fix infinitely loading project spinner

* Fix infinitely loading template spinner

* Minor documentation change

* Stop template spinners when switching backends
2023-07-29 10:19:31 +02:00
Kaz Wesley
4fc6587d13
New fuzzy matching (#7381)
Implements [#7046.](https://github.com/enso-org/enso/issues/7046#issuecomment-1619773935)

# Important Notes
- See the [`fuzzly` test cases](https://github.com/enso-org/enso/pull/7381/files#diff-404962eed98004838415da4bd7b615e37a1ca6dbf0ba2b63edcb5217750cdbeeR549-R721) for examples of matching/non-matching cases.
- See the [searcher controller test cases](https://github.com/enso-org/enso/pull/7381/files#diff-24f2a3397bcd5d4f076625fb761d4de594b8ef5b742c7fd6088f5fe6d6e3378bR230-R289) for examples of ordering according to the new scoring criteria.
2023-07-28 17:35:07 +00:00
Dmitry Bushev
80c4b1ca06
Allow users to give a project other than Upper_Snake_Case name (#7397)
close #6356

Allow arbitrary names for user projects.

# Important Notes
https://github.com/enso-org/enso/assets/357683/55a3b660-af23-4b09-959b-eac515766788
2023-07-28 13:44:39 +00:00
Michael Mauderer
d272d627cb
Updated breadcrumb UI to new design (#7362)
Implements ##7199

![image](https://github.com/enso-org/enso/assets/1428930/7658598b-62d4-471d-bf9d-be80ac978013)
2023-07-27 16:10:07 +02:00
Paweł Grabarz
bb39eeb12f
New node design (#7311)
Fixes #6552
Fixes #6910
Fixes #6872

Implementation of new node design. Includes many changes related to stylesheet update handling and per-style FRP construction, as well as refactoring of scene layers used by graph editor. Some additional components were migrated to use `Rectangle` shape and new mouse handling events. Fixed text rendering, where random thin lines appeared at the borders of glyph sprites. Refined edge layout to match new node sizes and not leave any visible gaps between line segments.

The node colors are currently randomly selected from predefined list. Later this will be improved to use group information from the suggestion database, once that is fully migrated to use the documentation tags, thus removing the dependency on the execution context.


https://github.com/enso-org/enso/assets/919491/aa687e53-a2fa-4e95-a15f-132c05e6337a


<img width="653" alt="image" src="https://github.com/enso-org/enso/assets/919491/30f3e897-62fc-40ea-b57b-124ac923bafd">
2023-07-27 13:00:47 +00:00
somebody1234
e4357f8890
Background translucency (#7386)
* Set translucency options

* Vibrancy on Windows

* Use explicit background image instead of vibrancy

* Attempt to fix `ide build`

* Fix lint warning

* Remove background from authentication flow

* Fix background image and position

---------

Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
2023-07-27 10:53:00 +02:00
Kaz Wesley
828d160c56
Introduce new focus APIs, and use for CB (#7167)
Introduce new APIs for managing focus and using focus to inform delivery of keyboard events.

Use new APIs to implement the following behavior:

Focus:
- If the component browser is opened, its initial state is *focused*.
- If the node input area's text component is clicked, the component browser's state becomes *blurred*.
- If a click occurs anywhere in the component browser, the component browser's state becomes *focused*.

Event dispatch:
- When the component browser is in the *focused* state, it handles certain keyboard events (chiefly, arrow keys).
- If the component browser handles an event, the event is not received by other components.
- If an event occurs that the component browser doesn't handle, the node input area's text component receives the event.

[vokoscreenNG-2023-06-29_10-55-00.webm](https://github.com/enso-org/enso/assets/1047859/f1d9d07c-8c32-4482-ba32-15b6e4e20ae7)

# Important Notes
Changes to display object interface:
- **`display::Object` can now be derived.**
- Introduce display object *focus receiver* concept. Many components, when receiving focus, should actually be focused indirectly by focusing a descendant.
- For example, when the CB Panel receives focus, its descendant at `self.model().grid.model().grid` should be focused, because that's the underlying Grid View, which has its own event handlers. By allowing each level of the hierarchy to define a `focus_receiver`, focus can reach the right object without the CB panel having to know structural details of its descendants.
- When delegating to a field's `display::Object` implementation, the derived implementation uses the child's `focus_receiver`, which will normally be the correct behavior.

**Changes to `shortcut` API**:
- New `View::focused_shortcuts()` is a focus-aware alternative to `View::default_shortcuts()` (which should now only be used for global shortcuts, i.e. shortcuts that don't depend on whether the component is focused). It's based on the *Keyboard Event* API (see below), so events propagate up the focus hierarchy until a shortcut is executed and `stop_propagation()` is called; this allows sensible resolution of event targets when more than one component is capable of handling the same keypress.

Keypress dataflow overview:
DOM -> KeyboardManager -> FrpKeyboard -> KeyboardEvents -> Shortcut.

Low-level keyboard changes to support Focus:
- New `KeyboardManager`: Attaches DOM event handlers the same way as `MouseManager`.
- New *Keyboard Event* API: `on_event::<KeyDown>()`. Events propagate up the focus hierarchy. This API is used for low-level keyboard listeners such a `Text`, which may need complex logic to determine whether a key is handled (rather than having a closed set of bindings, which can be handled by `shortcut`).
- FRP keyboard: Now attaches to the `KeyboardManager` API. It now serves primarily to produce Keyboard Events (it still performs the role of making `KeyUp` events saner in a couple different ways). The FRP keyboard can also be used directly as a global keyboard, for such things as reacting to modifier state.

Misc:
- Updated the workspace `syn` to version 2. Crates still depending on legacy `syn` now do so through the workspace-level `syn_1` alias.
2023-07-26 22:13:48 +00:00
somebody1234
b62c3d7867
Update assets table design (#7377)
* wip: refactor all tables into one single `AssetsTable`

* wip: Continue merging the four asset tables; make files type-error-free

* Get table working again

* Prepare for nested directories; insert new items at correct position

* Save extra columns state; minor style fixes

* Make tab toggle bar sticky

* Rename array.withItemsInsertedAtBoundary

* Fix minor bug; adjust dropzone appearance

* Indentation for nested assets; fetching nested assets; svg color changes

* New appearances for permission display; minor fixes for "shared with" modal

* Address issues

* Minor bug fixes

* New assets upload bar

* Adjust permission display and table cell borders

* Adjust styling

* Change `toastAndLog` to a hook

* Address issues

* Make table full-width

---------

Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
2023-07-26 14:59:48 +02:00
Michał Wawrzyniec Urbańczyk
7211c8317d
New notification system (#7339)
This PR consists of two primary changes:
1. I've replaced `react-hot-toast` with `react-toastify` library. Both serve the same purpose — sending popup notifications (so-called "toasts"). However, the latter comes with a richer feature set that matches our requirements much better.
2. I've exposed the relevant API surface to the Rust. Now Rust code can easily send notifications.

### Important Notes
At this point, no attempt at customizing style of notifications was made (other than selecting the "light" theme). 

Likely we should consider this soon after integration as a separate task.
2023-07-24 21:58:53 +02:00
Adam Obuchowicz
1d2371f986
Groups in DocTags (#7337)
Fixes #7336 in a quick way.

Next to the old way of defining groups, the library can just add `GROUP` tag to some entities, and it will be added to the group specified in tag's description.

The group name may be qualified (with project name, like `Standard.Base.Input/Output`) or just name - in the latter case, IDE will assume a group defined in the same library as the entity.

Also moved some entities from "export" list in package.yaml to GROUP tag to give an example. I didn't move all of those, as I assume the library team will reorganize those groups anyway.

### Important Notes

@jdunkerley @radeusgd @GregoryTravis When you will start specifying groups in tags, remember that:
* The groups still belongs to a concrete project; if some entity outside a project wants to be added to its group, the "qualified" name should be specified. See `Table.new` example in this PR.
* If the group name does not reflect any group in package.yaml **the tag is ignored**.
* A single entity may be only in a single group. If it's specified in both package.yaml and in tag, the tag takes precedence.

---------

Co-authored-by: Ilya Bogdanov <fumlead@gmail.com>
2023-07-24 15:54:16 +02:00
somebody1234
3e3b823620
Add option to skip logging in (#7282)
Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
2023-07-21 15:14:48 +02:00
Adam Obuchowicz
8923aa98da
New Components Order (#7327)
Fixes #7198 
Fixes #7318 

https://github.com/enso-org/enso/assets/3919101/4aead1e2-de01-4b6e-aa12-403af0b3c677

This PR changes the way components are kept in the controllers to allow mixing different groups when filtering. On this occasion, the code was greatly simplified:
* Instead of identifying entries by section, group and entry ID we have just a single EntryId representing position on the list. This way the view was simplified.
* Removed support for headers in Component Grid (but the Grid View still has this feature).
* Removed remnants of the old searcher and "actions".

Also, this PR fixes #7201. I decided that the top modules will have full path (namespace, library and module name), so they will be displayed as `Standard.Base.Data` instead of just `Data` (so it's clear we're browsing part of the standard library.

### Important Notes

The searcher's breadcrumbs controller is in not very nice state, but it will be revised anyway, as the breadcrumbs will be synchronized with documentation panel in the new design.
2023-07-21 12:11:39 +02:00
Paweł Buchowski
d8d467f62b
set background throttling to false by default (#7319) 2023-07-20 13:54:19 +02:00
dependabot[bot]
381081e903
Bump word-wrap from 1.2.3 to 1.2.4 in /app/ide-desktop (#7331)
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dmitry Bushev <bushevdv@gmail.com>
2023-07-19 18:11:44 +03:00
somebody1234
ce33af82f7
Split dashboard.tsx into smaller components (#6546)
* Consistent order for statements in `dashboard.tsx`; change functions back to lambdas

* Create convenience aliases for each asset type

* Remove obsolete FIXME

* Refactor out column renderers into components

* Enable `prefer-const` lint

* Remove hardcoded product name

* Add fixme

* Enable `react-hooks` lints (not working for some reason)

* Consistent messages for naming-convention lint overrides

* Enable `react` lints

* Extract out tables for each asset type

* Refactor out column display mode switcher to a file

* Switch VM check state to use an enum

* Fix lint errors

* Minor section change

* Fix position of create forms

* Fix bugs; improve debugging QoL

* Add documentation for new components

* Refactor out drive bar

* Refactor out event handlers to variables

* Minor clarifications

* Refactor out directory view; some fixes; improve React DX

There are still many issues when switching backends

* Add `assert`

* Use `backend.platform` instead of checking for properties

* Fix errors when switching backend

* Minor style changes; fix lint errors

* Fix assert behavior

* Change `Rows` to `Table`

* Fixes

* Fix lint errors

* Fix "show dashboard" button

* Implement click to rename

* Fix lint errors

* Fix lint errors (along with a bug in `devServiceWorker`)

* Enable dev-mode on `ide watch`

* Fix bug in `useAsyncEffect` introduced during merge

* More fixes; new debug hooks; fix infinite loop in `auth.tsx`

* Inline Cognito methods

* Remove redundant `Promise.resolve`s

* Fix column display

* Fixes

* Simplify modal type

* Fix bug when opening IDE

* Shift+click to select a range of table items

* Implement delete multiple

* Fixes

* Tick and cross for rename input; fixes

* Implement rename and delete directory and multi-delete directory; fixes

* Optimize modal re-rendering

* Make some internal `Props` private

* Remove old asset selection code

* Eliminate re-renders when clicking document body

* Fix name flickering when renaming

* Use static placeholders

* Avoid refreshing entire directory on rename

* Use asset name instead of ID in error messages

* QoL improvements

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

* Extract dashboard feature flags to its own module

* Feature flag to show more toasts; minimize calls to `listDirectory`

* Deselect selection on delete; hide unused features; add exception to PascalCase lint

* Fix projects disappearing after being created

* Fix name of `projectEvent` module imports

* Re-disable delete when project is being closed

* Fix assets refreshing when adding new projects

* Refactor row state into `Table`; fix delete not being disabled again

* Address review

* Implement shortcut registry

* Fix stop icon spinning when switching backends (ported from #6919)

* Give columns names

* Immediately show project as opening

* Replace `asNewtype` with constructor functions

* Address review

* Minor bugfixes

* Prepare for optimistically updated tables

* wip 2

* Fix type errors

* Remove indirect usages of `doRefresh`

Updating the lists of items will need to be re-added later

* Remove `toastPromise`

* Fix `New_Directory_-Infinity` bug

* wip

* WIP: Begin restoring functionality to rows

* Fix most issues with DirectoriesTable

* Port optimistic UI from `DirectoriesTable` to all other asset tables

* Fix bugs in item list events for asset tables

* Merge `projectActionButton` into `projectsTable`

* Remove `RenameModal`; minor context menu bugfixes

* Fix bugs

* Remove small default user icon

* Fix more bugs

* Fix bugs

* Fix type error

* Address review and QA

* Fix optimistic UI for "manage permissions" modal

* Fix "share with" modal

* Fix template spinner disappearing

* Allow multiple projects to be opened on local backend; fix version lifecycle returned by local backend

* Fix minor bug when closing local project

---------

Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
2023-07-19 11:48:39 +02:00
Ilya Bogdanov
f23c506e11
New icons, part 1 (#7296)
Partially addresses #7260

A few new icons were added, and a few older ones were modified to match the new design.

This set of icons should be enough to cover our needs before the release.

- Compass icon for visualizations
- Unstable
- Command key
- Right side panel
- Array.new
- Local scope icon modified
- Clock icon modified
- Calendar
- Expand from the node's action bar
- Eye from action bar modified

Screenshots:
<img width="159" alt="Screenshot 2023-07-14 at 17 08 29" src="https://github.com/enso-org/enso/assets/6566674/286f2c1c-f5c1-4b56-a75a-7abcad191c51">
<img width="404" alt="Screenshot 2023-07-14 at 17 08 12" src="https://github.com/enso-org/enso/assets/6566674/e3f27e47-04ef-4bdd-9bb0-126936ccb27d">
<img width="1511" alt="Screenshot 2023-07-14 at 17 08 00" src="https://github.com/enso-org/enso/assets/6566674/307ac334-a423-46d6-b614-47cf1295ddd0">
<img width="728" alt="Screenshot 2023-07-14 at 17 08 05" src="https://github.com/enso-org/enso/assets/6566674/e63a4327-d640-4904-989b-ad1f0e83e497">

# Important Notes
No visual changes to the IDE itself, but I swapped the definitions of `HalfPlane` and `BottomHalfPlane` - now they reflect their names.
2023-07-18 13:27:40 +00:00
somebody1234
457d0986b6
Help chat (#7151)
* wip

* wip 2

* wip

* Copy types from bot

* wip

* Send and display messages

* wip: shadow

* Copy styles from design screenshot

* Fix "create new thread" button

* Fix switching threads

* wip

* Scrollback

* Reactions

* Fix issues with chat input sizing

* Update changelog

* Fix bugs; add scroll to thread list

* Use types from backend definitions

* Update git commit of chat backend; remove stray file path

* hotfix: fix "edit thread" shortcut on macos

* Address issues

* Extract chat header to separate component

* Begin matching appearance with Figma

* Show reaction bar on hover

* fix small scrollbar appear next to the message input

* Disallow sending empty messages

* Add chat URL to config - production URL will be added soon

* add production chat url

* fix linters

---------

Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
2023-07-18 13:23:41 +02:00
Ilya Bogdanov
67f7d33801
Redesign IDE top bar (#7249)
Closes #7200

Updating the looks of the project's top bar to the new design. 

- Project name moved from breadcrumbs to the left of the execution environment selector.
- All components use auto-layout in most places, except for breadcrumbs (changing them means basically rewriting them from scratch, but we will use CB's breadcrumbs instead)
- Components no longer rely on individual positioning but rather work as parts of the "project view top bar" abstraction (with the use of auto-layout)
- We have a new debug scene for the project view top bar, replacing the debug scene for execution environment selector.
- Most style parameters were moved to the stylesheet, except breadcrumbs.
- Top bar is now fully managed by the Project View, not Graph Editor
- Project name is no longer editable. There is no way to rename a project inside the IDE (the corresponding code is removed). It can react on mouse hovers, but the color will not change for now.
- Current execution environment has extra bold font and is no longer capitalized.
- **Breadcrumbs can be considered broken** from the design point of view. I have no intention of making them look as in the design because we want to reuse CB's breadcrumbs component instead. The functionality should be fully preserved, though.
- The Play Icon on the execution environment selector is not updated to the newest design, I suggest creating a separate task for that (I think it is the first case of a rounded triangle in the application, and implementation would some time).


https://github.com/enso-org/enso/assets/6566674/16747c02-15b2-4806-ace3-6f03c98040f1
2023-07-18 12:35:07 +02:00
Michael Mauderer
6f3f8cadf9
Bump electron to 25.3. (#7285)
Fixes #7284.
2023-07-18 08:18:18 +00:00
Ilya Bogdanov
3273ab654d
Hide error message on execution success (#7268)
Closes #7003

Hides annoying "Execution failed" message when the execution is fixed (when we receive ExecutionComplete message)

Also renamed `ExecutionFinished` notification to `ExecutionComplete`, to better reflect the new behavior.


https://github.com/enso-org/enso/assets/6566674/156e19f8-3cdd-4b60-98fb-565746650343
2023-07-14 16:35:07 +00:00
Ilya Bogdanov
383514ee97
Fix error visualization positioning (#7267)
Fixes #7256

Sadly no resizing for error vis yet, it is far too complicated and requires a separate task.


https://github.com/enso-org/enso/assets/6566674/77ddbe78-7f27-41d1-9f63-5dd1d717ecd3
2023-07-14 15:22:20 +00:00
Adam Obuchowicz
853dd2f455
Revert "Show spinner when opening/creating a project, take #2 (#6827)" (#7229) 2023-07-14 15:00:52 +00:00
somebody1234
b042807790
Fix offline mode (#7250)
* Fix offline mode

* Remove `authentication=false` from URL when logging in

---------

Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
2023-07-13 15:35:30 +02: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
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
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
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
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