Commit Graph

1045 Commits

Author SHA1 Message Date
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