* Fix cloud-v2/#421
* Implement "delete project" for local backend
* Implement "project update" for local backend
* Implement project rename; minor fixes to forms
* Fix errors
* Disallow invalid project names when using local backend
Fixes#6377: The fact that `ctrl-r` was restoring the project to potentially the initial state was confusing. This PR changes that shortcut to `ctrl-shift-r`, as discussed in #6377.
Note that:
- `ctrl-shift-r` was already taken by the re-execution shortcut, so that got the `ctrl-alt` modifiers instead, along with the interruption shortcut for consistency.
- `ctrl-alt-shift-r` was already taken by a shortcut to refresh the whole Electron app, so that wasn't available.
Fixes#6411
The issue was quite popular `map2` instead of `all_with`. I also updated the code to use the modern `debounce` API instead of a hacky 0-millisecond timer.
The FRP of the project view is extremely complicated in this place, and similar race conditions can appear out of nowhere. We must consider refactoring the current implementation (everything connected to the CB).
Fixes#6501.
There appears to be an issue with the children of an unlinked display object still receiving FRP mouse events. In this case, they show/hide the unlinked child, leading to it appearing again. This is mitigated by unlinking the affected element directly.
Note that while investigating this, I found that there is an untreated issue with the display object hierarchy, which cause failing tests. The failing test case has been disabled, but the linked issue ([#1405](https://github.com/enso-org/ide/issues/1405)) was closed when migrating tickets. I have re-opened it for triage.
* Revert "Fix lint CI (#6567)"
This reverts commit 0a8f80959f.
* Revert "Run typecheck and eslint on `./run lint` (#6314)"
This reverts commit 7885145b6e.
This PR fixes#6560.
The fix has a few elements:
1) Bumps the Engine requirement to the latest release, namely `2023.1.1`.
2) Changed the logic of checking whether a given version matches the requirement. Previously, we relied on `VersionReq` from `semver` crate which did not behave intuitively when the required version had a prerelease suffix. Now we rely directly on Semantic Versioning rules of precedence.
3) Code cleanups, including deduplicating 3 copies of the version-checking code, and moving some tests to more sensible places.
Closes#5075: dragging or scrolling while a visualisation is in full screen caused the camera to move in the graph editor.
The problem was that clicking on the visualisation triggered some FRP node that indicated that the project list should be closed, which then indicated that the navigator shouldn't be disabled. However, the FRP code in the graph editor interpreted "shouldn't be disabled" as "should be enabled", ignoring the fact that there's also a full-screen visualisation, which should always disable the navigator.
https://user-images.githubusercontent.com/607786/235908932-0b579d69-5fd8-438e-a82b-02678d8e6156.mp4
Closes#6196.
Three things were going wrong:
- Not directly contributing, but adding confusion was the fact that padding of 5px was added in two different places. Since the 10px we've had up until now looked better, especially given the size of the rounded corners, I've kept it at 10px, but only applied in one place.
- The main issue was that the length the scrollbars scroll over didn't take padding into account. At the same time, I changed the `max` and `thumb_size` variables to the coordinate system of the content. This is also how they're being used in `ScrollArea`, which is the only other place where `Scrollbar`s are being used.
- The line height of text grid entries was set to the default of 1.2. That's the default line height in browsers, which is great for multi-line text and elements whose height is greater than the line height. In this case, however, where the height and the font size are set to the same value, the default setting of 1.2 pushes the text below the allotted space.
https://user-images.githubusercontent.com/607786/234297411-8c0b3851-5977-4ca5-b3b4-5b0782510e14.mp4
This unused crate is super old and has some old dependencies. Its old dependencies of `parking_lot` or `parking_lot_core` might be causing a wasm compilation bug we've been having (#6091), but it's not clear.
This PR makes the IDE main process to write its logs to a file.
This is meant to allow debugging in cases where stdout logs would be otherwise unobservable, like when IDE is spawned by the OS as a handle for a given file extension or URL protocol.
This is not integrated in any way with the renderer's process logs, or anything that is printed within the content's dev console. This can be provided in the future if deemed useful.
This is a re-creation of #6308.
Creates buttons to switch between cloud and local backends for listing directories, opening projects etc.
# Important Notes
The desktop backend currently uses a hardcoded list of templates, mostly because they look better because they have background images. However, it can easily be changed to use `listSamples` endpoint and switched to the default grey background.
Fixes#6228
An annoying issue was hidden deep in the code for updating named arguments after input port disconnection.
Kudos to @Frizi for help with investigating it and the initial implementation of the fix.
Remove the magical code generation of `enso_project` method from codegen phase and reimplement it as a proper builtin method.
The old behavior of `enso_project` was special, and violated the language semantics (regarding the `self` argument):
- It was implicitly declared in every module, so it could be called without a self argument.
- It can be called with explicit module as self argument, e.g. `Base.enso_project`, or `Visualizations.enso_project`.
Let's avoid implicit methods on modules and let's be explicit. Let's reimplement the `enso_project` as a builtin method. To comply with the language semantics, we will have to change the signature a bit:
- `enso_project` is a static method in the `Standard.Base.Meta.Enso_Project` module.
- It takes an optional `project` argument (instead of taking it as an explicit self argument).
Having the `enso_project` defined as a (shadowed) builtin method, we will automatically have suggestions created for it.
# Important Notes
- Truffle nodes are no longer generated in codegen phase for the `enso_project` method. It is a standard builtin now.
- The minimal import to use `enso_project` is now `from Standard.Base.Meta.Enso_Project import enso_project`.
- Tested implicitly by `org.enso.compiler.ExecCompilerTest#testInvalidEnsoProjectRef`.
This PR fixes#6371.
# Important Notes
@kazcw @wdanilo I don't particularly like this solution, but I don't see any other good way to define the relationship between two instances of the same shape (`Rectangle`) used in different UI elements. If you are aware of a more elegant solution, I’d be happy to hear any suggestions.
- Adjusted `Context.is_enabled` to support default argument (moved built in so can have defaults).
- Made `environment` case-insensitive.
- Bug fix for play button.
- Short hand to execute within an enabled context.
- Forbid file writing if the Output context is disabled with a `Forbidden_Operation` error.
- Add temporary file support via `File.create_temporary_file` which is deleted on exit of JVM.
- Execution Context first pass in `Text.write`.
- Added dry run warning.
- Writes to a temporary file if disabled.
- Created a `DryRunFileManager` which will create and manage the temporary files.
- Added `format` dropdown to `File.read` and `Data.read`.
- Renamed `JSON_File` to `JSON_Format` to be consistent.
(still to unit test).
Rewrites node input component. Now the input is composed of multiple widget components arranged in a tree of views with automatic layout. That allows creating complex UI elements on top of the node itself, and further widget positions will be automatically adapted to that. The tree roughly follow the span tree, as it is built by consuming its nodes and eagerly creating widgets from them. The tree is rebuilt every time the expression changes, but that rebuild process reuses as much previously created widgets as possible, and only updates their configuration as needed. Each widget type can have its own configuration options that can be passed to it from the parent, or assigned based on configuration received from the language server.
<img width="773" alt="image" src="https://user-images.githubusercontent.com/919491/233439310-9c39ea88-19bc-43da-9baf-1bb176e2724e.png">
# Important Notes
For now, all span-tree updates are sent over to the shared Frp endpoint of the whole tree, so there is no mechanism for intercepting them by the parent widgets. One idea would be to use existing bubbling/capturing events on widget display objects for that purpose, but I think existing implementation is simpler and more convenient, and we can always easily change that if we have a use for it.
There are some issues with performance due to much more display objects being created on the graph. Expect it to be a little worse, especially at initialization time.
- Missing tests from number parsing.
- Fix type signature on some warning methods.
- Fix warnings on `Standard.Database.Data.Table.parse_values`.
- Added test for `Nothing` and empty string on `use_first_row_as_names`.
- New API for `Number.format` taking a simple format string and `Locale`.
- Add ellipsis to truncated `Text.to_display_text`.
- Adjusted built-in `to_display_text` for numbers to not include type (but also to display BigInteger as value).
- Remove `Noise.Generator` interface type.
- Json: Added `to_display_text` to `JS_Object`.
- Time: Added `to_display_text` for `Date`, `Time_Of_Day`, `Date_Time`, `Duration` and `Period`.
- Text: Added `to_display_text` to `Locale`, `Case_Sensitivity`, `Encoding`, `Text_Sub_Range`, `Span`, `Utf_16_Span`.
- System: Added `to_display_text` to `File`, `File_Permissions`, `Process_Result` and `Exit_Code`.
- Network: Added `to_display_text` to `URI`, `HTTP_Status_Code` and `Header`.
- Added `to_display_text` to `Maybe`, `Regression`, `Pair`, `Range`, `Filter_Condition`.
- Added support for `to_js_object` and `to_display_text` to `Random_Number_Generator`.
- Verified all error types have `to_display_text`.
- Removed `BigInt`, `Date`, `Date_Time` and `Time_Of_Day` JS based rendering as using `to_display_text` now.
- Added support for rendering nested structures in the table viz.
Integrate the UI for electing the Execution Environment with the Language Server and unify existing uses. Implements #5930 + actual integration instead of just mocking it.
https://user-images.githubusercontent.com/1428930/232919438-6e1e295a-34fe-4756-86a4-5f5d8f718fa0.mp4
# Important Notes
The console output is only emitted as part of the `INFO` level. A better check would be to look at the messages sent to the backend in the developer console.
Fixes#6317
The `drop` method is available in the WASM object. This can be tested by typing `ensoglApp.wasm.drop()` in the dev console - all objects should be removed and all connections closed.
# Important Notes
* This PR fixed serveral leaks by this occasion
* A new tool for tracking leaks was added to prelude's `debug` module.
This PR fixes#5239 by supporting the Windows-style of URL handling to support deep linking.
Windows spawns a new process for each URL, rather than sending a 'open-url' event to the existing process. Now the differences between the two platforms should be abstracted away.
Fixes all eslint errors - now `npx eslint .` in `app/ide-desktop` should show no errors and no warnings.
Also fixes an incorrect lint rule (the rule to catch early returns (?) did not work properly for `try-catch`)
# Important Notes
This changes quite a few files (unfortunately) so QA should be done to check all affected files
Vector Editor widget is improved: replaced old simple widget with List Editor, and added integration for adding elements.
# Important Notes
The widget is still under feature flag: `--feature-preview.vector-editor`.
Closes#6181
- Added a read-only flag for the project model (now controlled by a temporary shortcut).
- Renaming the project, editing the code, connecting and disconnecting nodes, and collapsing, and navigating through collapsed nodes are forbidden and will result in the error message in the console.
- Some of the above actions produce undesired effects on the IDE, which will be fixed later. This PR is focused on restricting actual AST modifications.
- Moving nodes (and updating metadata in general) no longer causes reevaluation
https://user-images.githubusercontent.com/6566674/231616408-4f334bb7-1985-43ba-9953-4c0998338a9b.mp4
* Use Rectangle for breadcrumbs background.
* Use Rectangle for status bar bg.
* Use Rectangle for dropdown bg.
* Dirty global_element_depth_order invalidates sublayers
* Setting new parent may invalidate depth order
* Support per-instance pointer_events_enabled
* Remove workaround for #6241