Commit Graph

43 Commits

Author SHA1 Message Date
Adam Obuchowicz
4a249688e8
Unify Frontend App (#11287)
Fixes #10668
Fixes #8484

Summary of changes:
* `gui2` and `dashboard` are merged to `gui` directory. Various configs were merged (package.json, playwrigth, TS...). The src and e2e directories are split to `dashboard` and `project-view` for now.
* E2E tests run two servers on different ports. The tests are organized in projects. This is also to be changed soon, as we plan to [use better mocking in GUI/ProjectView](#9726)
* ESlint configs were merged to central `eslint.config.mjs`, and that file was moved to repository root. We kept the dashboard lints, but they can be relaxed. The dashboard code was changed to meet GUI lints.
* Also, the versions of linter plugins were bumped, and code fixed.
* The ide-desktop/client no longer has `dashboard` dependency - the only type used there was moved to common package.
* `common` package moved to `app`.
2024-10-11 18:23:02 +00:00
Michael Mauderer
7c68bf170d
Remove gui1 codebase (#9242)
Removes the old GUI1 code base and reduces the Rust code footprint by removing unused code.

# Important Notes
Updates build scripts and reformats part of the codebase with the autoformatter.
2024-03-07 02:20:21 +00:00
Dmitry Bushev
4b3ba78b52
Add shortcuts to start and stop the backend profiling (#8358)
close #8329

Changelog:
- add: `cmd`+`shift`+`,` and `cmd`+`shift`+`.` shortcuts to start and stop the backend profiling. Profiling data is stored on disk.
2023-11-23 15:31:17 +00:00
Kaz Wesley
b9ec6d4ec3
Context restoration (#7662)
Add support for recovering from GL context loss. When the context is restored, the loading spinner is shown until shaders finish recompiling.

[vokoscreenNG-2023-08-25_09-39-11.webm](https://github.com/enso-org/enso/assets/1047859/cfa90ec5-72a1-41e6-bafa-177fa5e85fb2)

*While the context is missing, the loading spinner is rendered in the 0% state. (This condition will not normally be observed, except momentarily, as the browser should restore the context immediately if it is lost while the page is visible.) When we receive a new context, the spinner switches to the 90% state until restoration completes. Restoration is fast, as we don't need to do much work except recompiling shaders.*

# Important Notes
- A new debug hotkey, Ctrl+Alt+Shift+X, causes context loss for testing. Pressing it a second time causes context restoration.
- `Texture` is still a CPU-bound texture. It now uses the "immutable" `texStorage/texSubImage` API, which is a ["preferred alternative"](https://registry.khronos.org/webgl/specs/latest/2.0/#3.7.6) to the `texImage` API because it can be more efficient.
- The type for texture uniforms is now `Uniform<Option<Texture>>`. Texture uniforms are decoupled from the context.
- A new `ContextLost` error type can be returned by functions that cannot complete if the context is lost.
- Fix some crashes that could occur when context was lost.
- Clarify ownership of some rendering-related types: Externalize, and where possible eliminate, `Rc/RefCell`s.
2023-09-14 14:40:28 +00:00
Ilya Bogdanov
1f8675a031
Fix atom types in dropdowns. (#7670)
Fixes #7468

The fix is pretty simple: we reuse the existing functionality for importing stuff and generating expressions. It fixes issues with `Nothing` or `Report_Unmatched` types.


https://github.com/enso-org/enso/assets/6566674/4e7addf9-2175-4f2a-a571-4ef823de5cb0

While debugging, I found it easier to work with a suggestion database when exported to some external format. Hence, I implemented serde serialization support for database entries and also a new debug shortcut <kbd>ctrl</kbd>+<kbd>shift</kbd>+<kbd>u</kbd> to dump all entries to the console.
2023-09-05 14:51:33 +00:00
Ilya Bogdanov
b49cc25d38
Copy-pasting nodes (#7618)
Closes #6261

- Adds support for copy-pasting nodes with `cmd + C` and `cmd + V` shortcuts.
- Only a single, currently selected node will be copied. Adding support for multiple node copies seems easy, though (but was out of the scope of the task).
- We use a custom data format for clipboard content. Node's metadata is also copied, so opened visualizations are preserved. However, the visualization's size is not preserved, as we do not store this info in metadata.
- For custom format to work, we use a pretty new feature called [Clipboard pickling](https://github.com/w3c/editing/blob/gh-pages/docs/clipboard-pickling/explainer.md), but it is available in Electron and in most browsers already.
- Pasting plain text from other applications (or from Enso, if the code is copied in edit mode) is supported and is currently enabled. There are some security concerns related to this, though. I will create a separate issue/discussion for that.
- Undo/redo works as you expect.
- New node is pasted at the cursor position.


https://github.com/enso-org/enso/assets/6566674/7a04d941-19f7-4a39-9bce-0e554af50ba3
2023-08-30 13:04:21 +00:00
Adam Obuchowicz
fd972f8b0a
Change shortcut for opening Component Browser to enter (#7527)
This was meant to be a trivial change, but actually a dirty workaround needed to be applied. Because enter is used  to both open searcher and accept input/entry, both actions were fired at once. I fixed it by debouncing opening searcher event (so the searcher will be opened only once key event handling is over)
2023-08-11 18:05:17 +00:00
Adam Obuchowicz
a27f19fd02
Reloading file in LS after desynchronization. (#6752)
Fixes #5203

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

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

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

# Important Notes
The unit tests of sending text updates were improved: now we actually check if all expected messages are emitted from the IDE.
2023-05-23 08:19:27 +00:00
Pavel Marek
a6fdfc73cd
Fix shortcuts table formatting (#6644) 2023-05-11 12:05:51 +00:00
Stijn ("stain") Seghers
d01b0f460d
Fix #6377: Change ctrl-r shortcut (#6620)
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.
2023-05-10 08:40:24 +00:00
Michael Mauderer
233bf86d2f
Execution environment integration fixes. (#6434)
Follow up to  https://github.com/enso-org/enso/pull/6341#issuecomment-1522341055 . Contains some refactoring and solves some left over to-dos in the code.
2023-04-27 17:30:26 +00:00
Michael Mauderer
0d84a601dd
Ability to change the execution environment between design and live. (#6341)
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.
2023-04-25 20:28:15 +00:00
Ilya Bogdanov
719bd8cfa1
Forbid edits in read-only mode (#6342)
Closes #6182 

Implements read-only mode for relevant components of the IDE.

- [x]  Project Name renaming
- [x]  Nodes editing
- [x]  Editing code in the code editor
- [x]  Creating nodes
- [x]  Removing nodes
- [x]  Entering and leaving nodes
- [x]  Creating, dropping, and changing connections between nodes
- [x]  Buttons on nodes (except for visualization toggle button)
- [x]  Widgets on nodes


https://user-images.githubusercontent.com/6566674/232824737-bdd6f676-b20d-4218-af7d-4373e00cbe3e.mp4
2023-04-24 10:01:30 +02:00
Stijn ("stain") Seghers
0bdf44cba8
Use .node-version for pinning Node.js version (#6057)
Closes #6008: allowing Node.js to be used through Node version managers.
2023-03-23 12:00:08 +00:00
Kaz Wesley
dd3ee76ce7
Eager shader compilation (#5606) 2023-02-22 00:29:48 +01:00
Galin Bajlekov
4f11ad10fa
Add a shortcut to toggle the visibility of private components in the component browser (#5582)
Closes #4962

This PR adds the `cmd+alt+p` shortcut to toggle the visibility of components with a "PRIVATE" tag in the component browser. The default is to have these private components hidden.

https://user-images.githubusercontent.com/117099775/219106357-0b14a5b5-404f-44dd-b30c-5389054683a7.mp4
2023-02-20 21:24:51 +00:00
Adam Obuchowicz
6c7c1c7d66
Additional shortcut for Redo (#4035)
Add a cmd+shift+z shortcut for redo while keeping alse the old one
2023-01-17 12:38:25 +00:00
Dmitry Bushev
3e74afca51
misc: bump wasm-pack (#3983) 2022-12-14 18:45:39 +01:00
Dmitry Bushev
957279153a
Add a shortcut for interrupting the program (#3967)
Add shortcuts for interrupting and restarting the program execution.
2022-12-12 17:48:42 +00:00
Dmitry Bushev
3a8aa90f1b
Document no changelog label (#3833) 2022-10-27 15:28:34 +03:00
Adam Obuchowicz
639f612adf
Update shortcuts to reflect Component Browser design docs. (#3823)
When no node is edited, `Enter` creates a new one (opening Component Browser). The shortcut for entering node was changed to `cmd + Enter`
2022-10-25 17:21:12 +00:00
Dmitry Bushev
de0a231417
IDE uses new visualization API (#3661) 2022-09-01 15:33:46 +03:00
Michał Wawrzyniec Urbańczyk
6fc4947764
Bumped the build script (#3489)
* The bash entry point was renamed `run.sh` -> `run`. Thanks to that `./run` works both on Linux and Windows with PowerShell (sadly not on CMD). 
* Everyone's favorite checks for WASM size and program versions are back. These can be disabled through `--wasm-size-limit=0` and `--skip-version-check` respectively. WASM size limit is stored in `build-config.yaml`.
* Improved diagnostics for case when downloaded CI run artifact archive cannot be extracted. 
* Added GH API authentication to the build script calls on CI. This should fix the macOS build failures that were occurring from time to time. (Actually they were due to runner being GitHub-hosted, not really an OS-specific issue by itself.)
* If the GH API Personal Access Token is provided, it will be validated. Later on it is difficult to say, whether fail was caused by wrong PAT or other issue.
* Renamed `clean` to `git-clean` as per suggestion to reduce risk of user accidently deleting unstaged work. 
* Whitelisting dependabot from changelog checks, so PRs created by it are mergeable.
* Fixing issue where wasm-pack-action (third party) randomly failed to recognize the latest version of wasm-pack (macOS runners), leading to failed builds.
* Build logs can be filtered using `ENSO_BUILD_LOG` environment variable. See https://docs.rs/tracing-subscriber/0.3.11/tracing_subscriber/struct.EnvFilter.html#directives for the supported syntax.
* Improve help for ci-run source, to make clear that PAT token is required and what scope is expected there.

Also, JS parts were updated with some cleanups and fixes following the changes made when introducing the build script.
2022-06-01 13:44:40 +02:00
Michał Wawrzyniec Urbańczyk
14a01c4635
New IDE build script (#3466) 2022-05-23 04:16:04 +02:00
Michael Mauderer
c313a4c499
Recommend installing a new version of wasm-opt. (#3452)
Update contributing guidelines to include a recommendation for installing `wasm-opt`.

# Important Notes
[ci no changelog needed]
2022-05-16 07:35:17 +00:00
Michael Mauderer
ba651428aa Revert "Recommend installing a new version of wasm-opt."
This reverts commit 08f3ad3d0b.
2022-05-13 13:38:29 +01:00
Michael Mauderer
08f3ad3d0b Recommend installing a new version of wasm-opt. 2022-05-13 13:37:03 +01:00
Michał W. Urbańczyk
26a3c670a3 Fix prettier formatting. Also, a typo. 2022-04-19 08:05:30 +02:00
Wojciech Daniło
e8dfc6d270
Update Rust style guide (#3172) 2022-04-15 16:10:55 +02:00
Wojciech Daniło
f4d236fcd4
EnsoGL context abstraction (#3293) 2022-03-04 15:13:23 +01:00
Adam Obuchowicz
9d6f9373f9
Add tests for debug mode and zoom restriction. (#3289)
This PR adds integration tests created during acceptance process of [181181159](https://www.pivotaltracker.com/story/show/181181159) and [181181203](https://www.pivotaltracker.com/story/show/181181203).

The PRs for those tasks were merged, because I hadn't realized they should not.

Additionally, as the `wasm-bindgen` version was bumped, I extended the timeout of integration tests and made them headless.
2022-02-22 16:43:37 +00:00
Ilya Bogdanov
03e105d42e
Debug Mode for Graph Editor (#3264) 2022-02-14 11:19:08 +01:00
Adam Obuchowicz
c68ac5c0d6
Integration Test Framework (#3257) 2022-02-11 13:19:02 +01:00
Ilya Bogdanov
3905698b41
Implement creating nodes by dropping a connection (#3231) 2022-01-26 14:23:55 +03:00
Michael Mauderer
5c525daefe Revert "Implement basic performance logging API. (#3169)"
This reverts commit 178cfb0404.
2022-01-14 12:40:28 +00:00
Ilya Bogdanov
bb86446003
Update JS deps on CI (#3218) 2022-01-13 12:44:16 +03:00
Ilya Bogdanov
a4355876fa
Developers should be able to build and test desktop IDE on M1 Mac (#3194) 2022-01-10 12:18:34 +03:00
Michael Mauderer
178cfb0404
Implement basic performance logging API. (#3169) 2021-12-31 21:14:02 +01:00
Adam Obuchowicz
33f1c4bb19
Update the Documentation with the new directory structure. (#3212) 2021-12-30 10:29:20 +01:00
Michał Wawrzyniec Urbańczyk
66c256a1f7
Self-hosted Engine CI for Windows and Linux (#3182) 2021-12-27 17:56:35 +01:00
Mateusz Czapliński
a704baf91c
Minor CONTRIBUTING tweaks after onboarding (#3178) 2021-12-06 15:45:10 +03:00
Ilya Bogdanov
787a2c78e1
Fix link to Rust style guide (#3128) 2021-11-22 12:14:30 +00:00
Adam Obuchowicz
bb3b145af5
Refactor gui/src/rust/ide to two app/gui and app/ide-desktop (#3157) 2021-11-16 10:04:56 +01:00