Commit Graph

1226 Commits

Author SHA1 Message Date
Kaz Wesley
01a2ca458b
Enso color picker (#9825)
New color picker, designed for Enso:

https://github.com/enso-org/enso/assets/1047859/c3eff168-6807-4825-b17b-053e3cd8b04c

- Colors never clash: OKLCH lightness and chroma are fixed.
- Easily match colors: Colors of other nodes in the current method are expanded to slices of the color wheel.

Closes #9613.
2024-05-06 17:37:13 +00:00
Kaz Wesley
36dcbf1a07
Output port changes (#9842)
* Output port changes

- Enlarge output port hover area; fix hover area extending above node
- Show ports when selection is shown
- Adjust port stroke-width and offset to match Figma
- Change cursor when output port is hovered
2024-05-06 09:36:43 -07:00
Kaz Wesley
15730afa01
Fix z-indexes (#9848)
Prevent visualizations (such as table) and visualization container (including toolbar) from drawing above widgets (such as dropdown).

![image](https://github.com/enso-org/enso/assets/1047859/ec3d67d8-b25c-491b-ad4c-3d42f82cbdc7)
Dropdown now covers visualization toolbars

![image](https://github.com/enso-org/enso/assets/1047859/4b870bf0-71d3-43e5-98d2-382cbecd8ba0)
Dropdown now covers table column resize handle

Fixes #9783
2024-05-06 13:40:04 +00:00
Adam Obuchowicz
6f802cca15
Enhanced visualization resizing (#9837)
Fixes #9702

* Added a resizer on the left side
* The resizers were moved a bit, and their position is now configurable by CSS vars: --visualization-resize-handle-inside and --visualization-resize-handle-outside of `:root` (see screencast below)

[Screencast from 2024-05-02 11-51-17.webm](https://github.com/enso-org/enso/assets/3919101/d58a0970-6994-4ac6-a55e-d77bccc6dac5)

# Important Notes
* The way I decide how to update the node position when resizing left side is a bit hacky, but I cannot think about any other way of handling minimum node's width. That unfortunately makes the right side tremble a bit when resizing the left side.
* I went against the task description regarding the resizers sizes: put 3px inside instead of 16px, because the latter made using scrollbars impossible.
2024-05-06 10:43:08 +00:00
somebody1234
5721760a1c
Fixes for local backend (#9850)
- Mostly fix #9817
- Fix creating directories at the top level in Local Backend
- Allow renaming files and directories in Local Backend
- Fix opening a template when a project is already open, causing both projects to be open. (Normally only one project should be open at a time)
- Hidden files cannot be hidden as the dashboard does not yet have the required information.

- Fix issue with selection. To reproduce on develop:
- Begin editing an asset's name
- Drag to select text in the input
- Continue dragging *past* the bounds of the input.
- Release mouse
- Observe that the selection collapses into a mouse cursor.
- (Note: this behavior should no longer happen on this branch, only on develop).

# Important Notes
None
2024-05-06 07:43:11 +00:00
somebody1234
82b0c1f4e8
Minor fixes to UX for Data Link input (#9857)
- Make object keys fixed width again
- Fix bug causing autocomplete to re-appear the first time after selecting an option
- Allow modal to grow wider to better show long inputs (e.g. long secret paths)

# Important Notes
None
2024-05-06 07:42:39 +00:00
somebody1234
25d1007a9e
Allow downloading projects on GUI dev server (#9851)
- Fixes #9482
- Add URL rewriting logic to `npm run dev` in `app/gui2/` so that "download" actions work

# Important Notes
- ⚠️ `config.yaml` HAS BEEN REMOVED in favor of `config.json`.
- Most of the keys have been removed as they were only used by GUI1.
- This is a REQUIRED change, because the vite dev server does not seem to like importing yaml files when running `vite.config.ts`.
2024-05-03 13:37:26 +00:00
Adam Obuchowicz
0186ed1961
Fix table viz context menu (#9820)
Fixes #9700

[Screencast from 2024-04-30 15-09-17.webm](https://github.com/enso-org/enso/assets/3919101/a11ae875-7e2f-4c84-8d91-33aa1ca8bdbd)

# Important Notes
During implementation, I discovered a bug that the context menu wasn't hidden by click at background (or node) - all because of preventDefault, as it turned out.
2024-05-02 11:17:13 +00:00
Dmitry Bushev
5995a00958
Run ydoc-server with GraalVM (#9528)
part of #7954

# Important Notes
The workflow is:
- `$ npm install` -- just in case
- `$ npm --workspace=enso-gui2 run build-ydoc-server-polyglot` -- build the `ydocServer.js` bundle
- `$ sbt ydoc-server/assembly` -- build the ydoc server jar
- `env POLYGLOT_YDOC_SERVER=true npm --workspace=enso-gui2 run dev` -- run the dev server with the polyglot ydoc server. Providing `POLYGLOT_YDOC_SERVER_DEBUG=true` env variable enables the chrome debugger
2024-05-02 06:28:57 +00:00
Adam Obuchowicz
7db7fa039c
Add remove nodes icon to selection menu (#9827)
![image](https://github.com/enso-org/enso/assets/3919101/29c09e74-47db-4bd5-8770-4a79b23a7cf1)
2024-05-02 05:51:54 +00:00
Shixian Sheng
c340727735
Fixed LICENSE Link. Added missing LICENSE file (#9804)
Added License to the app/gui2 folder and 2 links for it in README
2024-05-01 19:15:52 +02:00
somebody1234
d995d17dcb
Fix Google Analytics tag injection (#9819)
I missed injecting the Google Analytics tag from the environment at build time...

# Important Notes
None
2024-05-01 11:32:50 +00:00
Kaz Wesley
6655d5fbb2
Move node type to visualization container (#9784) 2024-04-30 08:55:43 -04:00
Adam Obuchowicz
04a10b72e5
Dragging edges (#9788)
Fixes #9423
2024-04-29 14:16:02 +00:00
Adam Obuchowicz
210f0482a4
Set of improvements: selection "committed" state and "add new compnent" button hitbox fix. (#9775)
1. Did selection refactoring as follow-up of #9519. Now the circular menu visibility or node extension is altered only when selection is ended (before, node shrank once the selection started a bit less blinking).

[Screencast from 2024-04-24 10-56-05.webm](https://github.com/enso-org/enso/assets/3919101/744e7579-80dd-4d44-a545-7af812239be2)

3. Fixes #9699 I don't know why the add-node button shape was done in :before element, if it happily works by shaping the main div itself.

[Screencast from 2024-04-24 10-51-57.webm](https://github.com/enso-org/enso/assets/3919101/004aede5-ea00-4e30-9a3d-6e2574e3b755)
2024-04-29 11:31:26 +00:00
somebody1234
d58b5f2a7d
Change heuristics for showing missing .env error (#9491)
- Fix #9479

# Important Notes
None
2024-04-29 07:27:00 +00:00
James Dunkerley
c5179309fd
Improve Table Viz handling of Numbers (#9793)
- Added support for NaN, Infinity and -Infinity in the Table viz.
- Simplified the logic so all the formatting in a single place in the Table viz.
- Sorted Number formatting for BigInt and < 10000.

![image](https://github.com/enso-org/enso/assets/4699705/1486eb7e-df87-4516-90d0-75fda1e9743d)

![image](https://github.com/enso-org/enso/assets/4699705/e55c0e6b-bd3c-4dcf-a65f-41f8516568a6)
2024-04-26 07:52:40 +00:00
somebody1234
cb31bcaf8e
Remove special-cased injected Google Analytics tag (#9787)
- #9779 introduced (incorrect) detection to determine when to inject the Google Analytics tag. Instead, it should be injected by CI, because sending Google Analytics events is undesirable in development mode.

# Important Notes
None
2024-04-25 19:19:42 +00:00
Kaz Wesley
12cbd900b4
Node creation improvements (#9781) 2024-04-25 09:18:38 -04:00
somebody1234
3a53d470eb
Google Analytics events for opening and closing the app, and opening and closing projects (#9779)
- Closes #9778
- Add `open_app`, `close_app`, `open_workflow`, and `close_workflow` events
- Miscellaneous fixes for Google Analytics:
- Fix `open_chat` and `close_chat` events firing even when chat is not visible
- Add Google Analytics script to GUI2 entrypoint (i.e. the entrypoint used by the desktop app)

Unrelated changes:
- Add Nix development shell to allow Nix users to build GUI2 and the build script
- Java dependencies have *not* been added in this PR to keep things simple

# Important Notes
None
2024-04-25 11:33:59 +00:00
Adam Obuchowicz
5807c5c112
Restore state after reconnecting (#9755)
Fixes: #8522

Execution context is refactored slightly: now we have a single `sync` function to synchronize both visualization and execution stack.

Tested hibernation on Linux: I was able to continue my work  🎉

# Important Notes
The Refinement Notes state, that the execution mode should be set before updating the stack, but actually it makes an error on startup (changing context automatically re-executes programs, what fails if there's no frame on the stack).
2024-04-25 09:02:47 +00:00
Ilya Bogdanov
717f6bb330
Display argument placeholders for autoscoped constructors (#9737)
Fixes #9635 

<img width="925" alt="Screenshot 2024-04-18 at 2 43 09 PM" src="https://github.com/enso-org/enso/assets/6566674/fbdce484-ac0b-4e30-8577-1c9dc419dffe">
2024-04-24 13:40:42 +02:00
Adam Obuchowicz
70985932b1
Selection panel (#9771)
Fixes #9519

[Screencast from 2024-04-23 12-57-01.webm](https://github.com/enso-org/enso/assets/3919101/873925db-1c9b-43e5-8144-6503c362baa0)

# Important Notes
I decided to go against our refinement notes, as in the action the blinking does not look bad, and seeing "live" how many nodes are selected may be useful.
2024-04-24 08:56:44 +00:00
Jaroslav Tulach
ff62c1e25f
Access non-self arguments when widget annotations are computed (#9410) 2024-04-24 03:58:32 +02:00
AdRiley
fa6b7f859f
Add new icons (#9756)
Restore, Clone, Group (Only Group is mine the others were already in Figma)

![image](https://github.com/enso-org/enso/assets/1720119/f74c3afa-f490-427a-b675-584077b202bb)
2024-04-20 09:48:58 +00:00
Kaz Wesley
6426478c97
Copy/paste improvements (#9734)
Copying nodes:
- Multiple nodes supported.
- Node comments and user-specified colors included.
- Google Sheets data can be pasted to produce a `Table` node, handled the same way as Excel data.

# Important Notes
- Fix E2E tests on OS X.
- Add E2E and unit tests for clipboard.
- Use the lexer to test text escaping; fix text escaping issues and inconsistencies.
2024-04-19 16:33:51 +00:00
somebody1234
7c571bd460
Fix opening templates on Local Backend (#9748)
- Close #9747
- Fix creating projects from templates on Local Backend

# Important Notes
None
2024-04-19 14:07:23 +00:00
Adam Obuchowicz
de406c69fa
Automatic reconnect with Language Server. (#9691)
Fixes #8520

If the websocket is closed not by us, we automatically try to reconnect with it, and initialize the protocol again. **Restoring state (execution contexts, attached visualizations) is not part of this PR**.

It's a part of making IDE work after hibernation (or LS crash).

# Important Notes
It required somewhat heavy refactoring:
1. I decided to use an existing implementation of reconnecting websocket. Replaced (later discovered by me) our implementation.
2. The LanguageServer class now handles both reconnecting and re-initializing - that make usage of it simpler (no more `Promise<LanguageServer>` - each method will just wait for (re)connection and initialization.
3. The stuff in `net` src's module was partially moved to shared's counterpart (with tests). Merged `exponentialBackoff` implementations, which also brought me to
4. Rewriting LS client, so it returns Result instead of throwing, what is closer our desired state, and allows us using exponentialBackoff method without any wrappers.
2024-04-19 13:39:45 +00:00
James Dunkerley
16126a0c71
Working through various issues from OKR / blog use. (#9739)
- Fixed `list_directory` so that it works with defaults and uses the `Folder_Browse`.
![image](https://github.com/enso-org/enso/assets/4699705/cf8eb187-a1fe-4eb7-a017-e7bb40e30e12)
- Adjusted types of `order_by` in `Aggregate_Column.First` and `Aggregate_Column.Last` so supports single `Sort_Column`.
- Adjusted types of `order_by` in `Aggregate_Column.First` and `Aggregate_Column.Last` so an empty Vector is valid (treated as Nothing).
- Adjusted `Count_Distinct` so if an empty set of columns then equivalent to `Count`.
- Use the multi-select widget for `columns` in `Count_Distinct`.
![image](https://github.com/enso-org/enso/assets/4699705/86e8f3c1-9cbe-4fb3-b6fd-43b937346082)
- Sort the widget for `order_by` in `First` / `Last`.
![image](https://github.com/enso-org/enso/assets/4699705/d624544c-6f4d-42ef-bb97-79b68aa60569)
- Bug fix for widgets with both tagValues and dynamic data. (Thanks @farmaazon).
- Use the multi-select for various things.
2024-04-18 21:50:20 +00:00
Sergei Garin
30a80db4b0
Refetch user session when it expires (#9632) 2024-04-16 11:21:26 +00:00
Ilya Bogdanov
7e345075b3
Implement special handling of subapplications when collecting MethodCallInfo (#9677)
Fixes on of the issues in #9354

Stale method call info for inner sub-application was causing additional argument placeholders on the node for certain expressions. Now it is fixed:
1. We only create function widget for the most top-level expression in the prefix application chain.
2. We reuse method call info from inner expressions, assuming it will be always correct for our purposes.

https://github.com/enso-org/enso/assets/6566674/91d2b4ba-a789-4c7b-b40c-f09ac45da7f0
2024-04-16 10:39:04 +00:00
Paweł Grabarz
0ee113a4d9
Disconnect nodes when deleted (#9659)
Fixes #9315

https://github.com/enso-org/enso/assets/919491/8551c901-4bef-4a7a-bfb6-10578f0c125a
2024-04-16 08:11:31 +00:00
Paweł Grabarz
9d2d9038c9
Fix spurious gui e2e dropdown test failures (#9697)
In GUI E2E `widgets.spec.ts`, be more specific about which tested dropdowns should be visible. Since the tested node actually receives two dropdowns, the test could fail by detecting both and expecting only one. Since we already have a very specific selector for the dropdown we are testing, use it instead of fresh global locator.
2024-04-15 16:05:14 +00:00
Ilya Bogdanov
59a9c8e59c
Fix node placement (#9696)
Fixes #9689

We should consider visualization size in all cases. `visibleArea` has multiple usages, but they all seem to benefit from the change (e.g. zoom to selected will also consider visualization sizes).

https://github.com/enso-org/enso/assets/6566674/3c9ae4a9-27f5-4736-83b5-4b3a500564e7
2024-04-15 13:18:52 +00:00
Paweł Grabarz
3b21f5579f
Fix node arguments hiding animation, clipping and dropdown styles. (#9685)
Fixes #9492

Implemented generic component for flawless size-based transitions, then used it for hiding arguments and dropdown animation. That replaced the `max-size`-based CSS animation that caused original issue. Refactored dropdown positioning to avoid further issues related to animation overflow clipping. The dropdown also got a bit of a lift to fit closer to styles in current Figma designs.

https://github.com/enso-org/enso/assets/919491/e85fd68c-b2e8-4d58-90e1-4fd7b33f1c9b
2024-04-12 13:44:13 +00:00
Nikita Pekin
f80e0052cc
refr(enso-org/cloud-v2#1088): Make Project fields camelCase (#9653) 2024-04-11 20:02:29 +00:00
somebody1234
3ecc3aebd0
Option to use Data Link in new project (#9644)
- Close https://github.com/enso-org/cloud-v2/issues/1161
- Add context menu option (and associated shortcut) to open a Data Link in a new project

# Important Notes
- The corresponding backend endpoints do not yet exist. The frontend currently passes an additional parameter `dataLinkId: string | null` to the backend's `create_project` endpoint. Note that this is inconsistent with the rest of the backend's terminology which calls Data Links `connector`s, so the parameter name might want to be changed.
2024-04-11 17:13:59 +00:00
Kaz Wesley
b631745c1d
Interaction resumption (#9621)
Prevent interactions such as an open dropdown from being disrupted by the temporary state of absent type information occurring after an edit.

https://github.com/enso-org/enso/assets/1047859/bcc7fa02-847f-4cd0-b9fc-3186a97c5816

All widget-edit interactions that are active when a component is to be unmounted save state and are suspended. When a new component defining a `WidgetEditHandler` is instantiated, if the component is found to be equivalent to a component that was suspended, and no other interaction has been initiated in the interim, the interaction is restarted using the suspended state.

# Important Notes
- Fix a bug caused by a variable tracking an interaction's active state getting out of sync with the interaction. `WidgetEditHandler` now provides a reactive `active` property; using it is simpler and avoids this type of bug in the future.
- Fix a flickering bug that sometimes made it hard to open dropdowns by clicking the arrow.
2024-04-11 15:39:16 +00:00
Paweł Grabarz
922ac66baf
working hot reload for widget definitions (#9657)
Fixed a long-standing annoyance that widgets weren't fully hot-reloadable. Now when the widget definition (e.g. `score` function) is modified, it is hot-reloaded and new version immediately takes effect.

https://github.com/enso-org/enso/assets/919491/8e6d5a67-68ec-4353-8235-32657b32e2ec

# Important Notes
Because of how HMR API works, it needs to be passed from each widget module to the `widgetDefinition` function as an argument. When not provided, the definition will not be hot-reloadable (but the widget will still work as it used to).
2024-04-11 14:11:34 +00:00
Ilya Bogdanov
7e810feed9
Display parens in groups (#9678)
Fixes another point in #9354

Displays parens for Group AST (except top-level arguments).

<img width="630" alt="Screenshot 2024-04-11 at 3 08 01 PM" src="https://github.com/enso-org/enso/assets/6566674/8e3be87a-975b-404e-8a15-2752bd94cd4c">
2024-04-11 11:49:14 +00:00
Adam Obuchowicz
0bc7cb54eb
Change window title (#9676)
Fixes #9665

To Enso.

![image](https://github.com/enso-org/enso/assets/3919101/d5f29b9f-2509-4bd9-899a-ae5988b8089f)
2024-04-11 10:59:49 +00:00
somebody1234
0fcb005ff8
Fix dropdowns no longer opening after first open (#9668)
- Fix https://github.com/enso-org/cloud-v2/issues/1178
- Fix dropdowns not reopening after a third click (open -> close -> should open again)

# Important Notes
None
2024-04-10 13:28:49 +00:00
Sergei Garin
21ede86242
Use secret.path rather than secret.id in data link editor (#9667) 2024-04-10 12:52:35 +00:00
Sergei Garin
24644c41a2
Undelete user flow (#9601)
#### Tl;dr
Closes: enso-org/cloud-v2#863
This PR adds the ability to restore user account after deletion(So called soft-deletion)

<details><summary>Demo Presentation</summary>
<p>

#### TODO: video

</p>
</details>

---

#### Context:
This PR closes enso-org/cloud-v2#863, and it's a frontend part of the issue.

#### This Change:
1) Change the texts in settings, clarifying that a user can restore his account in 14 days after deletion.
2) Adds a new page (`/restore-account`)
3) If the user logs into the soft-deleted account, the app navigates him to the restore page.
4) The user can't interact with the dashboard until he restores the account(If the user navigates to the dashboard, the app will redirect him back to the restore page)
5) On the restore page the user can click a "Restore" button to restore his account or log out.
6) If the user restores his account, the app navigates him to the dashboard.

#### Test Plan:
1. Try to delete the account and log back in, expect to see the restore page
2. Try to navigate to protected pages(dashboard, settings, etc)
3. Try to restore the account
4. Try to log out on the restore page
5. (ideally) try to restore the account after 14 days :)

---
2024-04-10 10:11:48 +00:00
Sergei Garin
775ca3722a
Disable everything except restore / hard delete in trash (#9575)
Closes: enso-org/cloud-v2#1084

Tl;dr: This PR disable almost all actions in trash folder, except restore/hard delete.
Context:
Currently, we can do a lot of actions it trash folder: arrange files in folders, create new folders, edit files and so on. We want to disable most of these actions.


This Change:

- Disables d&d support within trash folder, but leaves the ability to drag thigs back to home folder.
- Disables most of the keyboard shortcuts(copy,paste,new...etc) except hard delete/restore
- Disables launching projects
- Disables rename
- Disables assigning labels
- Disabled editing the description & sharing




https://github.com/enso-org/enso/assets/61194245/35c6532d-719f-46b2-a2f7-b54b54856bbd





Test Plan:

This PR expects thorough testing to make sure we have disabled everything except hard delete/restore and the same way we didn't break the home folder :)
2024-04-10 09:31:46 +00:00
Nikita Pekin
7cf512ec6b
impr(enso-org/cloud-v2#1047): Enable Sentry distributed tracing (#9661)
Enables distributed tracing for Sentry. Enables profiling information collection for calls to backend APIs, which means that traces/errors can be correlated across the frontend and backend now.
2024-04-09 16:02:31 +00:00
Paweł Grabarz
4bf79776c5
Store graph viewport in client local storage (#9651)
Fixes #6250

With this change, I've also slightly refactored the graph editor component by grouping related functionality into neat block and moving already loosely coupled groups to separate files. Further work will be needed to simplify it, but it is a good first step.

https://github.com/enso-org/enso/assets/919491/fedce111-ea79-463f-a543-da3ecce28bf5
2024-04-09 12:02:11 +00:00
Sergei Garin
2c78f4eefd
Add prefixes for cloud url params (#9649)
This PR adds an ability to exclude some keys in URLSearchParams from being parsed by GUI.
2024-04-09 07:38:06 +00:00
Ilya Bogdanov
8aef2146db
Use predefined zoom levels (#9585)
Fixes one subtask of #9354

https://github.com/enso-org/enso/assets/6566674/3418d31e-2d80-48b2-ba8b-9e000b09cf14
2024-04-08 11:12:53 +00:00
Ilya Bogdanov
e174dee1bf
Fix documentation panel layout (#9615)
Fixes #9414

`.argument` class was not scoped and broke documentation panel.


<img width="439" alt="Screenshot 2024-04-03 at 3 06 43 PM" src="https://github.com/enso-org/enso/assets/6566674/fe94a668-8125-452c-b038-196e5a10657c">
2024-04-08 11:06:00 +00:00
somebody1234
07793f576b
Fix reloading when the saved project uses the Local Backend (#9627)
- Fix https://github.com/enso-org/cloud-v2/issues/1156
- Fix reloading when the saved project uses the Local Backend

# Important Notes
To reproduce the error:
- Open a project in the Local Backend
- Close and reopen the IDE, or refresh the IDE.
2024-04-08 04:37:52 +00:00
Sergei Garin
c182b303e4
Update organization body param location -> address (#9628)
- Fix https://github.com/enso-org/cloud-v2/issues/1152
2024-04-08 03:52:08 +00:00
somebody1234
0feb987930
Normalize windows paths (#9618)
- Fix #9619
- Fix issue causing the full path to be shown on Windows.

Additional changes:
- Add `npm run watch:windows` script to `lib/client` for developing on Electron.

# Important Notes
Testing instructions:
- Should ideally be tested on Windows. All the following should work:
- Creating, opening and deleting top-level projects
- Creating folders
- Creating, opening and deleting nested projects
- Uploading and deleting top level and nested files
- Moving folders, files and projects
2024-04-08 02:20:28 +00:00
Kaz Wesley
5f464389bc
Hide errors from input nodes (#9633)
When a node has an error/warning/panic that exactly matches one of its input nodes, hide the message until the node is interacted with, showing an icon.

https://github.com/enso-org/enso/assets/1047859/4b1b5e3d-c236-40d7-a3e7-e6ab8182ecd5

# Important Notes
- New icon is used for panics.
- Opening circular menu now shifts any message out of the way, not just warnings.
2024-04-05 18:07:32 +00:00
somebody1234
143665d944
Remove obsolete GUI arguments (#9466)
- Close #8610

# Important Notes
QA notes:
- The GUI2 warning screen should not show up - the arguments that GUI2 do not understand have been removed.
- However, it should be tested that the warnings screen should correctly work when invalid arguments really *are* passed in:
- Via URL query parameters (electron, might need to open the electron app then the browser, *or* do `location.href = ` in DevTools in Electron.)
- By editing `Editor.tsx` to inject invalid args to the big configuration object we pass to the GUI entrypoint.
2024-04-05 16:20:56 +00:00
somebody1234
9cf4847a34
Keyboard navigation between components (#9499)
- Close https://github.com/enso-org/cloud-v2/issues/982
- Add keyboard navigation via arrows between different components
- This is achieved by a `Navigator2D` class which keeps track of the closest adjacent elements.

Other changes:
- Switch much of the codebase to use `react-aria-components`
- This *should* (but does not necessarily) give us improved accessibility for free.
- Refactor various common styles into styled components
- `FocusArea` to perform automatic registration with `Navigator2D`
- `Button` and `UnstyledButton` to let buttons participate in keyboard navigation
- `HorizontalMenuBar` - used for buttons below the titles in the Drive page, Keyboard Shortcuts settings page, and Members List settings page
- `SettingsPage` in the settings pages
- `SettingsSection` in the settings page to wrap around `FocusArea` and the heading for each section
- Add debugging utilities
- Add debugging when `body` has the `data-debug` attribute: `document.body.dataset.debug = ''`
- This adds rings around elements (all with different colors):
- That are `FocusArea`s. `FocusArea` is a wrapper component that makes an element participate in `Navigator2D`.
- That are `:focus`ed, and that are `:focus-visible`
- That are `.focus-child`. This is because keyboard navigation via arrows ***ignores*** all focusable elements that are not `.focus-child`.
- Debug `Navigator2D` neighbors when `body` has the `debug-navigator2d` attribute: `document.body.dataset.debugNavigator2d = ''`
- This highlights neighbors of the currently focused element. This is a separate debug option because computing neighbors is potentially quite expensive.

# Important Notes
- ⚠️ Modals and the authentication flow are not yet fully tested.
- Up+Down to navigate through suggestions has been disabled to improve UX when accidentally navigating upwards to the assets search bar.
- There are a number of *known* issues with keyboard navigation. For the most part it's because a proper solution will be quite difficult.
- Focus is lost when a column (from the extra columns selector) is toggled - because the button stops existing
- It's not possible to navigate to the icons on the assets table - so it's current not possible to *hide* columns via the keyboard
- Neighbors of the extra columns selector are not ideal (both when it is being navigated from, and when it is being navigated to)
- The suggestions in the `AssetSearchBar` aren't *quite* fully integrated with arrow keyboard navigation.
- This is *semi*-intentional. I think it makes a lot more sense to integrate them in, *however* it stays like this for now largely because I think pressing `ArrowUp` then `ArrowDown` from the assets table should return to the assets table
- Likewise for the assets table. The reason here, however, is because we want multi-select. While `react-aria-components` has lists which support multi-select, it doesn't allow programmatic focus control, making it not particularly ideal, as we want to focus the topmost element when navigating in from above.
- Clicking on the "New Folder" icon (and the like) do not focus on the newly created child. This one should be pretty easy to do, but I'm not sure whether it's the right thing to do.
2024-04-05 07:21:02 +00:00
Paweł Grabarz
9c2d25ea8d
Improve gui app disposal handling and close all network connections (#9579)
Fixes #8964

All GUI network connections are now closed after the application is unmounted.
2024-04-04 13:49:54 +00:00
somebody1234
256b5b3068
Hide secret values by default (#9631)
- Hide secret values by default using `input type="password"`. They can be shown and hidden using the eye icon, just like regular password inputs.

# Important Notes
None
2024-04-04 11:03:53 +00:00
Ilya Bogdanov
a474955e28
Fix dropdown item paddings (#9616)
Fixes a small issue with dropdown item alignment.

<img width="243" alt="Screenshot 2024-04-03 at 4 55 12 PM" src="https://github.com/enso-org/enso/assets/6566674/96803537-bc30-456c-b694-5fd7c70e21db">
2024-04-03 13:35:13 +00:00
Ilya Bogdanov
44097508c7
Make color override stable (#9612)
Fixes #9610

I was wondering why we need this check, now I know.
2024-04-03 13:01:36 +00:00
Paweł Grabarz
ef79474a74
Fix reported content-length in project manager shim. (#9604)
Fixes dashboard errors that prevented the project list from loading when using node shim implementation of project listing commands, such as:
```
Could not list root folder.: Unterminated string in JSON at position 10021 (line 1 column 10022)
```

The issue was caused by a cut-off JSON response, due to incorrect calculation of encoded response byte length.
2024-04-03 09:24:40 +00:00
Ilya Bogdanov
c37fffe33d
Fix numeric input widget (#9602)
Fixes the issue with numeric input being unclickable if the WidgetSelection is present. The issue was caused by double handling of the click event both in numeric input (it opened the dropdown) and in dropdown (it closed itself).
2024-04-02 20:36:12 +00:00
Sergei Garin
06b416d499
Context menu should have a Edit Description on files (#9530)
Closes: enso-org/cloud-v2#1083

Tl;dr: This PR introduces a new menu entry that allows to open edit description dialog from context menu in dashboard. This supposed to work only in cloud.
When you right-click on an item in Cloud Drive, you can choose "Edit description" option to change the description of the selected item.


https://github.com/enso-org/enso/assets/61194245/53e949df-8a31-401c-ba48-52eddad468fa



Context:
See enso-org/cloud-v2#1083 . I decided to open a dialog insted of the sidebar because latter takes to much time and effort to make it properly.


This Change:



Added new variants for button component(submit & cancel), also - loading state.Added a new dialog that opens when you select "Edit description" in context menu.


Test Plan:

1. We shouldn't allow users to change the description for local files
2. Changes in the Dialog(after save) should reflect in sidebar(Description should update in sidebar)
3. Loading state/Errors should be displayed in dialog.
2024-04-02 16:02:13 +00:00
Paweł Grabarz
84c8535587
Allow vector widget only on vector expressions. (#9596)
Fixes #9593

<img width="426" alt="image" src="https://github.com/enso-org/enso/assets/919491/a794a023-420d-4358-8068-252d8d136a57">
2024-04-02 13:41:58 +00:00
Ilya Bogdanov
9db264231e
Fix project edits (#9594)
Fixes the issue that prevents project edits from being committed.
2024-04-02 12:33:14 +00:00
Ilya Bogdanov
bef6f3a4f9
Color picker (#9570)
Closes #8680

The color picker is triggered by new Circular menu item or by keyboard shortcut (set to `Mod+Shift+C` for **C**olor).
The color picker affects *selected* nodes, so it works nicely both in cases when we use Circular menu on a single node a shortcut with multiple selected nodes.

Color is only changed when the user selects a new one inside the color picker, but there is no specific way to reset default color (you would have to recreate the node).

https://github.com/enso-org/enso/assets/6566674/a4497bea-f432-486d-85f8-f2772ba5694f
2024-04-02 11:27:13 +00:00
somebody1234
4c7c20ad08
Send credentials on open_project (#9468)
- Close https://github.com/enso-org/cloud-v2/issues/1038
- Send credentials for libs to use, when opening projects against the Cloud (Remote) backend.

# Important Notes
None
2024-04-02 06:47:35 +00:00
Ilya Bogdanov
084f4ee033
Fix numeric widget slider (#9578)
Fixes #9574


https://github.com/enso-org/enso/assets/6566674/ac9c381f-b62f-43cf-8ad9-a71c75c9fbc3
2024-04-01 20:16:57 +00:00
somebody1234
5416462c3c
Fix dateTime.test.ts (#9587)
Fix an issue caused by `dateTime` tests not taking daylight savings into account.

# Important Notes
None
2024-04-01 19:15:49 +00:00
somebody1234
3c5e15bbbd
Prevent context menus from going off the left side of the screen (#9567)
- Occurs when right clicking near the left side of the screen.

# Important Notes
None
2024-04-01 09:05:49 +00:00
Adam Obuchowicz
2384fe851d
Fix undoing node removal (#9561)
Fixes #9314

The node deletion does not remove AST node from the module, only unpin it from its parent; so undoing does not add this node, just modify it, and thus we weren't informed about metadata change.
2024-03-29 16:31:00 +00:00
Adam Obuchowicz
207c7af136
Block FQN substitution in drop downs (#9569)
While blocked FQN substitution when creating/editing node, the drop-downs still used it, and it does not work.

This amends that + added a reference to a task where we want to fix the original issue.
2024-03-28 14:11:20 +00:00
James Dunkerley
e262801daa
Restructure Standard.Table. (#9559)
Move the types from `Standard.Table.Data` to `Standard.Table`.

Exceptions:
- `Standard.Table.Data.Report_Unmatched` => `Standard.Table.Constants`.
- `Standard.Table.Data.Join_Kind_Cross` => `Standard.Table.Internal.Join_Kind_Cross`.
Also removed constructor as an atom type.
- `Standard.Table.Extensions.Table_Ref` => `Standard.Table.Internal.Table_Ref`.
- `Standard.Table.Data.Type.Value_Type_Helpers` => `Standard.Table.Internal.Value_Type_Helpers`.
- `Standard.Table.Data.Type.Enso_Types` => `Standard.Table.Internal.Value_Type_Helpers`.
- `Standard.Table.Data.Type.Storage` => `Standard.Table.Internal.Storage`.

Changed all `Standard.Table` imports inside project to be project.
Favoured importing from `Standard.Table.Main` in `Standard.Database`.
Also fixed some linting in Enso_File.
2024-03-27 17:10:43 +00:00
Nikita Pekin
fc0269fd6d
refr(enso-org/cloud-v2#1060): Rename OrganizationInfo fields to camelCase (#9511)
- Shortens `OrganizationInfo.organization_name` -> `name`
- Renames `OrganizationInfo.pk` -> `id`

This standardizes the field name casing, removes verbosity in field names, and removes the `pk` implementation detail.
2024-03-27 16:46:15 +00:00
Nikita Pekin
6d73dadcee
impr(enso/cloud-v2#912): Add organization_id and user_id fields to SimpleUser (#9508)
- Updates the model types for the request/response bodies to match the backend.
  - Renames `CreatePermissionRequestBody::userSubjects` to match `CreatePermissionRequestBody::actorsIds` on the backend
  - Renames `UserInfo::organization_id` to camel case
  - Adds `UserInfo::userId` field to match the backend
  - Merges `SimpleUser` into `UserInfo`

Previously, `UserInfo`'s `OrganizationId` was serialized as `pk`. This
is not desired since `pk` is an implementation detail (relating to
DynamoDB). This commit renames the field to accurately reflect the type
of data it contains.

- Renames `User::id` to `User::organizationId`.

Previously, the user's organization ID was under the `id` field. As of
enso-cloud/cloud-v2#1098, this is no longer the case. The
`organizationId` field is no longer a user's primary identifier --
`userId` should be used for that purpose instead. So this field has been
renamed to `organizationId` to more clearly describe the purpose of the
field.

Affects the responses expected from the following endpoints:

- `PUT /users/me/picture`
- `PUT /users/me`
- `GET /users/me`
- `PUT /users/{userId}/usergroups`

- Adds `User::userId` field.

Previously, the user's organization ID was used to uniquely identify a
user. Now that multiple users can be invited to an organization, it is
no longer appropriate to use organization ID to uniquely refer to a
user. For this purpose, the backend has introduced the `userId` field.

Affects the responses expected from the following endpoints:

- `POST /users`
- `PUT  /users/me/picture`
- `PUT  /users/me`
- `GET  /users/me`
- `PUT  /users/{userId}/usergroups`

Removes the `user` param from `tryGetSingletonOwnerPermission`. This
param was previously required. It was required because a `userSubject`
was necessary to optimistically generate a `UserPermission`. With recent
refactors, a `userId` can be used in place of `userSubject` to generate
a `UserPermission`. The existing param `owner` provides the `userId`, so
the `user` param is redundant and can be removed.

- Removes `UserInfo` from the `FullUserSession`.

Previously, `UserInfo` in the `FullUserSession` was required to obtain a
`userSubject`. Now, `userSubject` has been deprecated in favour of
`userId`. `User` provides `userId`, and is present in the
`FullUserSession`. Thus, this commit removes `UserInfo` from the
`FullUserSession` since it is redundant.

- Renames `UserInfo` fields to `camelCase`

Previously, `UserInfo`'s fields were serialized as `snake_case`. This is
not desired since the convention for the frontend is to use `camelCase`
for field names where possible. This commit renames the fields to be
`camelCase`, now that the backend has been updated accordingly.

- Sorts by `userId` rather than `email`
- Compares by `userId` rather than `email`

- Extends `User` from `UserInfo`

After refactoring, `UserInfo` is now a subset of `User`. To remove
duplication, this commit modifies `User` to extend `UserInfo`.
2024-03-27 15:58:08 +01:00
somebody1234
6f7a51470d
Directory management on Local (Project Manager) backend (#9353)
- Implement https://github.com/enso-org/cloud-v2/issues/961
- Allow directory management on Local backend
- Setting a custom root directory is currently *out of scope* of this PR.
- Listing directories
- Deleting directories and files
- Adjust project-related APIs to accept parent directory path (as required by PM when not interacting with root directory)
- QoL improvements related to testing this PR
- New watch script (`npm run watch2`, `npm run watch:linux`) in `app/ide-desktop/lib/client/`) for testing IDE2 on Electron without having to build the entire app
- Adjustments to `gui2`'s `vite.config.ts` to allow React HMR when doing dev in Electron

# Important Notes
- Support for deleting files and folders uses the API introduced by #9359 - so it will not work until that PR is merged in.
- Support for uploading files uses the API specified by #9360 - so it will not work until that issue is closed.
2024-03-27 14:42:23 +00:00
Adam Obuchowicz
b422b59ed1
Fix collapsing node issues (#9545)
Fixes #9412
Fixes #9159
2024-03-27 14:00:33 +00:00
Radosław Waśko
f2d6079ac4
Fix missing AWS region in S3 operations (#9546)
- Closes #9284
- Now our tests run without the default `AWS_` config, thus ensuring that the tested setups work in a clean environment.
- After all, more complicated logic was needed for buckets access - apparently the AWS SDK only allows for some operations on buckets to happen if the client is connected to the correct region. Thus detection of bucket regions had to be implemented.
- Added `AWS_Region` widget based on autoscoping.
- Fixed `AWS_Credential.profile_names` crashing if no AWS config was found. Now it returns no profiles if not found. Added a regression test.
2024-03-27 12:00:15 +00:00
Sergei Garin
3eb47ac2ba
Listing versions on file results in 403 flood (#9531)
Closes: enso-org/cloud-v2#1081

Tl;dr: [optional] 1-liner if the context of the change is long


Context:


This Change:

This PR specifies the amount of retries if the request is sent through ReactQuery.


Test Plan:

Try to reproduce the bug from the issue, see that requests stops after 3 retries.
2024-03-27 10:29:45 +00:00
Sergei Garin
ba6c1c2dc8
Crash when editing secret (#9532)
Closes: enso-org/cloud-v2#1085


Context:
---


This Change:

This PR changes the endpoint for updating a secret from `s3cr3tz` to `secrets`.

Test Plan:

Add a secret on dashboard then right click on it -> edit -> change the value -> check that the secret is updated
2024-03-27 10:05:43 +00:00
Radosław Waśko
af5354b869
Data Link for reading Enso_File (#9525)
- Closes #9282
2024-03-27 04:17:07 +00:00
Michał Wawrzyniec Urbańczyk
05715bdedf
Inject AG Grid and Mapbox keys through the CI from the GitHub organization variables (#9544)
This PR exposes two new variables added to GitHub organization.

# Important Notes
<details>
<summary>Dev builds issue</summary>
I have doubts about this approach, as this breaks Map visualization on developer builds:

![obraz](https://github.com/enso-org/enso/assets/1548407/29aa8e40-7481-4460-bdd4-c30d3ee76b6c)

It seems that Mapbox API cannot be used without the token — [the documentation](https://docs.mapbox.com/help/getting-started/access-tokens/) suggest so, and the  https://api.mapbox.com/styles/v1/mapbox/light-v9?access_token=no-token yields quite obvious `{"message":"Not Authorized - Invalid Token"}`.

Still, the CI-produced packages have no issues.
</details>

EDIT: [We do want this behavior, as discussed internally.](https://discord.com/channels/401396655599124480/1221868987030311012/1222162657352876075)
2024-03-27 00:17:37 +00:00
Adam Obuchowicz
09a6ab7bd6
Select node on any edit (#9536)
Fixes #7478

[Screencast from 2024-03-25 15-44-50.webm](https://github.com/enso-org/enso/assets/3919101/bd5b2bbd-631f-4397-97ae-d925b9194210)
2024-03-26 13:01:51 +00:00
Paweł Grabarz
1fa1803f6c
Move imports to first script block to avoid prettier issues (#9512)
Fixes #9502
2024-03-26 10:34:25 +00:00
Paweł Grabarz
1872bb66ea
Ignore repeated key events for bound shortcuts, adjust visualization min width (#9537)
Fixes #8538 #9515

All repeated keyboard events handled through `defineShortcuts` are now ignored. For example, holding ctrl+v no longer pastes nodes repeatedly.

Also adjusted visualization min-width to 200px, since it was a trivial change.

![image](https://github.com/enso-org/enso/assets/919491/7997898f-bcee-45f2-aacb-e10a49b159d6)
2024-03-25 19:29:31 +00:00
Adam Obuchowicz
70f847f295
Fix file browser on Linux and Windows (#9538)
Fixes #9503

[The `showFileBrowser` documentation has a note](https://www.electronjs.org/docs/latest/api/dialog#dialogshowopendialogsyncbrowserwindow-options), that Linux and Windows don't support enabling picking dir and file.
2024-03-25 17:07:04 +00:00
Kaz Wesley
22a2c208c0
Multi-select (part 1) (#9516)
* Multi-select
2024-03-25 12:05:20 -04:00
Kaz Wesley
0d34126b86
New JSON visualization (#9409)
* JSON viz with projections, colors, inlining

* Ensure GraphEditor receives keyboard events for newly-selected nodes

* Consider positioned, unsized nodes when positioning
2024-03-25 12:03:18 -04:00
Adam Obuchowicz
a6fc8cb932
Reimplement AI PoC from GUI1 (#9476)
Fixes #9313

[Screencast from 2024-03-22 09-09-07.webm](https://github.com/enso-org/enso/assets/3919101/6ad86145-6882-4bde-993d-b1270f1ec06c)

# Important Notes
* This is PoC, so I didn't spend time on polishing the visuals; the design will likely change.
* I modified the shortcut handler a bit, allowing making multiple actions for same binding - the action's handler will be called in unspecified order, until one of them handle the event (i.e. not return false).
* To make it working regardless of imports, I needed to export AI module in Standard.Visualization. Moreover, needed to remove build_ai_prompt for Any, because it was causing issues - expect a bug report soon.
2024-03-25 09:14:41 +00:00
somebody1234
770e18768a
Move all user-facing text to a central location (#8831)
- Closes https://github.com/enso-org/cloud-v2/issues/861
- Adds a `getText` function and React Context to abstract away all text that is shown to users

The main immediate benefit is making all text much more discoverable - both being able to know of every piece of text used across the entire application, and making it a lot easier to refactor certain strings when needed rather than having to hunt for strings to replace (and potentially miss one).

The longer term benefit is that this will make it easy to add localization, by simply adding another JSON file with the same keys as the existing one, and adding a little bit of logic.

# Important Notes
None
2024-03-25 08:13:24 +00:00
Michał Wawrzyniec Urbańczyk
90bbee352e
Bump Rust Toolchain (#9517)
This PR updates the Rust toolchain to recent nightly.

Most of the changes are related to fixing newly added warnings and adjusting the feature flags. Also the formatter changed its behavior slightly, causing some whitespace changes.

Other points:
* Changed debug level of the `buildscript` profile to `lint-tables-only` — this should improve the build times and space usage somewhat.
* Moved lint configuration to the worksppace `Cargo.toml` definition. Adjusted the formatter appropriately.
* Removed auto-generated IntelliJ run configurations, as they are not useful anymore.
* Added a few trivial stdlib nightly functions that were removed to our codebase.
* Bumped many dependencies but still not all:
* `clap` bump encountered https://github.com/clap-rs/clap/issues/5407 — for now the warnings were silenced by the lint config.
* `octocrab` — our forked diverged to far with the original, needs more refactoring.
* `derivative` — is unmaintained and has no updated version, despite introducing warnings in the generated code. There is no direct replacement.
2024-03-24 23:45:55 +00:00
Sergei Garin
7c3e316239
Diff editor (#9458)
Closes  enso-org/cloud#940
2024-03-23 18:44:56 +00:00
Sergei Garin
6c1ba64671
Implement back and forth navigation (#9301)
- Closes enso-org/cloud-v2#940
2024-03-22 12:36:08 +00:00
James Dunkerley
283c0b61d9
Data link for Snowflake. (#9514)
Adding in Snowflake into the Datalink APIs.
![image](https://github.com/enso-org/enso/assets/4699705/32bd347c-0b2b-47b5-bec2-5c939ecd0594)
2024-03-21 17:06:56 +00:00
Kaz Wesley
ef9f3cc11e
Fix uninterpolated-text newline-insertion case (#9513)
Fixes #9494.
2024-03-21 14:20:53 +00:00
Sergei Garin
80e2d68cda
Loose tailwind rules for eslint (#9496) 2024-03-21 09:53:34 +04:00
Michał Wawrzyniec Urbańczyk
55a47dac20
[CI] Fix the notarization (#9506)
The https://github.com/enso-org/enso/pull/9435 broke the notarization, as it adds new binaries to the package that need to be included in our code signing workarounds.
2024-03-21 03:50:43 +00:00
Nikita Pekin
4ed970d9d1
refr(enso/cloud-v2#912): Rename SimpleUser.id to SimpleUser.userSubject (#9490)
This PR updates the model types for the request/response bodies to match the backend.

These changes are for the (yet to be merged) changes to the `User` types:
- https://github.com/enso-org/cloud-v2/pull/1075

Note that this PR must be **merged after the above PRs have been merged and deployed** to the backend.

- Rename `SimpleUser::id` to `SimpleUser::userSubject` to match the backend

# Important Notes
On the backend, `SimpleUser.id` has been renamed to `SimpleUser.userSubject` for consistency.  This commit updates the frontend to account for this change.
2024-03-20 18:48:29 +00:00
Nikita Pekin
ecd56bbba8
impr(enso/cloud-v2#912): Add organization_id and user_id fields to SimpleUser (#9489)
This PR updates the model types for the request/response bodies to match the backend.

Some of these changes are for the (already merged) user groups PRs, (i.e., the switch to `actorsIds`):
- https://github.com/enso-org/cloud-v2/pull/926
- https://github.com/enso-org/cloud-v2/pull/939

Some of these changes are for the (yet to be merged) changes to the `User` types:
- https://github.com/enso-org/cloud-v2/pull/1073

Note that this PR must be **merged after the above PRs have been merged and deployed** to the backend.

- Rename `CreatePermissionRequestBody::userSubjects` to match `CreatePermissionRequestBody::actorsIds` on the backend
- Add `SimpleUser::organizationId` to match the backend
- Add `SimpleUser::userId` to match the backend
- Rename `UserInfo::pk` to `UserInfo::user_subject` to match the backend
- Rename `UserInfo::organization_id` to `UserInfo::pk` to match the backend
- Add `UserInfo::sk: UserId` to match the backend
2024-03-20 18:01:11 +00:00
Adam Obuchowicz
a02cfa4906
Workaround for failing test (#9498)
One of our tests had transient failures, which were very tricky to track - it seems that not every `mouse.move` action actually emits 'pointerleave' action, on which we rely when hiding node menu.

I played with different configurations, and this one looks quite reliable (100 runs of tests in a row passed, at least). But I still don't understand what is happening there, and the investigation will be in scope of #9478
2024-03-20 13:36:33 +00:00
Adam Obuchowicz
84301bd7b6
Fix Conditional ports tests. (#9495)
Fixes #9459

Sometimes, especially on prod builds, the click handler quickly created CB before playwright made its actionability checks.
2024-03-20 11:00:22 +00:00
somebody1234
dfaab53601
Fix project not opening after reopening IDE when on Local backend (#9465)
- Fix #9455
- Also fix minor issue where disabled `Button`s had `cursor: pointer`.

# Important Notes
None
2024-03-19 20:15:20 +00:00
Radosław Waśko
6e5b4d93a3
Implement refreshing the Cloud token in Enso libraries (#9390)
- Closes #9300
- Now the Enso libraries are themselves capable of refreshing the access token, thus there is no more problems if the token expires during a long running workflow.
- Adds `get_optional_field` sibling to `get_required_field` for more unified parsing of JSON responses from the Cloud.
- Adds `expected_type` that checks the type of extracted fields. This way, if the response is malformed we get a nice Enso Cloud error telling us what is wrong with the payload instead of a `Type_Error` later down the line.
- Fixes `Test.expect_panic_with` to actually catch only panics. Before it used to also handle dataflow errors - but these have `.should_fail_with` instead. We should distinguish these scenarios.
2024-03-19 19:26:34 +00:00
Kaz Wesley
a5b66aaf94
Hide scrollbars until track hovered (#9461)
Hide scrollbars until track area is hovered
- Hovering track area now shows a track
- Clicking in track moves center of scrollbar to position

(Small change requested by @wdanilo)
2024-03-19 15:45:51 +00:00
somebody1234
3505893390
Dashboard fixes (#9467)
- Close https://github.com/enso-org/cloud-v2/issues/1037
- Fix downloading files. The issue was that the S3 domain was not whitelisted.
- Fix #9345
- Fix https://github.com/enso-org/cloud-v2/issues/1012
- Make "Update" button in assets panel (right panel) disabled until its value is updated.

# Important Notes
None
2024-03-19 13:31:33 +00:00
somebody1234
4379df7c2d
"Activity log" settings page (#9311)
- Close https://github.com/enso-org/cloud-v2/issues/942
- Add "Activity log" settings page
- Show info common between all events
- Specific event info NOT added yet as the appropriate info is currently lacking
- Add support for multi-select in dropdowns (required for the "Activity log" settings page)
- Animate opening of dropdowns

# Important Notes
None
2024-03-19 06:17:28 +00:00
Michał Wawrzyniec Urbańczyk
de9f2764f9
Remove ensogl-pack (#9407)
This PR removes enso-pack (ensogl-pack) crate.
It still keeps the `enso-runner` JS package, as it is used for CLI argument parser and logger. The runner should be probably refactored (and possible removed altogether).

# Important Notes
I've temporarily extracted the `enso-runner` to `lib/js` directory, as I wanted to avoid keeping pure JS library under `lib/rust`. Attempts at integrating this with `app/ide-desktop` and family caused too much trouble for this PR. The expectation is that the package will be removed or moved elsewhere soon anyway.
2024-03-18 12:18:18 +00:00
somebody1234
703cafa6d9
Fix drag-n-drop onto empty space below asset table (#9446)
- The invisible drop target below the assets table was absent, breaking both drag-n-drop of external files, and drag-n-drop of existing assets to the root directory.

# Important Notes
None
2024-03-18 08:47:01 +00:00
Kaz Wesley
e1893b65af
Self-argument access chain ports are conditional (#9439)
Ports for `PropertyAccess` AST nodes that (transitively) contain a `WidgetSelfArgument` are not targets for a disconnected edge, unless the mod key is held.

https://github.com/enso-org/enso/assets/1047859/68ac1953-c8b1-4e51-8c4c-211595e0c034

(Video shows with and without mod key)
2024-03-18 03:24:22 +00:00
Kaz Wesley
47d9e73ead
Fix CB interaction with record-mode override and add tests (#9386)
Fixes #7976.
2024-03-17 17:44:39 +00:00
Kaz Wesley
85ddbc5f24
Remove-warnings button (#9391)
Add remove-warnings button to Warnings Visualization. Part of #9226.

https://github.com/enso-org/enso/assets/1047859/1b00a62e-8f3b-4697-af10-34a4b93ca8ff
2024-03-17 16:29:56 +00:00
Kaz Wesley
babf4eba03
Inhibit clipping when dropdown is opened (#9434)
Fixes #9379.

# Important Notes
- The existence-registry could be implemented with a counter, but a set is more debuggable and the performance cost is negligible.
2024-03-17 15:54:30 +00:00
Adam Obuchowicz
bd92567a93
Make use of new icons from figma (#9447)
Updates the icon set from figma and uses some of them in particular places (the zoom controls are just replaced).

![image](https://github.com/enso-org/enso/assets/3919101/ba8f0f81-d7fd-4b36-990a-fa0b9a1f75e7)

On this screen minus button is hovered:

![image](https://github.com/enso-org/enso/assets/3919101/0681ee62-9575-476c-8961-c0822b08486e)
2024-03-15 15:18:23 +00:00
Adam Obuchowicz
aecabfe0de
Drop-down filtering (#9399)
Fixes #9058 - the filtering so far is a bit aggressive, but I tune it up in next PR(s).

[Screencast from 2024-03-13 15-20-17.webm](https://github.com/enso-org/enso/assets/3919101/112ce65a-a8c6-4818-b8b8-9f493caf9c81)

Added new special `WidgetEditHandler,` allowing handling "multi-widget" interactions needed for drop down filtering.

# Important Notes
* Now when clicking on argument name, the edit is accepted (as normal "outside" click), and then the dropdown is opened again (due to handling click event). I didn't figure out how to handle this case properly, left something least confusing.
2024-03-15 15:15:43 +00:00
Ilya Bogdanov
c4cb7b9305
Store additional metainformation for defineKeybinds (#9427)
Closes #9411

Based on #9365 

<img width="261" alt="image" src="https://github.com/enso-org/enso/assets/6566674/2b419fde-9f66-455e-804b-1690edfb2883">
2024-03-15 15:48:50 +01:00
somebody1234
515dacfec2
Fix warning in console about the dashboard keybind namespace being rebound (#9214)
- Fix warning showing up in Console
- Adjust behavior of `Enter` in "capture keyboard shortcut" modal
- Fix keyboard shortcuts multiplying on refresh after adding custom shortcuts
- Fix "delete asset" shortcut working even in the Editor page. Repro steps:
- Select a project without opening it
- Open the project
- Press the "delete" key ("backspace" on macOS) to ensure that the keybind works properly
- Press "escape" to close the modal
- Wait for Graph Editor to open
- Press "delete" and verify that the modal no longer appears. (On develop it does appear - this is incorrect behavior.)

# Important Notes
None
2024-03-15 13:16:35 +00:00
somebody1234
87291d5e6c
Fix dashboard bugs (#9378)
- Fix https://github.com/enso-org/cloud-v2/issues/979
- Close https://github.com/enso-org/cloud-v2/issues/946
- Fix https://github.com/enso-org/cloud-v2/issues/974

# Important Notes
None
2024-03-14 20:01:49 +00:00
somebody1234
cd94437f54
Allow downloading Data Links and projects (#9297)
- Close https://github.com/enso-org/cloud-v2/issues/944
- Allow downloading Data Links, not just files, from the Cloud backend.
- Close https://github.com/enso-org/cloud-v2/issues/947
- Also allow downloading projects. This is SAFE to add before the cloud redeploy because the property is optional anyway.

# Important Notes
None
2024-03-14 18:43:11 +00:00
Ilya Bogdanov
b33079e68b
Code editor open-close improvements (#9365)
Closes #9209

https://github.com/enso-org/enso/assets/6566674/43984978-004b-4ed2-a55e-de9302dc1fdd

- Added new menu item `Code editor` which toggles visibility of, well, code editor
- Changed the menu implementation:
- Fixed platform-dependent “More” icon. It was displayed awfully on Mac.
- Added simple opacity animation.
- Reduced width slightly.
- Refactored the layout, removed unused classes and CSS…
- Added animated background when hovering “Show all” icon
- Added close button to the upper left corner of the code editor (upper right is occupied by resize controls)
2024-03-14 17:05:29 +00:00
Paweł Grabarz
1b59744660
cleanup GUI entrypoints and mocking (#9403)
This is a set of split off changes made as a side effect while working on engine reconnection handling.

Cleaned up GUI e2e setup, unified as much of the entrypoint code as possible. Currently the only real difference between the real and testing entrypoint is mocking of all network calls and not loading through dashboard.

I've managed to completely get rid of `MockApp`, and remove tricky mocking of pinia stores.
2024-03-14 17:05:26 +00:00
somebody1234
6017e6802f
Display custom unicode instead of ArrowLeft in keyboard shortcuts (#9426)
- Close https://github.com/enso-org/cloud-v2/issues/1006

# Important Notes
None
2024-03-14 14:22:44 +00:00
Ilya Bogdanov
2ad6cdd1f6
Fix e2e tests on Mac (#9401)
Some e2e tests (about leaving nodes) were always failing on my machine because of the race condition in the tests. The issue was caused by edges positions lagging behind for a few frames when switching Enso functions, which caused incorrect handling of clicks in the test code.

Now we wait for edges being initialized *and* node sizes being updated.

Thanks to @farmaazon for helping with debugging.
2024-03-14 13:43:44 +00:00
Ilya Bogdanov
720a72ccb2
Implement file browser widget (#9302)
Closes #8681

https://github.com/enso-org/enso/assets/6566674/46a6de40-cbd0-427e-942d-b58ad4a9fd33
2024-03-14 12:27:15 +00:00
somebody1234
2ec7817068
Refactor CSS; address some design issues (#9260)
- Implement https://github.com/enso-org/cloud-v2/issues/924
- Refactor all numbers out to CSS variables
- Implement some issues raised in the design meeting
- The columns selector now only contains *hidden* columns, rather than all of them.
- Unified opacity for active (100%), selectable and hovered (75%), selectable (50%) and disabled (30%)
- Easily configurable if we want to change it in the future, so the specific values don't matter too much for now.
- Always show asset right panel if it is enabled - display placeholder text if <1 or >1 asset is selected
- Hide docs icon that was in the top right assets menubar (next to the gear icon for asset settings) (as backend functionality has yet to be implemented)
- Clicking a user in the "Shared with" column now adds them to the search as `owner:<username>`
- Add a gap between adjacent rows. This makes each row more visually distinct when many rows are selected
- Center the left column (the first column) of the context menu below the mouse, rather than centering the entire context menu.
- Fix regressions caused by CSS refactor
- Make keyboard selection indicator for asset rows rounded again
- Other misc. fixes and improvements
- Slightly modified styling of chat reaction bar
- Hide the row containing the "New Project" button in the cloud drive, when not in the "Home" drive tab
- Animate rotation of column sort arrow when clicking on a column to change the sort order
- Consistent duration of arrow rotation animation for folder arrows, column sort arrows, chat thread list arrows
- Consistent icon for sort arrow for folders and the chat thread list
- Minor adjustment of styles for optional properties in the Data Link input

Not included in this PR:
- Custom (HTML) scrollbars for consistency across all browsers and all OSes (except perhaps touchscreens)
- Potentially time-consuming to look for a library (and not quite trivial to implement ourselves)
- Columns sliding left as they expand and right as they collapse
- Also non-trivial, especially when taking into account horizontal scrolling.
- Fixing styles to closer resemble Figma design
- As (kinda) mentioned in the meeting - ideally it should be pixel perfect, *but* value consistency with other spacings, opacities etc. over being 100% pixel-perfect
- However, it has *partly* been done - mostly for the home page. It's entirely possible that changes made afterwards broke the spacing again though.

# Important Notes
None
2024-03-13 10:32:05 +00:00
Michał Wawrzyniec Urbańczyk
d9ca6cf023
Build Script Post-Gui1 Cleanup (#9376)
This PR:
* removes much of logic related to building and packaging the gui1;
* made `./run gui` and `./run ide` work with the new gui;
* rename numerous references to the "gui2" or "new gui" in favor of simply "gui", same for "ide".
2024-03-12 20:25:51 +01:00
Kaz Wesley
be4f04f7ff
Comment UI refinement (#9271)
* Comment UI refinement

- Eliminate edit mode:
  - Beginning edit does not change appearance
  - Edit text as rendered, not as formatted in code
- Enter finishes edit
  - Shift+Enter inserts a newline
- Click begins edit regardless of Ctrl
2024-03-12 14:13:36 -04:00
Kaz Wesley
64e29f8761
Fix dropdown clipping (#9384)
Fixes #9379.
2024-03-12 16:52:57 +00:00
Kaz Wesley
c61e397658
Scrollbars (#9310)
Scrollbars
2024-03-12 12:44:29 -04:00
Kaz Wesley
9d988e90da
Show circular menu on icon-hover (#9373)
* Show menu on hover
2024-03-12 11:00:21 -04:00
Sergei Garin
f68365f7a3
Use Iss field instead of domain as a refresh URL (#9380) 2024-03-12 13:52:41 +00:00
Kaz Wesley
39976be267
More type-checking for concrete children (#9375)
Introduce a concrete NodeChild subtype; use it to statically check for the kind of bug that #9357 fixed.
2024-03-12 13:44:00 +00:00
Sergei Garin
6bf37b3d17
Update ~/.enso/credentials file (#9287)
* Pass additional metadata to ~/.enso/credentials

* support old and new credentials format

* fix some issues after the review

* use domain instead of iss field

* small fixes

* rename Uri -> Url

* rename cognito -> Cognito

* remove unneeded file

---------

Co-authored-by: Radosław Waśko <radoslaw.wasko@enso.org>
2024-03-12 12:41:47 +03:00
Adam Obuchowicz
a01aeab3a4
Fix AST spacing (#9366)
Fixes #9357

The main issue was the spread operator using at the wrong place in functions overriding spacing of nodes. The bug, to be visible, required copying AST node before, because during copying `whitespace` field was explicitly set to undefined (in opposite to being unset), what in turns make spread overriding the value set by those functions.

# Important Notes
* To enable VSCode debugging, added a workspace for vitest and fix any relative path to be working-dir independent.
2024-03-12 01:57:29 +00:00
Radosław Waśko
c401694fa9
Add missing icon to Excel DataLink schema (#9370)
I forgot to do this in the previous PR #9346, so following up.
2024-03-11 22:46:01 +00:00
James Dunkerley
29784de391
Fix issues with labels in qualified entry names. (#9368)
- Use label for entries by qualified name.
![image](https://github.com/enso-org/enso/assets/4699705/e299dae7-7165-4bde-a055-dc5c05326a15)
2024-03-11 22:27:59 +00:00
Radosław Waśko
e98306f170
Excel DataLink (#9346)
- Adds the Excel format as one of the formats supported when creating a data link.
- The data link can choose to read the file as a workbook, or read a sheet or range from it as a table, like `Excel_Format`.
- Also updated Delimited format dialog to allow customizing the quote style.
2024-03-11 16:12:12 +00:00
Kaz Wesley
1f6db1ef43
Move selections to a new layer (#9344)
Move selections to a new Vue component so that they don't interfere with clicking on edges.

https://github.com/enso-org/enso/assets/1047859/190006df-1402-4a5f-9117-f43788fa4187

# Important Notes
- The new `GraphNodeSelection` components are drawn in a `GraphNodeSelections` container. They are created by the `GraphNode`s and teleported so that the node can set properties directly.
2024-03-11 15:40:16 +00:00
Sergei Garin
b2215bed2c
Fix broken login flow (#9352) 2024-03-11 15:26:59 +00:00
Ilya Bogdanov
38ffcd09de
Use vue’s Transitions for animation of the placeholders (#9335)
Closes #9333

https://github.com/enso-org/enso/assets/6566674/705e23c2-0ee0-40b0-9919-9c320f8788c5
2024-03-11 13:29:53 +00:00
Ilya Bogdanov
793fb8f48e
Use labels from the engine if they are available (#9290)
Fix small regression on develop for dropdown labels.

<img width="645" alt="Screenshot 2024-03-05 at 7 09 22 PM" src="https://github.com/enso-org/enso/assets/6566674/caec9cbc-ef8d-4ac2-8ec1-cf2de909f2d4">
2024-03-11 10:56:56 +00:00
Kaz Wesley
8e437fa52a
Ast.Vector (#9328)
Add `Vector` AST type, corresponding to the `RawAst.Tree.Array` type (name `Array` not used for obvious reasons).

This is the first step of #5138.

### Important Notes

- Switched some string-based vector construction to `Vector.new`, improving type-safety.
- The `Ast` changes are covered by the round-trip tests; the use-site changes have been tested manually.
2024-03-08 15:14:06 -05:00
James Dunkerley
2df2d958ed
Correct bug with qualified name of Float. (#9341)
Numeric Input wasn't showing up for floats.
2024-03-08 19:11:23 +00:00
Kaz Wesley
dcad48e66f
Add-node buttons (#9247)
Introduce add-node button below circular menu or open visualization.

https://github.com/enso-org/enso/assets/1047859/aa6cedba-ca7e-44c5-ab27-2f5d5f9421e8
2024-03-08 19:00:39 +00:00
Kaz Wesley
614a5a610b
Zoom steps (#9327)
When zooming with Ctrl+wheel, used fixed-factor steps instead of scroll wheel rate information.

Fixes #9177.

Important Notes
  - Wheel events are distinguished from trackpad gestures, so that OS X pinch-zoom still works nicely.
  - When zooming with the mouse wheel, scale factor is rounded (geometrically) to the nearest power of √2, and then stepped up or down by the same factor; this ensures that round values like 100% are never skipped over.
  - Added directed-clamping logic, so that if the zoom is moved outside the clamping range of a zoom-method, it can be stepped back into range without jumping.
2024-03-08 13:33:54 -05:00
Paweł Grabarz
cee795b5e3
fix text caret not showing for empty input (#9336)
Fixes #9331

Fixed issues with wrong initial size and missing edit caret in text widgets.

<img width="311" alt="image" src="https://github.com/enso-org/enso/assets/919491/44f257cc-18a1-4a9f-9ae0-c1dd9b86674e">

# Important Notes
Automated tests for font loading/initial size will follow shortly. The text caret is not really testable, since it is a hosted object visual issue.
2024-03-08 18:03:23 +00:00
Ilya Bogdanov
df72b38f60
Visualizations fixes follow-up (#9252)
Addressing review suggestions from #9130

- Removing `N` binding
- Removing duplicated `Toggle fullscreen vis` binding

A few important differences from the suggested implementation:
1. There is no easy way to implement `nextType` on GraphEditor – we simply don’t have the required API
2. The keydown handler in `GraphVisualization` must be defined on window level still, otherwise it won’t get keydown events unless visualization is focused, and thus `nextType` won’t work because of (1)

No visual changes to the IDE.
2024-03-08 15:59:15 +00:00
Ilya Bogdanov
ed46fdcf18
Disable qualified name substitution (#9286)
As discussed in discord: https://discord.com/channels/401396655599124480/1201853512409939968/1214547995207663646
2024-03-08 12:57:20 +00:00
somebody1234
6c2b2383d3
Change "Override Execution Context" button to "Record" button on nodes (#9188)
- Close #9164
- Fix appearance of Record/Record Once icon in top menu
- Change icon for overriding execution context to record icon
- Unconditionally show per-node record icon if it is set
- Remove the ability to override the execution context to disabled
- Fix the icon for nodes with an overridden execution context always being the Enso icon

# Important Notes
None
2024-03-08 04:31:32 +00:00
somebody1234
d2f6b1026a
Refactor configuration keys out of repository (#8895)
- Close https://github.com/enso-org/cloud-v2/issues/866
- Remove *all* references to client keys and API base URLs from the codebase.
- The app can still be built by external contributors. *However*, the cloud backend (among some other things) will be completely disabled, as the required keys and base URLs will be missing.
- Add entry to `.gitignore` to allow `*.env` files in `app/ide-desktop/lib/dashboard/`

# Important Notes
- Tested (no `.env`; `.env` with prod backend; `.pbuchu.env`) on:
- `npm run dev` in `app/ide-desktop/lib/dashboard/`
- `./run ide build`
- `./run ide2 build`
- `./run gui watch`
2024-03-08 03:14:26 +00:00
somebody1234
0b271d4b04
Minor improvements (#9187)
- Close https://github.com/enso-org/cloud-v2/issues/918
- Close https://github.com/enso-org/cloud-v2/issues/920

# Important Notes
None
2024-03-08 03:04:13 +00:00