In the component browser input field, render the source node as an icon instead of its identifier; an edge connects the icon to the source node's output port.
https://github.com/enso-org/enso/assets/1047859/a36a8a55-6717-4887-a72c-2b2eafde4260Closes#9210.
# Important Notes
- Fix node selection being visible (but glitched) while editing node.
- Fix bug in CB positioning when editing a node at non-default zoom.
- Fix disconnected edge hover allowing self-connection.
- Consolidate some color logic in `nodeColors`.
Insert new nodes before the block's terminal expression-statement, if present.
Fixes#9963.
# Important Notes
- Fix a bug that caused any empty lines at the beginning of a module not to be printed.
- Remove a redundant data-property from `GraphNode`.
- Closes#9829
- Name is selected from the type of the first suggestion applied in the component browser
- If no suggestion is selected, we try to infer the name from the AST
- If both fail, we revert to the `operator` name
- Adding unique number suffixes in sequential order, reusing them as soon as they become available.
https://github.com/enso-org/enso/assets/6566674/4e6bd1e5-7b11-4e04-b49f-315675d34a0f
# Important Notes
- Search through available identifiers is linear, which potentially can cause problems in huge projects.
- I made changes to the `ReactiveIndex` implementation to fix the behavior of `identifierUsed()` and `allIdentifiers()` which were not working correctly.
Commit color ring selections to nodes live.
- To prevent opening the picker from immediately changing the color, gradient is rotated so that the initially-selected color is under the mouse when the picker is opened.
- Escape key reverts selection to initial color(s).
Closes#9936
#### New documentation panel:
- Shows documentation of currently-entered method.
- Open/close with Ctrl+D or the extended menu.
- Renders markdown; supports WYSIWYG editing.
- Formatting can be added by typing the same markdown special characters that will appear in the source code, e.g.:
- `# Heading`
- `## Subheading`
- `*emphasis*`
- Panel left edge can be dragged to resize similarly to visualization container.
https://github.com/enso-org/enso/assets/1047859/6feb5d23-1525-48f7-933e-c9371312decf
#### Node comments are now markdown:
![image](https://github.com/enso-org/enso/assets/1047859/c5df13fe-0290-4f1d-abb2-b2f42df274d3)
#### Top bar extended menu improvements:
- Now closes after any menu action except +/- buttons, and on defocus/Esc.
- Editor/doc-panel buttons now colored to indicate whether editor/panel is open.
https://github.com/enso-org/enso/assets/1047859/345af322-c1a8-4717-8ffc-a5c919494fedCloses#9786.
# Important Notes
New APIs:
- `DocumentationEditor` component: Lazily-loads and instantiates the implementation component (`MilkdownEditor`).
- `AstDocumentation` component: Connects a `DocumentationEditor` to the documentation of an `Ast` node.
- `ResizeHandles` component: Supports reuse of the resize handles used by the visualization container.
- `graphStore.undoManager`: Facade for the Y.UndoManager in the project store.
Fixes#9780
Before all drag handlers set pointer capture on their `currentTarget`, preventing click events on the actual click target, and to prevent that we stopped `pointerdown` (and more) on every "panel-like" element. Now it's ok to stop only actually handled events.
Navigator and selection handlers just ignore `pointerdown` events not targeted to actual Graph Editor background.
Node dragging is more complex, as we want to allow dragging the node by grabbing just any of its part (including widgets). So the handler takes pointer capture from widget only after a significant move (long enough in time _or_ space). **This allows user to drag nodes by many interactive widgets (before they stopped `pointerdown` disabling node drag).
[Screencast from 2024-05-08 10-45-33.webm](https://github.com/enso-org/enso/assets/3919101/d521b7a4-96c5-4e2c-a8a6-84388a18d041)
- Increase minimum gradient points
- Update property tests to match browser interpretation of increasing-hue interpolation, and catch bugs of this type.
* 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
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.
- 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`.
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
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).
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.
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.
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
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.
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
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.
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).
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
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.
- 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.
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).
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
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.
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.
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.
- 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.
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.
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.
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
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)
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.
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.
Closes#9209https://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)
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.
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.