Commit Graph

785 Commits

Author SHA1 Message Date
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
Michael Mauderer
66201dc94c
New Prototype AI Searcher (#7146)
Adds a new bare-bones AI searcher that can be triggered with `cmd+tab`. It will interpret the searcher input as a prompt to an AI model and replace the created node with the suggestion that was computed.

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

Implements the first step of #7099.

# Important Notes
Contains some refactoring that allows us to have multiple controllers side by side. So QA testing should make sure that the Component Browser Searcher is still working as before.
2023-07-07 12:47:10 +00:00
Dmitry Bushev
e7a0312298
Reload externally changed file on a keypress (#7217)
part of #7178

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

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

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

* A prototype of hover handling

* Revert "Special noncapturable-nonbubbleable events"

This reverts commit abdc0cf7eff9aba44656d959f6736250c69bf206.

* Make it consistent with docs

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

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

* Optimize a bit

* Extends docs

---------

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

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

* Address review

* Minor bugfixes

---------

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

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

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


<img width="657" alt="image" src="https://github.com/enso-org/enso/assets/919491/40e5963d-0717-4662-abf4-b9687aa921ed">
2023-07-05 19:10:57 +00:00
Michael Mauderer
cd7f17a0e4
Remove connections for a node that is being deleted. (#7185)
Fixes https://github.com/enso-org/enso/issues/7135

https://github.com/enso-org/enso/assets/1428930/85433a69-03dc-4ad9-9563-717a78ff6ff8
2023-07-05 15:28:20 +00:00
somebody1234
b243a5f529
Support signing up to an existing organization (#7145)
* wip

* wip. includes broken code

* Pass organization id when user is created

* Make backend endpoints properly error

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

* Stop trying to load Project Manager on cloud dashboard
2023-07-04 10:34:13 +02:00
Adam Obuchowicz
01d1560b2c
Preview keeps showing when cursor is over it, preventing flickering (#7158)
Fixes #6379

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

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

Also discovered that the visualization chooser is not visible or looks ugly when visualization with HTML elements is shown over the nodes, so I made it not being visible on previews.
2023-07-03 08:47:12 +00:00
Michał Wawrzyniec Urbańczyk
8e56280821
Delay URM reset until the async initialization is done. (#7121) 2023-07-02 12:40:35 +02:00
Michał Wawrzyniec Urbańczyk
9134b1ecf4
Don't start Enso automatically after installation completes. (#7175) 2023-07-02 12:33:27 +02:00
somebody1234
8504295e5e
Separated templates and directory list (#6995)
Closes https://github.com/enso-org/cloud-v2/issues/490:
- Make templates collapsible
- Add scroll-based shadow to templates
- Move scrollbars from body to templates and directory listing

# Important Notes
None
2023-06-30 13:59:34 +00:00
Paweł Grabarz
cb9d4c4607
move method icon definition to documentation tag (#7123) 2023-06-29 14:48:55 +00:00
Adam Obuchowicz
58c81f2975
Bump electrion version (#7134)
On my machine, I had a weird problem with shaders failing to link (without any meaningful error message). It was caused by my system upgrade - old packages had the issue as well. Bumping electron version fixed the issue.
2023-06-29 12:50:07 +00:00
Adam Obuchowicz
24bdb1cf8a
Do not adjust node position when created under mouse cursor. (#7136)
Fixes #7064

Because our position adjusting mechanism was very confusing for users, especially on edge drops, this PR disables this adjusting for the cases where node is about to be put under the mouse pointer.
2023-06-29 12:24:41 +00:00
somebody1234
b4d0a40c7d
(even more) Dashboard fixes (#6919)
* Change cdn domain

Fixes cloud-v2/#484

* Remove modal from file upload flow

Fixes part of cloud-v2/#483

* Add optimistic UI; add more toast messages

Fixes part of cloud-v2/#483

* Handle `authentication` and `new-dashboard` flags correctly

Fixes cloud-v2/#481

* Fix bugs

* Use offline mode when `-authentication=false`

* Stop row from resizing when loading permissions

* Fix issues

* Navigate back to login screen on registration success

* Prevent scrollbar flickering

The scrollbar still blinks when switching backends, but it now does not resize. The blinking seems to be very difficult to avoid.

* Stop modal close button from overlapping text

* Fix stop icon spinning when switching backends

Remote backend not tested

* Remove modal from files table plus button

* Scrollbar-aware column count
2023-06-28 14:35:20 +02:00
Jaroslav Tulach
477dd82670
Drop-down widgets for extension functions via UnresolvedSymbol (#7115)
Fixes #6955 by:
- using `visualisationModule` to specify the module where the visualization is to be used
- referring to method in `Meta.get_annotation` with `.method_name` - e.g. unresolved symbol notation
- evaluating arguments to `Meta.get_annotation` in the context of the user module (which can access the extension functions)
2023-06-27 15:19:42 +00:00
Hubert Plociniczak
4e5cb9cca6
Consistent naming of visualization (#7124) 2023-06-26 17:04:35 +00:00
Adam Obuchowicz
1847beaf1f
Do not clear method pointer on pending updates (#7110)
Fixes #6851 - because we're keeping the method pointer, the widgets and ports does not disappear upon receiving "Pending" update.

https://github.com/enso-org/enso/assets/3919101/112cc7be-eb31-444d-a0c8-d69c2013d47d
2023-06-26 09:44:51 +00:00
somebody1234
74527eaa8f
Extract SVGs to files (#7076)
* Extract SVGs to individual files

Probably not working for cloud frontend (`watch-dashboard`, `build-dashboard`) yet

Dynamic SVGs were not extracted out

* Make file SVGs work for `watch-dashboard` and `build-dashboard`

* Document SVG loaders

* Address QA issues
2023-06-23 10:47:04 +02:00
Paweł Grabarz
c769215214
fix dragging out edge from node output (#7108)
Fixes #7102

The edge can now again be created both by clicking or dragging the output port.
2023-06-22 13:00:59 +00:00
Michael Mauderer
0abc2d5023
Fix fast typing leading to wrong component browser selection. (#7032)
Fixes #6908

Fast typing leads to a race condition where the end of the node editing can happen where the state of the CB is not caught up yet. This leads to two issues:

1. The wrong selection is made, as the View of the Component Browser has not been updated yet, but the selection from there is used to determine how the node is created.
2. Processing of the keys is aborted early, while still waiting for additional key input.

This is now fixed.

https://github.com/enso-org/enso/assets/1428930/dce82bb3-1c25-4a67-988a-d74469dc8fcd
2023-06-22 07:50:18 +00:00
Ilya Bogdanov
e18ffb7ca0
Replace Tailwind with custom CSS rules in documentation panel (#6978)
Closes #6705

This PR removes Tailwind from dependencies of the documentation panel and also brings some essential design improvements.

List of fixed things:
- Massive refactoring, removing unnecessary HTML tags, and simplifying the overall layout.
- Spacing to the right of the bullet in the bullet lists is much smaller. Bullets also have the same color as the following text.
- Paddings before headers increased.
- Colon used instead of the comma between the method link and its summary.
- Module or type names in the top header are now delimited by `.`, which matches the Enso language.
- We now use Twemoji icons in marked sections. Now `Info` and `Important` icons are much nicer.
- Constructors are now in a separate section as methods.
- Headers correctly handle long entry names.

List of not fixed things: (I will create additional issues for them)
- Argument names in the list are not bold. We receive a `<ul>` HTML code from the engine. We don't know whether it contains argument names or something else. It requires support from the LS protocol.
- No highlight for things delimited by `<pre>` tags in the text (like `Nothing` on the screenshot below). It also requires support from the LS protocol because we don't inspect received text and can't modify it.


![image](https://github.com/enso-org/enso/assets/6566674/868f1e03-e53a-4eb6-a306-8b439264fec5)


In the video from IDE, you can see some issues with spacing in the documentation, namely redundant blank lines at the beginning of each example and multiline (and multi-paragraph!) summaries for methods. This can't be fixed on the IDE side. I will create separate issues for that.

https://github.com/enso-org/enso/assets/6566674/e4cef3d1-7a13-4d3b-b11d-f5ee2c05ca82


https://github.com/enso-org/enso/assets/6566674/43970982-ba43-4530-8ffd-6bce790d5d77
2023-06-22 07:32:13 +00:00
Ilya Bogdanov
01a5361c65
Fix redundant imports when selecting options from the dropdown widget (#7028)
Fixes #6816.

The code for adding imports for dropdown widgets was unified with CB. The code was moved from the searcher controller to the graph controller.

Also, I changed the signature for a few `lookup_*` methods of the suggestion database, because I have always found it weird that they return `Option` instead of `Result`. They now work nicely with the surrounding code.


https://github.com/enso-org/enso/assets/6566674/49125f8d-096e-4cca-a922-4811ed717a4d
2023-06-21 12:00:15 +00:00
Paweł Grabarz
fcaa7510c5
Do not immediately modify code when disconnecting the edge at target side. (#7041)
Fixes #6772

When detaching an existing edge by grabbing by a source port, the node's code is no longer immediately modified. It is only changed once the edge has been either connected or destroyed. When grabbing on the source side, the existing behavior is preserved. That way, we always have guaranteed place to keep the edge connected to.

https://github.com/enso-org/enso/assets/919491/49e560cb-0a29-4c6a-97ec-4370185b8c89

In general, the detached edges are now more stable, resilient to all kinds of expression modifications during the drag.

https://github.com/enso-org/enso/assets/919491/e62450ff-46b2-466f-ac33-f4f19e66ee1d


In case there is a situation where the currently dragged edge's port is destroyed (e.g. by Undo/Redo), instead of showing glitched port position it is simply dropped.

https://github.com/enso-org/enso/assets/919491/8fb089aa-a4a5-4a8c-92eb-23aeff9867b8

# Important Notes

The whole edge connection and view handling at the graph-editor view level has been completely rewritten. The edge endpoints are now identified using new `PortId` structure, that is not dependant on the span-tree. This prepares us for eventual removal of the span-tree in favour of manipulating AST directly. Right now those `PortId`s are still stored within the span-tree nodes, but it will be easy to eventually generate them on the fly from the AST itself. The widget tree has also already been switched to that representation where appropriate.

Additionally, I have started splitting the graph editor FRP network into smaller methods. Due to its absolutely enormous size and complexity of it, I haven't finished the split completely, and mostly edge-related part is refactored. I don't want to block this PR on this any longer though, as the merge conflicts are getting a bit unwieldy to deal with.
2023-06-20 21:27:39 +00:00
Michael Mauderer
d26b826a77
Fix scrollbars not being visible in fullscreen text visualisation. (#7069)
Fixes #6855

Correctly sets the layers of the full-screen panel and the scrollbars. The full-screen panel needs to be in the `panel` layer, as it is fixed and above everything else.  The scrollbars in the text visualization should be placed together with their parents, so they are switched correctly between layers when enabling/disabling full-screen. Leaving their layer otherwise unspecified should not lead to occlusion issues, as all other elements in the text visualization are Dom elements, and therefore placed below EnsoGL elements.

https://github.com/enso-org/enso/assets/1428930/db80c5b7-69fd-4bf5-84ab-c83664227059
2023-06-20 09:29:35 +00:00
Ilya Bogdanov
20edc2dd0d
Fix issues with mouse cursor position when editing nodes (#7014) 2023-06-19 15:54:47 +02:00
somebody1234
191f445304
QoL code improvements for dashboard (#7022) 2023-06-19 01:02:08 +02:00
Marcin Kostrzewa
90e413c7db
AI Completions (#5910) 2023-06-18 23:54:06 +02:00
Wojciech Daniło
5970ae5b42
Improved FRP implementation (#6944) 2023-06-17 16:14:19 +02:00
Kaz Wesley
5de0e6d0f3
Improve performance of graph changes (#6954)
Fixes performance problems observed when creating/resolving errors (#6674):

|before|after|
|---|---|
|![vokoscreenNG-2023-06-09_08-49-46.webm](https://github.com/enso-org/enso/assets/1047859/a0048b32-4906-41cd-8899-6e2543ef6942)|![vokoscreenNG-2023-06-09_08-50-54.webm](https://github.com/enso-org/enso/assets/1047859/fef81512-ad89-4418-ae10-d54de94d96ea)|

This also helps with #6637, although I haven't been able to reproduce the degree of slowness shown there so I can't confirm that this resolves that issue.

# Important Notes
- Disable visualizations until shown. [Faster startup, and all graph changes.]
- 6x faster message deserialization. [Saves 400ms when making a change with many visualizations open.]
- Fast edge recoloring. [Saves 100-150ms when disconnecting an edge in Orders.]
- Add a checked implementation of a `profiler` data structure, used instead of the fast `unsafe` version when `debug-assertions` are enabled.
2023-06-14 18:16:50 +00:00
Kaz Wesley
bf42ed482d
Fix dropdown laziness; also misc fixes (#6991)
Several small changes:
- Dropdowns: Populate `GridView` lazily (fixes #6865).
- Clear disconnected edges when editing node (fixes case 1 in #7018).
- Fix regression in node selection rendering (2nd bug in #6975).
- Update profiler docs. The hotkey to *prOfile without exiting* is now `Ctrl+Alt+O` (`Ctrl+Alt+P` has been requisitioned by the CB).

Node selection:
| Pre-`Rectangle` | This PR |
| --- | --- |
| ![image](https://github.com/enso-org/enso/assets/1047859/bec341c1-dbf8-404d-9f2a-5d070c80ff15) | ![image](https://github.com/enso-org/enso/assets/1047859/8161390c-f64b-4bb3-8b7a-b87b2f9b4cd3) |

# Important Notes
- `Rectangle`: When `inset > border`, the extra space is now between the body and the border, not outside the border.
- More robust node layering logic. Now an inconsistent layer order cannot occur, even if something strange happens (like editing an expression and an edge at the same time).
- The dynamic drop down in the `drop_down` example scene doesn't show any entries before (or after) this, so I can't test the dynamic case.
2023-06-14 17:58:03 +00:00
Stijn ("stain") Seghers
e9e90fe152
No rendering after drop (#6911) 2023-06-14 12:30:14 +00:00
Michał Wawrzyniec Urbańczyk
a31c671524
Undo redo fixes and improvements (#6950)
This PR adds facilities for controllers to be aware of what shortcut command is currently being processed. This allows grouping consequences of single user action into a single transaction without hard-coding it separately for all the separate paths case-by-case, which turned out to be challenging and error-prone.

Additionally, a number of minor fixes were carried over from #6877:
* workaround for #6718;
* avoiding creating spurious transactions when dealing with node positions;
* dropping any non-user user-triggered transactions that occur during the IDE project initialization.
2023-06-12 10:32:35 +00:00
Ilya Bogdanov
03d725b829
Display error message in status bar when execution failed (#6918)
Closes #6859


https://github.com/enso-org/enso/assets/6566674/326b4fd9-b26c-4252-aab6-3c205457a2fa

Latest state:

<img width="1369" alt="Screenshot 2023-06-02 at 12 34 23" src="https://github.com/enso-org/enso/assets/6566674/baf20d92-4b27-40c2-bd46-b71ea5b952fd">

# Important Notes
- ~~Is current message to the user correct? Do we need to say something more?~~
2023-06-09 13:22:23 +00:00
somebody1234
876ecfc881
Remove directory create form; remove input focus ring (#6993)
* Remove directory create form; remove input focus ring

* Fallback modified date to created date on local backend

* Fix double click to open project
2023-06-08 11:36:46 +02:00
Kaz Wesley
ff513471e1
Reduce draw calls (#6707)
Implements #6544 (eliminates 10/42 of the constantly-displayed draw calls).
Fixes #6717. Improves startup CPU time by 5% (250ms, loading Orders on my dev box).

# Important Notes
- Edges: New implementation uses only Rectangle under most conditions.
- Node and action area: Replace some shapes with Rectangle.
- List view: Replace some shapes with Rectangle.
- Display object hierarchy: The lowest-level shape instance types no longer have their own display objects.
- Includes initial support for using `Rectangle` to display triangles.
2023-06-06 17:09:03 +00:00
Dmitry Bushev
76a9a95c5f
Create execution context with id (#6947)
`executionContext/create` method has an optional `context_id` parameter. Supplying this argument makes the user's session more reproducible. I.e. this way the language server can recreate the user's session by recording the requests.
2023-06-06 14:03:04 +00:00
Michael Mauderer
86724cb741
Show status mesage if a visualisation is closed due to engine error. (#6937)
* Adds a mechanism to propagate status messages through the app.
* Adds a status messages when a visualisation is closed through an engine error.

https://github.com/enso-org/enso/assets/1428930/6f2ab9ff-4cea-4740-a20a-1adf49c851f5
2023-06-06 12:44:52 +00:00
somebody1234
5cc21001b1
Save backend type in localStorage, and automatically open projects when ready (#6728)
* Save backend type; fix `-startup.project`

* Attempt to fix for cloud

* Fix for cloud and implement automatic opening

* Fixes

* Add missing functionality

* Switch default backend to local backend

* Fix type error

* Fix saving backend

* Make loading message appear instantly

* Fix context menu positioning

* Fixes and QoL improvements

* Style scrollbar on `document.body`

* Fix `-startup.project`; other minor fixes

* Open project immediately when creating from template; minor fix

* Finally fix spinner bugs

* Fix some minor bugs

* Fix bugs when closing project

* Disallow deleting local projects while they are still running

* Close modals when buttons are clicked
2023-06-06 14:00:07 +02:00
Adam Obuchowicz
06c8d2977d
Fix entering node failure handling (#6932)
Fixes #6763

The bug was caused by pushing stack frames in the engine first, then failing to get graph controller - in that case we didn't update graph, but kept the stack, so graph was not synchronized with stack.

This PR changes the approach: we try to open graph first, only then push frames to stack. If _any_ frame will fail, we try to pop those we pushed so far, to restore the previous state. The same fix was applied for leaving nodes.

Also, I realized, that running several "enter node" / "leave node" actions could mix push/pop operations, making a mess with our execution context state. I've added a mutex to ensure we won't do this: the contesting operation will simply fail.

# Important Notes
In case when _restoring_ state fails, I did not have any better idea than just trying until it succeed.
2023-06-06 10:41:30 +00:00
Michael Mauderer
72b202b7d0
Fix visualisation FRP bugs. (#6831)
Fixes
* Empty Visualization when opening a full-screen visualization directly without opening the visualization before. #6770

https://github.com/enso-org/enso/assets/1428930/5812ed03-652c-4a27-8e33-b85512ca11b6

* Empty visualization when opening the full-screen visualization before the data for the visualization has arrived. #6561

https://github.com/enso-org/enso/assets/1428930/d8e58f2d-f1b6-4b70-84fa-e917f6c0af1f

* Visualization is reset to default when reconnecting nodes #6673

https://github.com/enso-org/enso/assets/1428930/ac6cf79a-7147-4f13-9045-52599fb39900


* Redundant internal open/lose events caused by logic loops around the show/hide button, as well as many redundant layer setting/unsetting issues internal to the visualization code.

Generally improves the logic around the visualization API by avoiding decentralized logic in different places and removing old code that is no longer needed.
2023-06-05 16:01:06 +00:00
James Dunkerley
db96bd2e2c
Small fixes from book club. (#6933)
- Add the missing dropdowns for `Locale` and `Encoding`.
- Correct a few mismatched type signatures.
- Adjust `order_by` calls with a single `Sort_Column` to call in a Vector.
- Adjust parameter names for `transpose`.
- Fix for the table viz: escape HTML and `suppressFieldDotNotation`.
- Use `Filter_Condition.Equal True` for the default filter.
- Adjust `Data.fetch` to return the response on success when parse fails. Rename `parse` to `try_auto_parse`.
- Add various aliases for methods.
- Add tests for `Table.set` when using a `Vector`, `Range` or `Date_Range`.
- Add check for mismatched length on `Table.set`.

![image](https://github.com/enso-org/enso/assets/4699705/23ea0ba3-2b05-4af8-afd9-f35b55446c24)

![image](https://github.com/enso-org/enso/assets/4699705/8b0253e6-e9e8-490a-9607-0da51ab5a215)
2023-06-05 13:57:30 +00:00
somebody1234
f09d922a41
Project create form (#6923)
* Re-add project create form

* Add dropdown component and use in projct create form

* Fix "project create" button behavior
2023-06-05 15:14:59 +02:00
somebody1234
cd7cb0bda5
Offline mode (#6870)
* Dashboard and authentication changes

* wip

* Replace `useNavigate` with a wrapper

* Fixes

* Fix flipped boolean

* QoL improvement for request blocking

* Add service worker to cache dependencies
2023-06-02 11:05:37 +02:00
Ilya Bogdanov
bd3ba26fc1
Split CB documentation to smaller pages (#6893)
Now documentation for types, constructors and methods is displayed separately, with a links between pages.
It drastically improves the speed of documentation panel update (50-100x on my machine), and also provides more readable documentation.


https://github.com/enso-org/enso/assets/6566674/05c77560-162b-4396-bfa0-1e79eb6dcc5f

Before:

<img width="620" alt="Screenshot 2023-05-31 at 01 02 47" src="https://github.com/enso-org/enso/assets/6566674/045ad3fc-470b-44d6-b453-e63c06711d06">


After:

<img width="800" alt="Screenshot 2023-05-31 at 00 54 53" src="https://github.com/enso-org/enso/assets/6566674/cb76e757-66fa-4544-8ef9-80b0a54efe0b">
2023-06-02 07:14:50 +00:00
Adam Obuchowicz
2e39d7595f
Fix CB discarding changes if pressed Ctrl + Enter too quickly (#6875)
Now, quick typing in component browser and pressing "enter" should not cut off the last part typed. Fixes #6733

https://github.com/enso-org/enso/assets/3919101/3979ed5a-ba4e-4e25-93e6-672e731b7bd8

On this occasion, also fixed "go-to-dashboard" button and "Unsupported engine version" being over the full-screen visualization. Fixes #6722

# Important Notes
I did a significant refactoring of Project View:
1. The huge `frp::extend` block was split into multiple `init` methods.
2. Remaining of the "Old searcher" were removed.
3. The "Edited" event from node's input is emitted only when in edit mode (it's consistent with other API terminology, and makes FRP for showing CB much simpler.

The code was _mostly_ moved around, but the check is advised anyway, as there were small changes here and there.
2023-06-01 07:55:13 +00:00
Dmitry Bushev
ed3f9b306e
Consistent self types (#6867)
close #6800

Update the `executionContext/expressionUpdates` notification and send the list of not applied arguments in addition to the method pointer.

# Important Notes
IDE is updated to support the new API.
2023-05-31 15:47:48 +00:00
somebody1234
50aefd6746
Fix #6892 (#6898) 2023-05-31 16:14:02 +02:00
Adam Obuchowicz
4e52c18b28
Disable node entering while editing (#6888)
A very minor fix.
2023-05-31 08:01:56 +00:00
Paweł Grabarz
8bc3ebd70a
Implement nested widget overrides (#6878)
Implements #6792
Fixes #6715
Fixes #6052
Fixes #5689

The dynamic dropdown widgets entries now can specify additional widget configuration as a list of `parameters` of the inner method call. That allows for creating smarter widgets within nested constructors, taking the outer widget's context into account.

<img width="772" alt="image" src="https://github.com/enso-org/enso/assets/919491/97c70654-9170-4cf0-ae4d-2c25c74caa96">

With the changes to the serialization logic, I have also adressed issues related to automatic label generation for both static and dynamic dropdown entries. For access chains (e.g. `Foo.Bar.Baz_Qux`), the label will now always contain only the last segment, and all underscores will be removed (e.g. `Baz Qux`). This also applies to dynamic entries where the label is not explicitly specified in method annotation.

<img width="265" alt="image" src="https://github.com/enso-org/enso/assets/919491/1abe6c77-010b-4622-b252-97cd1543cb48">

Additionaly, now the dynamic entries containing constructors will also be resolved within suggestion database, allowing us to automatically insert relevant import, shorten the actually used expression and wrap it with parentheses if required. That was required for nested widgets to show up, as we depend on properly resolved argument names to show them. The widget definitions in annotations no longer need to wrap the expressions manually. Instead, the constructors used in dropdown entries should be specified using fully qualified names, similarly to how we do it in tag values.

CC @jdunkerley - The dropdown entries containing just a constructor will no longer need added parentheses around them. Instead, the constructors should be specified using fully qualified names, similarly to how we do it in tag values.

<img width="389" alt="image" src="https://github.com/enso-org/enso/assets/919491/19944b5b-d0c7-43ac-bf17-ca1556e0b3f0">

Note that currently the import resolution is attempted even if the used constructor is is not specified using a fully qualified name. To accomplish that, the IDE is performing a more expensive search through whole suggestion database for matching type and module (e.g. in example above, we are searching for a match for `Aggregate_Column.First`). If there are multiple potential matches due to a name collision, it is undefined which one would be preferred. Effectively one will be picked at random. To avoid that, the libraries should over time transition to using fully qualified names wherever possible.

# Important Notes
I have removed the `payload` field from the span tree, and with it the generic argument on its nodes. This was already partially done on the branch with new design, on which I also had a few changes that turned out to be useful for this PR. So I pulled it in as well. It is a nice simplification that will ease our further work on removing the span-tree altogether. The biggest impact it had was on the node output port, where I had to store the port data outside of the span tree. This is the approach we would be taking when transitioning to AST anyway.
2023-05-30 17:45:31 +00:00
Stijn ("stain") Seghers
ab159238dd
Run IDE with Project Manager endpoint instead of Language Server endpoints, when on local backend (#6810)
This is a fix for a couple of recent regressions:
- Fixes #6756: Projects couldn't be renamed anymore from within the project view.
- Fixes #6804: One could no longer switch between projects from within the project view.
- It also unblocks the issue with the spinner (that got reverted), but that probably needs some extra attention.

It might be the long-term goal to have different UX solutions to these cases, but this should fix those regressions in the short term at least.

Thanks to @somebody1234 for the in-depth conversation (and the actual code!).
2023-05-30 12:42:22 +00:00
Adam Obuchowicz
4fdcea3635
Improve UX of Component Browser (#6812)
Fixes #6736
Fixes #6486
Fixes #6601

To achieve goal mentioned in the title the following changes were made:
1. Now it's normal state of Component Browser to have no entry selected. In that case pressing enter will accept the input as-is.
2. The issues of `Column.from_vector` or actually any code being unintentionally inserted should be resolved, as in most of those scenarios we do not select any item in CB after list reload. Specifically, the first element is selected only when:
* the input is empty (so the user just starts writing code)
* or we filter by some pattern (we select the best match). This includes writing literal.
3. On this occasion, inserting literal was fixed, so no more random spaces are inserted inside.
4. Also, the entries in groups other than local group are reversed: now the entries specified as first in "component groups" section in the library will be easily approachable. In particular, now "Text input" is selected by default in empty node instead of `Column.from_vector`.

https://github.com/enso-org/enso/assets/3919101/42064b08-16b4-4519-81de-8a2d3701c112
2023-05-30 10:41:00 +00:00
Wojciech Daniło
53887b2565
Fixing layering order (#6882)
This might fix https://github.com/enso-org/enso/issues/6874 . I can't reproduce the issue, but I understand why it might happen, as the ordering was not defined explicitly.
2023-05-30 10:21:51 +00:00
somebody1234
aba5e0f18c
Fix dashboard modal bugs (#6833)
* Fix rename modal disappearing; scroll context menu into view

* Fix modal not closing when input is selected
2023-05-30 11:57:13 +02:00
Kaz Wesley
7e6a919737
Coalesce graph editor view invalidations (#6786)
Only invalidate the graph editor view at most once per frame. On develop, this saves about 70ms (2%). Testing a recent backend without #6755 as a stress-test, this saves about 5s (45%). This reflects better scalability to large numbers of `SuggestionUpdate` messages.

Fixes #6630.

# Important Notes
- Also fix intermittent profiling failures occurring since the introduction of microtasks.
2023-05-29 14:39:20 +00:00
Stijn ("stain") Seghers
0ed78f99af
Show spinner when opening/creating a project, take #2 (#6827)
* Remove unused code: project management in component browser

* Encapsulate internal FRP logic of project list

* Collapse some code paths

* Open project passed on command line through presenter

A project name or ID that is passed on the command line was initialised
in the controller setup, before the presenters and views are set up.
Now, we fully initialise the IDE before opening a project so we have
control over the view while a project is being opened.

* Show a spinner in all cases of opening a project

* Let root presenter open/close projects when switching projects

* Change spinner to make progress over a fixed period

* Resolve issues when Project Manager API isn't available

* Bump wasm size limit
2023-05-26 18:20:07 +02:00
Michael Mauderer
0dcab3db17
Only initialise visualisation chooser if it is used. (#6758)
Re-introduce a feature that was removed with #6638: only initialize visualization choosers when they are visible. This avoids initializing lots of invisible UI elements at the same time when opening a project.
2023-05-26 15:17:01 +00:00
Stijn ("stain") Seghers
e9761f5472
Stop graph editing when in full-screen visualization mode (#6844)
Fixes #6754. The issue mentions being able to create and delete nodes when the full-screen visualisation is active. Besides those, you now also can't:
- collapse nodes into a function
- enter a function
- exit a function
2023-05-26 13:08:16 +00:00
somebody1234
9a456b5fa7
Handle show-dashboard event (#6837)
- Handles the `show-dashboard` event to hide the IDE and show the dashboard
- This replaces the temporary Ctrl+Alt+D shortcut to do the same action. The Ctrl+Alt+D shortcut has been removed.

# Important Notes
None
2023-05-26 11:19:58 +00:00
somebody1234
079b1eed9d
Fix some dashboard issues (#6668)
Fixes some of #6662

Issues addressed:
- `ide watch` and `gui watch` should now use the desktop platform
- error screen should now be shown when passing invalid options
- password (both creating password when registering, and resetting password) should now warn on invalid input

# Important Notes
Instead of checking whether `location.hostname === 'localhost'`, I've opted to use a constant defined by the build tool instead. This is to make it easier to merge the cloud IDE and desktop IDE entrypoints in the future, since it would be able to simply set `platform: Platform.cloud` in the build config.
2023-05-26 10:17:03 +00:00
somebody1234
245ff8d32e
Fix JWT leak (#6815)
Should fix [cloud-v2#464](https://github.com/enso-org/cloud-v2/issues/464).

# Important Notes
I'm not 100% clear on how to repro the issue so i'm partly just guessing the root cause.
I have eliminated various other things from being potential causes though - e.g. `localStorage` indicates that the AWS libraries are clearing their entries as expected.
2023-05-26 09:30:02 +00:00
somebody1234
89d5b11e04
Fix "set username" screen (#6824)
* Fix cloud-v2/#432

* Delay setting backend to local backend; don't list directory if user is not enabled

* Add a way to debug specific dashboard paths

* Fix bug

* Check resources and status immediately
2023-05-26 08:26:45 +02:00
Paweł Grabarz
3268139005
do not activate nested dropdowns together (#6830)
Fixes #6825

![image](https://github.com/enso-org/enso/assets/919491/47f29247-a97d-404b-93b8-7c656f79b093)
2023-05-24 22:21:18 +00:00
Paweł Grabarz
4cbd5f45a1
Prevent incorrect application of list widget on incompatible expressions (#6771)
Refactored the logic behind selecting appropriate widgets for span tree nodes. Now the bulk of it is moved into widget methods. When a given widget type is reporting to be not compatible with the expression, it will not be used even if the configuration was overriden using an method argument annotation. In that case, the usual logic for automatically selecting the appropriate widget will kick in.

![image](https://github.com/enso-org/enso/assets/919491/6316e21e-c509-4cc4-a3a6-c482798894d0)
2023-05-24 12:30:40 +00:00
Pavel Marek
bd70ed6830
Update GraalVM to 22.3.1 JDK17 (#6750)
Upgrade GraalVM to 22.3.2 based on JDK17.

---------

Co-authored-by: somebody1234 <ehern.lee@gmail.com>
2023-05-24 10:39:08 +02:00
Stijn ("stain") Seghers
8e62ed60e9
Add dashboard button (#6474)
Closes #6399: Adding a button to the top bar in the project view to return to the dashboard.

Note that this just fires a DOM event (see #6399). To test it, you can add an event listener: `document.addEventListener('show-dashboard', console.log)`

https://user-images.githubusercontent.com/607786/235687669-ab04339f-0f07-439a-9cd3-59d96815edaa.mp4
2023-05-23 14:23:23 +00:00
somebody1234
cbc3568cf3
Use state sent with GET /directories instead of querying state separately (#6794)
* Use inline project state

* Fixes

* Fix type error
2023-05-23 13:01:28 +02:00
somebody1234
efd33c0928
Run TypeScript typechecking and eslint on Lint CI (#6603)
* Run typecheck and eslint on Lint CI

* Address reviews; fix type errors in `.d.ts` files

* Remove unused parameter

* Run prettier

* Fix lint error

---------

Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
2023-05-23 12:22:53 +02:00
somebody1234
e35bc17794
Disable cloud backend for unverified users; use local backend as default backend; minor bugfixes (#6779)
* Disable cloud backend for unverified users

* Use local backend as default backend

* Try to fix Project Manager reconnection logic

* Set default backend to remote backend when local backend is not available

* Attempt to suppress WebSocket error console message

* Minor fix for loading spinner

* Hide "Open as folder" context menu option, when on local backend

* Remove duplicate `onSubmit` handler

* Fix live-reload

* Remove debug `console.log`

* Minor refactor; properly unset modals on click

* "created" project state for local backend, for parity with remote backend

* Hide directory path when on local backend

* Undo minor refactor

* set newDashboard & authentication flags to true

* Revert "set newDashboard & authentication flags to true"

This reverts commit 5974170866.

---------

Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
2023-05-23 11:05:10 +02:00
Adam Obuchowicz
a27f19fd02
Reloading file in LS after desynchronization. (#6752)
Fixes #5203

This PR changes behavior when `text/applyChange` returned error.

Before we always assumed that the change was _not_ applied, and tried to send full synchronization still assuming old file content. But this was not the case on some errors (timeouts for example). Now we instead reopen the file (getting its actual content) and then make a full invalidation.

Also added a shortcut allowing manual file reloading, what may be useful in some kinds of error (and also allowed me testing of reopening file in the application).

# Important Notes
The unit tests of sending text updates were improved: now we actually check if all expected messages are emitted from the IDE.
2023-05-23 08:19:27 +00:00
Stijn ("stain") Seghers
9a4b7d1976
Fix #6521: Main module function calls shouldn't use project namespace (#6719)
Fixes #6521: Picking a function from the CB that's defined in the main module now resolves to `Main.<func-name>` instead of `<project-name>.<func-name>`.

Note that, when collapsing nodes to a function, this referral style was already used, so this is just a change in the behaviour of the CB.
2023-05-22 14:50:25 +00:00
James Dunkerley
62fecfa474
Widgets, Vector as Column, Viz Fixes and Rename Columns (#6768)
- Fix couple of bugs in Table viz: rounding of bottom div, missing character, not including row count as an option.
- Add better JSON format for `Row`, add support for visualization in the Table viz both for `Vector Row` or `Row`.
- Fix some type signature errors.
- Move `Column_Format` to `Standard.Table.Internal`.
- Move `format_widget` to `File_Format.default_widget` and sort the signature of `Widget` methods.
- Added utility to make `Single_Choice` widgets.
- Added dropdown for delimiter on split methods.
- Removed `default_widget` from `Problem_Behavior` and `Filter_Condition`.
- Altered signature and widgets for table functions.
- Added `to_column` extension to allow easy conversion of Range and Vector to Column.
- Added `compute`, `compute_bulk`, `running` to Column to allow statistic computation.
- Added drop down for `Table.write` format parameter.
- Added drop down for `Table.rename_columns`.
- Added support for Vector of pairs for renaming columns.
- Added check when making a map from Vector if not 2 items.

![image](https://github.com/enso-org/enso/assets/4699705/beed257c-efe3-44a3-9e3a-041354701735)
2023-05-19 23:24:47 +00:00
somebody1234
658395e011
Enable require-jsdoc lint and add two lints related to React (#6403)
- Enables the `require-jsdoc` lint
- Fixes all lint errors caused by enabling this lint.

# Important Notes
- There is no option to require JSDoc for other constructs, like top-level constants.
2023-05-19 19:55:29 +00:00
Adam Obuchowicz
029b900335
Fix file uploading node expression. (#6689)
Partially fixes https://github.com/enso-org/enso/issues/5051

Fix the expression of the node representing a file being uploaded after drag'n'dropping, so it relates to the actually existing standard library function.
2023-05-19 15:03:46 +00:00
Jaroslav Tulach
08e6d21885
Display Initializing project... message when initializing project (#6661)
The current `"Project Name Uninitialized"` seems a bit scary. Why not display text describing what's really happening?

![Initializing project...](https://github.com/enso-org/enso/assets/26887752/b852ccdc-b1e4-4d3d-aa40-9e23e18ef43c)

Isn't `Initializing project...` better?
2023-05-19 06:56:37 +00:00
somebody1234
9e491e7c0b
Display "modified at" column on the cloud dashboard (#6687)
* Fix cloud-v2/#433

* Implement "last modified" for local backend

* Minor improvements to documentation

* Show nothing instead of 1970-01-01 if last modified date does not exist

* Fix type errors
2023-05-18 13:25:04 +02:00
somebody1234
0055973f62
Show spinner while loading directory (#6714) 2023-05-18 09:51:57 +02:00
Paweł Grabarz
dcdba8d1ac
Fix list editor panics during insertion (#6540)
# Important Notes
The mouse handling changes involve an unfortunate huge hack, where we enable mouse events on the mouse shape during box selection. That way we know for sure that no other shape will be able to receive mouse enter event. Then the list editor widget is modified to only actually respond to events when its background is hovered. We will definitely want a more proper way to handle mouse event contention, but it's definitely out of scope for current bugfixing.
2023-05-17 18:53:51 +00:00
somebody1234
384d3148d5
Remove project create form (#6710) 2023-05-17 13:02:33 +02:00
Stijn ("stain") Seghers
102ce7ae56
Change full-screen visualisation shortcut to shift-space (#6663)
Fixes #6260: The shortcut to open the full-screen visualisation is now `shift-space` so it doesn't interfere with the `space` shortcut to toggle the mini-visualisation.
2023-05-17 09:07:47 +00:00
Paweł Buchowski
10eeed1944
Revert "Show spinner when opening/creating a project (#6321)" (#6712)
This reverts commit 341f1275e0.
2023-05-16 22:53:59 +02:00
Michael Mauderer
3e739a76c2
Fix FRP events that deactivate visualizations. (#6638)
Addresses the issue described here: https://github.com/enso-org/enso/issues/6561#issuecomment-1536205322 .
This was caused by FRP events that would re-set the visualization path when ending the node editing. This would eventually clear the visualization before setting it again, losing the already received data.


https://github.com/enso-org/enso/assets/1428930/6e324ddf-f365-48b8-bb2a-c68b2fbd24ef

also addresses the issue described here https://github.com/enso-org/enso/issues/6561#issuecomment-1543856257


https://github.com/enso-org/enso/assets/1428930/437f7822-7c35-48ba-a055-59d6f712a813

Note that now the default visualization is already shown on the first hover of the action bar, where before it was empty. This was caused by a faulty initialization.
2023-05-16 15:51:00 +00:00
somebody1234
25eeeb7da1
Hide "shared with" column on local backend (#6684)
* Hide "shared with" column on local backend

* Constant column widths
2023-05-16 12:30:33 +02:00
somebody1234
0a3a82c07f
Fix top bar styles (#6695) 2023-05-16 12:18:38 +02:00