Commit Graph

40 Commits

Author SHA1 Message Date
somebody1234
3c31155fe9
Dashboard tests (#7656)
- Implements https://github.com/enso-org/cloud-v2/issues/631
- Tests for dashboard (`app/ide-desktop/lib/dashboard/`):
- End-to-end tests
- Unit tests
- Component tests

The purpose of this PR is to introduce the testing framework - more tests can be added later in separate PRs.

# Important Notes
To test, run `npm run test` in `app/ide-desktop`, or `app/ide-desktop/lib/dashboard/`. All tests should pass.

Individual test types can be run using `npm run test-unit`, `npm run test-component` and `npm run test-e2e` in `app/ide-desktop/lib/dashboard/`.
Individual end-to-end tests can be run using `npx playwright test -c playwright-e2e.config.ts test-e2e/<file name>.spec.ts` in `app/ide-desktop/lib/dashboard/`.

End-to-end tests require internet access to pass (for things like fonts).

This PR *does* check in screenshots to guard against visual regessions (and/or to make visual changes obvious)
2023-10-11 10:24:33 +00:00
somebody1234
a7c2e7590a
Trash and Recent categories (#7682)
- Closes https://github.com/enso-org/cloud-v2/issues/617
- Trash category
- Do not open "confirm delete" modal when on remote (cloud) backend
- Permanent deletion has been superseded by the trash category
- Save current category to `localStorage`
- Also implements "Recent" category. Differences to Home category:
- Hides sort indicators
- Disables sorting

Other fixes:
- Allow overriding cloud environment through environment variable
- Prevent triggering rename on click when multiple items are selected
- Remove "move to trash" context menu option when user is not owner

# Important Notes
- This registers the "Ctrl + R" (Cmd + R) shortcut for restoring an item from trash. This is the same shortcut used for renaming, however I think it is fine because items in trash cannot be renamed.
(As usual though, this is very simple to remove/change so it's not a big deal to remove/change it.)

- The "Recent" category lacks backend support - so it falls back to the default category, as the deserialization of unknown values falls back to the default category.
2023-09-27 07:22:48 +00:00
Paweł Grabarz
226c5cf7c7
Revert "Handle wasm panics, display a message and allow a restart (#7507)" (#7708) 2023-08-31 13:30:01 +02:00
Paweł Grabarz
c834847c48
Handle wasm panics, display a message and allow a restart (#7507) 2023-08-30 13:31:08 +02:00
somebody1234
704ddff624
Disable opening projects that are already opened by other users (#7660)
- Closes https://github.com/enso-org/cloud-v2/issues/568
- Disable project with an `openedBy` that is not the current user

Fixes other issues:
- Fixes freshly restored saved projects not being unset when clicking stop before the editor first opens
- Changes "unable to" in errors to "could not", for consistency
- Users with insufficient permissions now see a network (node graph) icon instead of a play button:

![image](https://github.com/enso-org/enso/assets/4046547/0464ae66-4da7-4374-a4aa-80dd74fa1dc0)

# Important Notes
None
2023-08-28 13:21:36 +00:00
somebody1234
af0e738dec
New sharing menu (#7406)
- Closes https://github.com/enso-org/cloud-v2/issues/561
- New "Invite" modal
- Change autocomplete multi-select behavior
- Fix scrolling for autocomplete
- Scrolling when there are many users with permissions
- New backend permissions

- ⚠️ Intentional differences from Figma design:
- The permission type selector (the secondary modal) is slightly wider. This is because of minor changes to the text - check thread for details.
- The permission type selector for sharing with new users (the top one, next to the input) is vertically offset 4px more than usual. This is intentional; it means there is roughly the same spacing on either side of the input's border, and also means there is spacing between the "invite" button and the permission type selector
- Many buttons are faded out (`opacity-50`) when they are not interactable.
- Text changes
- "Invite" changes to "Share" in blue button
- "File" changes to "<asset type>" in permission type selector

# Important Notes
Some options don't work because the backend representation for permissions is currently different - in particular, the `admin`, `edit`, and `read` permissions, and the `docs` sub-permission.

ℹ️ Currently only works with new backend permissions - i.e. `ENVIRONMENT` must be `'pbuchu'` in `config.ts`.
2023-08-10 09:09:31 +00:00
somebody1234
0e20644e47
Upload and download .enso-projects from the local backend (PM backend) (#7305)
- Closes https://github.com/enso-org/cloud-v2/issues/478
- Download local project as `.enso-project` archive
- Requires latest nightly version of Project Manager
- Closes https://github.com/enso-org/cloud-v2/issues/510
- Allow uploading `.enso-project` to local backend
- Closes https://github.com/enso-org/cloud-v2/issues/477
- Promote local project to cloud
- Currently errors with 500 (when uploading a small bundle) or 413 (when uploading a large bundle). May be fixed soon

# Important Notes
The "upload project to cloud" context menu action does not currently have an entry in the new context menu, so that will probably need an official design at some point
2023-08-09 09:30:40 +00:00
somebody1234
e4357f8890
Background translucency (#7386)
* Set translucency options

* Vibrancy on Windows

* Use explicit background image instead of vibrancy

* Attempt to fix `ide build`

* Fix lint warning

* Remove background from authentication flow

* Fix background image and position

---------

Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
2023-07-27 10:53:00 +02:00
somebody1234
b62c3d7867
Update assets table design (#7377)
* wip: refactor all tables into one single `AssetsTable`

* wip: Continue merging the four asset tables; make files type-error-free

* Get table working again

* Prepare for nested directories; insert new items at correct position

* Save extra columns state; minor style fixes

* Make tab toggle bar sticky

* Rename array.withItemsInsertedAtBoundary

* Fix minor bug; adjust dropzone appearance

* Indentation for nested assets; fetching nested assets; svg color changes

* New appearances for permission display; minor fixes for "shared with" modal

* Address issues

* Minor bug fixes

* New assets upload bar

* Adjust permission display and table cell borders

* Adjust styling

* Change `toastAndLog` to a hook

* Address issues

* Make table full-width

---------

Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
2023-07-26 14:59:48 +02:00
somebody1234
ce33af82f7
Split dashboard.tsx into smaller components (#6546)
* Consistent order for statements in `dashboard.tsx`; change functions back to lambdas

* Create convenience aliases for each asset type

* Remove obsolete FIXME

* Refactor out column renderers into components

* Enable `prefer-const` lint

* Remove hardcoded product name

* Add fixme

* Enable `react-hooks` lints (not working for some reason)

* Consistent messages for naming-convention lint overrides

* Enable `react` lints

* Extract out tables for each asset type

* Refactor out column display mode switcher to a file

* Switch VM check state to use an enum

* Fix lint errors

* Minor section change

* Fix position of create forms

* Fix bugs; improve debugging QoL

* Add documentation for new components

* Refactor out drive bar

* Refactor out event handlers to variables

* Minor clarifications

* Refactor out directory view; some fixes; improve React DX

There are still many issues when switching backends

* Add `assert`

* Use `backend.platform` instead of checking for properties

* Fix errors when switching backend

* Minor style changes; fix lint errors

* Fix assert behavior

* Change `Rows` to `Table`

* Fixes

* Fix lint errors

* Fix "show dashboard" button

* Implement click to rename

* Fix lint errors

* Fix lint errors (along with a bug in `devServiceWorker`)

* Enable dev-mode on `ide watch`

* Fix bug in `useAsyncEffect` introduced during merge

* More fixes; new debug hooks; fix infinite loop in `auth.tsx`

* Inline Cognito methods

* Remove redundant `Promise.resolve`s

* Fix column display

* Fixes

* Simplify modal type

* Fix bug when opening IDE

* Shift+click to select a range of table items

* Implement delete multiple

* Fixes

* Tick and cross for rename input; fixes

* Implement rename and delete directory and multi-delete directory; fixes

* Optimize modal re-rendering

* Make some internal `Props` private

* Remove old asset selection code

* Eliminate re-renders when clicking document body

* Fix name flickering when renaming

* Use static placeholders

* Avoid refreshing entire directory on rename

* Use asset name instead of ID in error messages

* QoL improvements

* Enable react lints and `strict-boolean-expressions`

* Extract dashboard feature flags to its own module

* Feature flag to show more toasts; minimize calls to `listDirectory`

* Deselect selection on delete; hide unused features; add exception to PascalCase lint

* Fix projects disappearing after being created

* Fix name of `projectEvent` module imports

* Re-disable delete when project is being closed

* Fix assets refreshing when adding new projects

* Refactor row state into `Table`; fix delete not being disabled again

* Address review

* Implement shortcut registry

* Fix stop icon spinning when switching backends (ported from #6919)

* Give columns names

* Immediately show project as opening

* Replace `asNewtype` with constructor functions

* Address review

* Minor bugfixes

* Prepare for optimistically updated tables

* wip 2

* Fix type errors

* Remove indirect usages of `doRefresh`

Updating the lists of items will need to be re-added later

* Remove `toastPromise`

* Fix `New_Directory_-Infinity` bug

* wip

* WIP: Begin restoring functionality to rows

* Fix most issues with DirectoriesTable

* Port optimistic UI from `DirectoriesTable` to all other asset tables

* Fix bugs in item list events for asset tables

* Merge `projectActionButton` into `projectsTable`

* Remove `RenameModal`; minor context menu bugfixes

* Fix bugs

* Remove small default user icon

* Fix more bugs

* Fix bugs

* Fix type error

* Address review and QA

* Fix optimistic UI for "manage permissions" modal

* Fix "share with" modal

* Fix template spinner disappearing

* Allow multiple projects to be opened on local backend; fix version lifecycle returned by local backend

* Fix minor bug when closing local project

---------

Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
2023-07-19 11:48:39 +02:00
somebody1234
457d0986b6
Help chat (#7151)
* wip

* wip 2

* wip

* Copy types from bot

* wip

* Send and display messages

* wip: shadow

* Copy styles from design screenshot

* Fix "create new thread" button

* Fix switching threads

* wip

* Scrollback

* Reactions

* Fix issues with chat input sizing

* Update changelog

* Fix bugs; add scroll to thread list

* Use types from backend definitions

* Update git commit of chat backend; remove stray file path

* hotfix: fix "edit thread" shortcut on macos

* Address issues

* Extract chat header to separate component

* Begin matching appearance with Figma

* Show reaction bar on hover

* fix small scrollbar appear next to the message input

* Disallow sending empty messages

* Add chat URL to config - production URL will be added soon

* add production chat url

* fix linters

---------

Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
2023-07-18 13:23:41 +02:00
somebody1234
af03938305
"Share with" button (#7100)
* Add backend endpoints for "share with" button

* wip

* Fix bugs

* Invite user to organization if email is not found

* Minor fix for error message

* Address review

* Address issues

* Fix React error about identical keys

* Fix "share with" modal z-index; filter out users with permissions on asset

* Fix errors; address comment

* Fix

* Change submit button text to "Already has access" when appropriate

* Address review

* Show email on hover

* Finish renaming "share with" modal

* Select multiple for "share with" modal

* Minor style changes

* Deselect other permissions when "own" permission is selected

* Fix deselecting permissions

* Remove unused svg

---------

Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
2023-07-12 10:12:39 +02:00
somebody1234
c276bc035c
Enable React and strict-boolean-expressions lints (#7023)
* QoL improvements

* Enable react lints and `strict-boolean-expressions`

* Address review

* Minor bugfixes

---------

Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
2023-07-06 13:52:32 +02:00
somebody1234
b4d0a40c7d
(even more) Dashboard fixes (#6919)
* Change cdn domain

Fixes cloud-v2/#484

* Remove modal from file upload flow

Fixes part of cloud-v2/#483

* Add optimistic UI; add more toast messages

Fixes part of cloud-v2/#483

* Handle `authentication` and `new-dashboard` flags correctly

Fixes cloud-v2/#481

* Fix bugs

* Use offline mode when `-authentication=false`

* Stop row from resizing when loading permissions

* Fix issues

* Navigate back to login screen on registration success

* Prevent scrollbar flickering

The scrollbar still blinks when switching backends, but it now does not resize. The blinking seems to be very difficult to avoid.

* Stop modal close button from overlapping text

* Fix stop icon spinning when switching backends

Remote backend not tested

* Remove modal from files table plus button

* Scrollbar-aware column count
2023-06-28 14:35:20 +02:00
somebody1234
74527eaa8f
Extract SVGs to files (#7076)
* Extract SVGs to individual files

Probably not working for cloud frontend (`watch-dashboard`, `build-dashboard`) yet

Dynamic SVGs were not extracted out

* Make file SVGs work for `watch-dashboard` and `build-dashboard`

* Document SVG loaders

* Address QA issues
2023-06-23 10:47:04 +02:00
somebody1234
191f445304
QoL code improvements for dashboard (#7022) 2023-06-19 01:02:08 +02:00
somebody1234
5cc21001b1
Save backend type in localStorage, and automatically open projects when ready (#6728)
* Save backend type; fix `-startup.project`

* Attempt to fix for cloud

* Fix for cloud and implement automatic opening

* Fixes

* Add missing functionality

* Switch default backend to local backend

* Fix type error

* Fix saving backend

* Make loading message appear instantly

* Fix context menu positioning

* Fixes and QoL improvements

* Style scrollbar on `document.body`

* Fix `-startup.project`; other minor fixes

* Open project immediately when creating from template; minor fix

* Finally fix spinner bugs

* Fix some minor bugs

* Fix bugs when closing project

* Disallow deleting local projects while they are still running

* Close modals when buttons are clicked
2023-06-06 14:00:07 +02:00
somebody1234
cd7cb0bda5
Offline mode (#6870)
* Dashboard and authentication changes

* wip

* Replace `useNavigate` with a wrapper

* Fixes

* Fix flipped boolean

* QoL improvement for request blocking

* Add service worker to cache dependencies
2023-06-02 11:05:37 +02:00
somebody1234
658395e011
Enable require-jsdoc lint and add two lints related to React (#6403)
- Enables the `require-jsdoc` lint
- Fixes all lint errors caused by enabling this lint.

# Important Notes
- There is no option to require JSDoc for other constructs, like top-level constants.
2023-05-19 19:55:29 +00:00
Michał Wawrzyniec Urbańczyk
6ce0b4daa1
IDE's logging to a file (#6478)
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.
2023-05-03 03:30:13 +02:00
somebody1234
a1d48e7d0c
Cloud/desktop mode switcher (#6448)
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.
2023-05-02 17:48:07 +00:00
Wojciech Daniło
d0e1dd582e
Revert "Cloud/desktop mode switcher (#6308)" (#6444) 2023-04-26 23:21:24 +02:00
somebody1234
400cdbe893
Cloud/desktop mode switcher (#6308)
* fixmes

* fixmes

* fixmes

* fixmes

* fixmes

* fixes for e-hern's comments

* use abortcontroller

* add docs

* fixes

* revert craco, fix windows build

* remove from gitignore

* remove unnecessary check

* tmp

* augment window

* tmptmp

* split errors back up

* tmp

* tmp

* prettier

* fix

* Fix lints

* Prepare for addition for `as T` lint

* Add lint for early returns

* Address review issues

* Fix lints

* remove withrouter

* fix file length

* fixes

* fixes

* remove dashboard

* fix

* use switch

* prettier

* fixes

* prettier

* fixes

* run prettier

* run prettier

* run prettier

* fix main page url

* allow node.js debugging

* fix lints

* change not equal

* prettier

* Remove references to withRouter; fix lints

* Run prettier

* Add cloud endpoints

* Add JSON-RPC endpoints

* Add dashboard skeleton

* Add components and edit dashboard

* Run prettier

* (WIP) Add cloud endpoints

* Add rpc endpoints

* Address review issues

* Formatting and minor fixes for `newtype.ts`

* Address review issues

* Rename `Brand` to `NewtypeVariant`

* Rename `Brand` to `NewtypeVariant`

* Fix formatting in `newtype.ts`

* 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

* Add dashboard skeleton

* Run prettier

* 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

* Export newtypes

* Make css rebuild when tailwind config changes

* Fix endpoints

* Finish copying changes over

* Remove duplicate type definitions

* Feat: top-bar styles and changePassword feature

* Fix: remove eslint disable comments

* Fix bundling for dashboard

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

* Move CSS to Tailwind config

* Run prettier

* Copy changes from old branch

* Update endpoints

* Fix esbuild binary package names

* Remove redundant "npx" prefix from build scripts

* Remove unused dependency

* workaround for mac freeze

* Fix bug

* add missing sections

* Fix: bug

* Address review issue

* Fix prettier config; run prettier

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

* Fix service worker for client-side routing

* Remove workaround for backend bug when listing directories

* Fix sizing

* Fix spacing, add fixed paths

* Address review issues; minor fixes

* Fix authentication on desktop IDE

* Run prettier

* Allow unused locals and parameters in tsconfig.json

* Run prettier

* Fix TypeScript errors

* Run prettier

* Fix eslint errors, restructure code

* Minor fixes and other changes

* Revert incorrect change to `cognito/changePassword`

* Remove unused file

* Run prettier

* Merge with top bar; implement switching between IDE and dashboard

* Animate project switcher (WIP)

* Fix IDE and project switcher animation

* Fix eslint errors

* Change `#dashboard` to `.dashboard` for Tailwind

* Split `-authentication` option into `-cloud.authentication` and `-cloud.dashboard`

* Address review issues

* Add description for cloud option group

* Extract custom CSS values into Tailwind config; use ModalProvider

* Hide topbar in IDE view

* Add project manager backend service

* Begin fixing IDE open

* (WIP)

* Clean up unused code

* Minor fixes

* Fix

* Fix local backend's usage of project manager (WIP)

* WIP

* Minor fixes

* Fix scrollbar showing because of margins

* Expose `runProject` instead of `main`

* Keep persistent websocket to Project Manager

* Fix spinner state bug

* Fix race condition when switching between backends

* Fix loading local projects

* Make switching local projects work

* Fix opening cloud projects

* Add shortcut to switch back to dashboard

* Fix templates for desktop; other fixes

* Fix status check polling in `ProjectActionButton` not being stopped

* Run prettier

* Retry reconnecting to Project Manager

* fix back to dashboard shortcut on macOS

* Fixes

* More fixes

* Rename `backendModule` to `cloudService`

---------

Co-authored-by: Nikita Pekin <nikita@frecency.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
Co-authored-by: Nctdtman <137032445@qq.com>
2023-04-26 16:59:39 +02:00
somebody1234
3d045a7ceb
Dashboard directory interactivity (#6279)
* turn object into var

* add todo

* fix style

* fixes

* remove forgot password + reset password

* remove signout

* remove setusername

* remove login

* remove registration

* fix comments

* re-enable flag

* rename div

* add comment

* fix lints

* remove tailwind conf

* Revert "remove registration"

This reverts commit 02439c9b70.

* Revert "remove login"

This reverts commit 8e6f9c1112.

* Revert "remove setusername"

This reverts commit 84721bcccd.

* Revert "remove signout"

This reverts commit 08a96d3796.

* Revert "remove forgot password + reset password"

This reverts commit e52f51a762.

* remove opener

* move opener

* tmp

* prettier

* expand docs

* tmp

* replace react-scripts with craco

* add tailwindcss

* switch to brands

* tmp

* tmp

* tmp

* fixmes

* fixmes

* fixmes

* fixmes

* fixmes

* fixes for e-hern's comments

* use abortcontroller

* add docs

* fixes

* revert craco, fix windows build

* remove from gitignore

* remove unnecessary check

* tmp

* augment window

* tmptmp

* split errors back up

* tmp

* tmp

* prettier

* fix

* Fix lints

* Prepare for addition for `as T` lint

* Add lint for early returns

* Address review issues

* Fix lints

* remove withrouter

* fix file length

* fixes

* fixes

* remove dashboard

* fix

* use switch

* prettier

* fixes

* prettier

* fixes

* run prettier

* run prettier

* run prettier

* fix main page url

* allow node.js debugging

* fix lints

* change not equal

* prettier

* Remove references to withRouter; fix lints

* Run prettier

* Add cloud endpoints

* Add JSON-RPC endpoints

* Add dashboard skeleton

* Add components and edit dashboard

* Run prettier

* (WIP) Add cloud endpoints

* Add rpc endpoints

* Address review issues

* Formatting and minor fixes for `newtype.ts`

* Address review issues

* Rename `Brand` to `NewtypeVariant`

* Rename `Brand` to `NewtypeVariant`

* Fix formatting in `newtype.ts`

* 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

* Add dashboard skeleton

* Run prettier

* 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

* Export newtypes

* Make css rebuild when tailwind config changes

* Fix endpoints

* Finish copying changes over

* Remove duplicate type definitions

* Fix bundling for dashboard

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

* Move CSS to Tailwind config

* Run prettier

* Update endpoints

* Fix esbuild binary package names

* Remove redundant "npx" prefix from build scripts

* Remove unused dependency

* Begin adding interactivity

* workaround for mac freeze

* Fix modal bugs

* Begin implementing forms, split forms and modals into new files

* Get form UI working

* add missing sections

* Minor fixes, save current directory to localStorage

* Fixes for drop-to-upload

Note: currently it is opening in a new tab instead of actually uploading

* Address review issue

* Fix prettier config; run prettier

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

* (WIP)

* Fix service worker for client-side routing

* Add close button to asset creation forms; fix saving directory to localStorage

* Remove workaround for backend bug when listing directories

* Fix drop-to-upload

* Fix sizing

* Fix spacing, add fixed paths

* WIP: fix toast notification styles, begin adding context menu

* WIP: Add context menu, minor fixes

* Fix authentication on desktop IDE

* Allow unused locals and parameters in tsconfig.json

* Run prettier

* Fix TypeScript errors

* Fix modals; minor refactor

* Implement context menus for labels; fixes

* Add modal provider and switch all modals to provider; fixes

* Fix modals and user icon size

* Fixes

* Remove obsolete files from incorrect merge

* Address review issues

* Fix type error

* Stop removing `#root`

* Fixes for cloud

* Implement search on frontend side

* Fix race condition related to `directoryId`

* Hide directories, files and secrets tables on desktop IDE

* Fix lint errors

* Properly update visible projects when a project is created

* Pass directory id to create project

* Hide column display switcher; remove placeholder column data

---------

Co-authored-by: Nikita Pekin <nikita@frecency.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
2023-04-26 11:52:13 +02:00
Michał Wawrzyniec Urbańczyk
19203427e0
URL handling (#6243)
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.
2023-04-24 16:12:30 +02:00
somebody1234
3e5a3dc468
Fix all eslint errors (#6267)
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
2023-04-24 12:56:26 +00:00
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
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
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
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
somebody1234
d38951d4e9
Fix #5975 (#5976)
Fixes issue with blank screen caused by missing `tailwind.css`.
2023-03-22 09:18:06 +01: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
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
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