Commit Graph

93 Commits

Author SHA1 Message Date
somebody1234
72ae10c8e2
Add dashboard table view (#6015)
- Adds dummy views for all asset types (project, directory, secret, file)
- The backend metadata does not exist for many of these columns.

# Important Notes
To do:
- [x] figure out the best way to add the custom classes - tailwind likes to avoid custom classes whenever possible
2023-04-13 15:17:32 +00:00
somebody1234
135b9fc41e
Simplify authentication JS module (#6220)
- merge `hooks.useInput` into `Input` component
- inlines and removes `utils.handleEvent`
- splits `components/common.tsx` into individual files

# Important Notes
The goal of this PR is to minimize the number of helper functions we are using.
Switching (back?) to well-known React functions makes it clearer to new contributors what exactly is happening.
⚠️ This PR is *completely optional* and can be closed without merging. It is a relatively minor refactor that does not add any features.
2023-04-13 09:57:28 +00:00
somebody1234
fe1798c9e3
Fix ./run gui watch on Windows (#6239)
Fixes a bug in the plugin used to workaround a bug in esbuild. The bug has since been fixed, however another plugin is causing issues with the *proper* fix

# Important Notes
N/A
2023-04-11 18:05:15 +00:00
Michał Wawrzyniec Urbańczyk
3eb72ecfbe
Fix the --ide-option handling. (#6237) 2023-04-11 17:18:58 +02:00
somebody1234
a96d355512
Add dashboard skeleton (#6005)
- Removes placeholder dashboard in preparation for the actual dashboard implementation.
2023-04-11 08:40:47 +00:00
somebody1234
37d820c764
Fix ./run gui watch (#6212)
- Fixes #6168
- Removes `enso-copy-plugin` in favor of an inline plugin
- It was only used in one place anyway
- It is probably necessary since I've "fixed" it by adding all files as entrypoints (I'm not quite sure why it wasn't working with the fix with `enso-copy-plugin`...)
- Adds live reload (back) to `content/`

# Important Notes
To QA:
Mandatory:
- `./run gui watch --skip-version-check --skip-wasm-opt`

Recommended:
- `npm run watch-dashboard`
- `./run ide watch --skip-version-check --skip-wasm-opt --backend-source release --backend-release latest`
- and with `--ide-option -authentication`
- `./run ide build --skip-version-check --skip-wasm-opt --backend-source release --backend-release latest`
- `Enso` and `Enso -authentication`
2023-04-11 06:04:27 +00:00
Michał Wawrzyniec Urbańczyk
e7668ebc3a
Project Sharing (#6077)
Enso will now associate with two file extensions:
* `.enso` — Enso source file.
  * If the source file belongs to a project under the Project Manager-managed directory, it will be opened.
  * If the source file belongs to a project located elsewhere, it will be imported into the PM-managed directory and opened;
  * Otherwise, opening the `.enseo` file will fail. (e.g., loose source file without any project)
* `.enso-project` — Enso project bundle, i.e., `tar.gz` archive containing a compressed Enso project directory.
  * it will be imported under the PM-managed directory; a unique directory name shall be generated if needed.

### Important Notes
On Windows, the NSIS installer is expected to handle the file associations.
On macOS, the file associations are expected to be set up after the first time Enso is started,
On Linux, the file associations are not supported yet.
2023-04-06 15:26:37 +02:00
somebody1234
6a09f12f3c
Add cloud endpoints for frontend (#6002)
Adds functions and types to access backend endpoints.
This is in preparation for upcoming PRs that will flesh out the dashboard UI.

# Important Notes
Has not been tested since it is not currently used. It will be used (and tested) in future PRs.
2023-04-06 10:00:55 +00:00
Michał Wawrzyniec Urbańczyk
7fdc3c66bf
Fix calculating checksums (#6203) 2023-04-05 07:13:18 +02:00
Kaz Wesley
17152e4e00
Hotkey to display GPU debug info (#6188) 2023-04-04 12:32:16 +02:00
somebody1234
f5d5e846c3
Add JSON-RPC endpoints (#6004)
- Adds JSON-RPC endpoints
- Adds typings, copied from corresponding Rust typings

# Important Notes
Has *not* been tested since it is not currently used. It will be used (and tested) in future PRs.
2023-04-03 11:50:11 +00:00
Adam Obuchowicz
75df048f3e
A Stub for Vector Editor Widget. (#6142)
Fixes #5946

Adds a vector editor widget under the node. It reacts to code changes, but does not allow any editing: this will be continuously added in next tasks.

The position is often wrong due to limitations of the display object hierarchy. It should be changed anyway when [embedding into the node](#5923). But because it looks bad, it's shown only with `--featurePreview.vectorEditor` flag.

https://user-images.githubusercontent.com/3919101/227955735-f96fc23d-7e87-4042-8586-c1154523e871.mp4
2023-04-03 09:21:33 +00:00
somebody1234
5a100ea79b
Convert dashboard to use esbuild (#6034)
* Switch dashboard to esbuild

* Minor fixes; move Tailwind generation into esbuild-config

* Fix watching `content/` and `client/`

* Bump esbuild binary versions; minor dependency list fixes

* Fixes; rename "npm run dev" to "npm run watch-dashboard"

* Avoid writing esbuild outputs to disk for `dashboard/`

* Convert watch-dashboard to be fully in-memory; rebuild css files on change

* Remove obsolete FIXME

* Remove unused constants

* Run prettier

* add missing styles

* Fixes

* Fix the fixes

* Run prettier

* Fixes; use nesting plugin to wrap tailwind preflight

* Remove testing flag from client/watch

* Minor fixes

* Run prettier

* Make css rebuild when tailwind config changes

* Fix bundling for dashboard

* Fix dashboard/bundle.ts erroring when build directory does not exist

* Fix esbuild binary package names

* Remove redundant "npx" prefix from build scripts

* Remove unused dependency

* workaround for mac freeze

* add missing sections

* Address review issue

* Fix live-reload of `npm run watch-dashboard`

* Fix service worker for client-side routing

* Fix GL crash

* Revert "Fix GL crash"

This reverts commit 612136bc1a.

* Implement suggested fix

* prettier

---------

Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
2023-03-31 16:19:07 +02:00
somebody1234
0aa7d7ee4d
Fix prettier config; run prettier (#6132)
* Fix prettier config; run prettier

* add workaround for double re-render

* add missing fixme

---------

Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
Co-authored-by: Nikita Pekin <nikita@frecency.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-03-31 14:49:34 +02:00
Paweł Buchowski
1a569223aa
Revert "Cognito auth 8/7 - fix prettier config; run prettier (#6003)" (#6127)
This reverts commit a9dbebf3f3.
2023-03-29 13:20:46 +02:00
somebody1234
a9dbebf3f3
Cognito auth 8/7 - fix prettier config; run prettier (#6003)
- Fixes prettier config to include `.tsx`
- `prettier -w .` has been run in `app/ide-desktop`
- `prettier -w .` has also been run in `pack/js`, however there were no changes.

# Important Notes
After this is merged, a PR SHOULD be created to add the following file to the root directory:
`.git-blame-ignore-revs`
```
# <name of the commit for this PR>
<hash of the commit for this PR>
```
This makes `git blame` ignore the commit, which is a good idea since this PR only does formatting changes.
2023-03-29 10:24:32 +00:00
Paweł Buchowski
e5fef2fef3
add tailwind.css file to alwaysCopiedFiles (#6040) 2023-03-22 12:14:37 +01:00
somebody1234
d38951d4e9
Fix #5975 (#5976)
Fixes issue with blank screen caused by missing `tailwind.css`.
2023-03-22 09:18:06 +01:00
Wojciech Daniło
abb0b447d5
Improving Performance Monitor (#5895) 2023-03-21 09:17:54 +01:00
Kaz Wesley
c9806496ee
Rendering improvement/debugging support (#6019)
Some small improvements relating to rendering:

- Add a debug option: `-debug.pixel-read-period`. This can be used to measure the performance impact of checking the pointer location on different hardware. [On my development box, it makes no difference to performance.] (Closes #5490).
- Unbind pixel pack buffers after each use. This is recommended practice. It has no performance impact on my machine, and allows SpectorJS to run (`-debug.enable-spector`). (Closes #5941).

Also, simplify the profiling CLI: the `profile.load-profile` and `profile.save-profile` options have been renamed to `profile.load`/`profile.save`; `profile.save` now has a default filename, so you can capture a profile at any time in Electron with Ctrl+Alt+P and it will be written to `profile.json`.
2023-03-21 06:34:24 +00:00
Nikita Pekin
0fc8683108
Cognito auth 6/7 - add signout (#5867) 2023-03-21 03:41:57 +01:00
Ilya Bogdanov
210b5b7b3d
Fix passing custom options to Electron app in ./run ide watch (#6020) 2023-03-21 02:33:25 +01:00
Nikita Pekin
8c18d7c106
Cognito auth 5/7 - set username (#5866)
5th PR for IDE/Cloud authorization with cognito. This PR introduces user username templates + flows + backend wrappers for  setting username.
Forgot Password flows are to be added in next PRs to keep the changes reviewable.
2023-03-20 11:57:27 +00:00
somebody1234
fa23e800e5
Finish enabling ts-eslint (#5944)
- prefer `null`, `!= null` and `== null` instead of `undefined`
- disallow `as`, add comments for the existing usages of `as`
- make `tsconfig.json` a bit stricter
- minor fixes to other files that were missed

# Important Notes
N/A
2023-03-20 09:35:16 +00:00
Nikita Pekin
201358e5cc
Cognito auth 4/7 - add login (#5865)
4th PR for IDE/Cloud authorization with cognito. This PR introduces login templates + flows + amplify wrappers for logging in users w/ federated providers or with username/email.
Set Username + Forgot Password flows are to be added in next PRs to keep the changes reviewable.
2023-03-18 00:22:04 +00:00
Nikita Pekin
e9d6d03c67
Cognito auth 3/7 - add registration (#5864)
3rd PR for IDE/Cloud authorization with cognito. This PR introduces registration templates + flows + amplify wrappers for registering & confirming user registration.

Login + Set Username + Forgot Password flows are to be added in next PRs to keep the changes reviewable.
2023-03-17 15:26:59 +00:00
somebody1234
e525d2322e
Fix #5963 (#5974)
Fixes #5963
2023-03-17 08:23:37 +00:00
Paweł Buchowski
25b57e5024
Set authentication default value to false (#5982)
Since authentication is partially merged, and it's still under development, we want to disable it by default.
2023-03-16 19:34:41 +01:00
Paweł Buchowski
126a466872
hotfix watch by removing tailwind.css dependency (#5977) 2023-03-16 15:49:35 +01:00
somebody1234
27639233c6
Fix #5969 (#5972)
Should fix #5969
The cause was the switch to `* as moduleName` namespace imports - `process.on` is missing from the namespace import, causing an error.
2023-03-16 14:09:31 +01:00
James Dunkerley
602541e4d3
Enable clipboard access. (#5958) 2023-03-15 19:21:29 +01:00
Paweł Buchowski
d77d08358e
remove package-lock.json from gitignore; add unitl-now ignored files (#5954) 2023-03-15 16:54:38 +01:00
Kaz Wesley
e171fba301
New documentation parser (#5917)
Implement new Enso documentation parser; remove old Scala Enso parser.

Performance: Total time parsing documentation is now ~2ms.

# Important Notes
- Doc parsing is now done only in the frontend.
- Some engine tests had never been switched to the new parser. We should investigate tests that don't pass after the switch: #5894.
- The option to run the old searcher has been removed, as it is obsolete and was already broken before this (see #5909).
- Some interfaces used only by the old searcher have been removed.
2023-03-15 15:43:51 +00:00
Paweł Buchowski
6f29262f90
Cognito auth 2/7 - add authorization app (#5798)
2nd PR for IDE/Cloud authorization with cognito. This PR introduces boilerplate react app + some amplify code to fetch the access token + username of the currently logged in user, if they are already authenticated.

Registration + Login + Set Username + Forgot Password flows are to be added in next PRs to keep the changes reviewable.
2023-03-15 11:54:16 +00:00
Nctdt
5c4660b5aa
Enable typescript-eslint (#5717)
implement [issue#5694](https://github.com/enso-org/enso/issues/5694)
2023-03-15 03:42:14 +00:00
Kaz Wesley
023d8ac239
Precompute MSDFs (#5811)
Precompute MSDFs for all ASCII glyphs; after this, we no longer spend any time on MSDF computations when loading or interacting with the example projects.

Also shader precompilation (during build) is now parallel; if you have many cores and an SSD, it's now practically instant.

Closes #5722.

# Important Notes
- The *dynamic-assets* mechanism now used for MSDF data and shaders is versatile, and could be used to pre-seed any other computation-intensive runtime caches.
2023-03-10 12:59:56 +00:00
Paweł Buchowski
998d5999a3
Cognito auth 1/2 - extracted electron logic (#5793)
Provides functionality necessary for:
- opening URLs in the system browser (so that we can handle OAuth flows outside of the app)
- handling deep links to the application (so that the OAuth flows can return the user to the app)

### Important Notes

- Modifies `preload.ts` to expose the ability to open the system browser to the sandboxed parts of the app.
- Modifies `election-builder-config.ts` to register a deep link URL protocol scheme with the OS.
- Modifies the client's `index.ts` to register a handler for Electron `open-url` events
2023-03-09 16:02:28 +01:00
Wojciech Daniło
60d8b8fcea
Fixing bug that input config was ignored (#5847) 2023-03-08 10:11:59 +01:00
Michał Wawrzyniec Urbańczyk
ee981d2052
Reworked ide watch and ide start commands (#5634)
This PR changes build script's `ide watch` and `ide start` commands, so they don't use `electron-builder` to package. Instead, they invoke `electron` directly, significantly reducing time overhead.

`ide watch` will now start Electron process, while continuously rebuilding gui and the client in the background. Changes can be puilled by reloading within the electron, or closing the electron and letting it start once again. To stop, the script should be interrupted with `Ctrl+C`.
2023-03-02 23:00:47 +01:00
Wojciech Daniło
43144e102e
Fixing incorrect Electron behavior. (#5764)
* Fixing --version command

* Showing frame on MacOS.

* Fix debug.info

---------

Co-authored-by: Adam Obuchowicz <adam.obuchowicz@enso.org>
2023-02-27 13:31:33 +01:00
Wojciech Daniło
663ed1e07e
Fixing Electron runner (#5633) 2023-02-19 01:37:58 +01:00
Ilya Bogdanov
1a87e47729
Hide skip and freeze buttons behind feature flag (#4109)
[Task](https://www.pivotaltracker.com/story/show/184347909)

Skip and freeze buttons are no longer visible by default.
2023-02-03 13:52:51 +00:00
Wojciech Danilo
a84f8c25e8 Fixing broken Electron configuration. 2023-01-27 06:45:41 +01:00
Wojciech Daniło
da84e34b9a
Shaders precompilation (#4003) 2023-01-27 01:09:09 +01:00
Paweł Buchowski
8300d2f823
move hardcoded mixpanel token to the config (#3954)
Remove hardcoded mixpanel token and move it to the config class. This will allow for injection cloud's id and distinguish Enso Ide project from Enso Cloud in mixpanel.
2023-01-17 10:30:47 +00:00
Kaz Wesley
662992eb37
Replace tracing (#4017)
Logging: Replace tracing with an efficient logging implementation, with 0-runtime cost for disabled log levels. (https://www.pivotaltracker.com/story/show/183755412)

Profiling: Support submitting `profiler` events to the User Timing Web API, so that measurements can be viewed directly in the browser. (https://www.pivotaltracker.com/story/show/184003550)

# Important Notes
Logging interface:
- The macros (`warn!`, etc.) now take standard `format_args!` arguments (the tracing implementations accepted a broader syntax).
- Compile-time log levels can now be set through the CLI, like so:
`./run ide start --log-level=trace --uncollapsed-log-level=info`

Profiling:
- The hotkey Ctrl+Alt+Shift+P submits all `profiler` events logged since the application was loaded to the Web API, so that they can then be viewed with the browser's developer tools. Note that standard tools are not able to represent async task lifetimes or metadata; this is a convenient interface to a subset of `profiler` data.
- As an alternative interface, a runtime flag enables continuous measurement submission. In the browser it can be set through a URL parameter, like http://localhost:8080/?emit_user_timing_measurements=true. Note that this mode significantly impacts performance.
2023-01-16 20:31:01 +00:00
Michał Wawrzyniec Urbańczyk
e47d22321c
Allow overriding electron-builder target. (#3996) 2022-12-21 02:14:54 +01:00
Michał Wawrzyniec Urbańczyk
965d1ff28b
Bump wasm-bindgen (#3971)
This PR brings wasm-bindgen (and related crates) to the latest version. I've also removed patching code, so future updates should be much easier.
2022-12-13 22:20:25 +01:00
Paweł Grabarz
6e1666e8b1
enable node labels by default and keep their position up to date (#3932)
Fixes https://www.pivotaltracker.com/n/projects/2539304/stories/183899185


![image](https://user-images.githubusercontent.com/919491/204636854-77f0a860-1cdb-4b0f-a925-292afbaa874a.png)
Screenshot taken while holding ctrl, so all labels are visible.

# Important Notes
The node labels config option default switched to true. The fact that this is configurable can potentially explain why it was rougly working for some people, but not other. Apart from that, the labels position update is also now fixed, so it is properly drawn next to the node.
2022-11-30 19:57:49 +00:00
Michał Wawrzyniec Urbańczyk
e31e3ccefb
Bumping JS dependencies (#3901) 2022-11-28 11:31:57 +01:00