Commit Graph

27 Commits

Author SHA1 Message Date
Adam Obuchowicz
908f426cac
A set of little improvements. (#11386)
1. Bumped eslint and its plugins versions, and autofix new errors (mostly eslint disables which were no longer neccessary)
2. ~~Replace eslint with eslint-p which speed up linter a bit (at least on my machine)~~ - CI machines don't like it.
3. Fixed/worked around one problem with flacky selection _unit_ tests.
2024-10-24 07:38:08 +00:00
Adam Obuchowicz
d1ee7fadce
Remove download font scripts (#11317)
The fonts were added (by mistake) anyway, but they are rarely changed, and the scripts add unnecessary complexity.

This also fixes some post- #11287 problems.
2024-10-14 16:11:42 +00:00
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
somebody1234
7a00e6ef26
Dashboard improvements (from 24 September 2024 + 30 September 2024) (#11219)
- Close https://github.com/enso-org/cloud-v2/issues/1508
- ⚠️ Labels modal - add selection indicator where user can (de)select multiple labels
- Checkboxes currently still cause the dialog to (incorrectly) close
- Edit datalink -> select enso secret -> options are too narrow for enso path. Strip enso://Users(Teams), if possible make the options list longer on the left side
- Added (or rather, re-enabled via CSS) horizontal scroll instead
- Make Versions, Sessions, Settings as tabs similar to documentation panel in graph editor
- Edit description in context menu should open asset panel with description input active
- Edit secret should be moved to asset panel (same like datalink)
- Dim background when "edit description", "edit secret", or "edit datalink" are clicked/triggered via shortcut to highlight input
- Hide unused (= no backend support) columns and icons: accessed by projects and accessed data
- *Partial* frontend fixes for https://github.com/enso-org/cloud-v2/issues/1529
- (1) Fix settings title being horizontally centered and split on multiple lines
- (2)  backend issue
- (3)  out of scope
- (4)  backend issue
- (5)  out of scope
- (6)  out of scope
- (7)  backend issue
- (8)  already fixed in #11126
- (9)  out of scope (potentially requires a way to trigger a tooltip on a disabled button)
- (10)  out of scope
- (11)  out of scope
- (12)  out of scope
- (13) URL encode `enso://` URLs in "copy as path"
- (14) Double click on datalink make asset open and close (not sure if this has already been fixed)
- (15) Clicking anywhere on Asset Panel no longer deselects assets (not sure if this has already been fixed)
- (16)  addressed in #11268
- (17) Make list of labels in Asset Panel (right sidebar) horizontal instead of (incorrectly) vertical
- (18) Only show "Billing" settings tab for organization admins
- Use "workspace" instead of "network" icon for project tabs
- Other fixes:
- Fix Asset Panel (right sidebar) not being able to be toggled off if it is temporarily open (when triggered from editing description, or editing secret, or editing datalink)
- Make "cancel" and "reset" buttons default to outline variant, instead of ghost variant
- Fix style of dropdown
- Change Datalink editor dialog so that object keys are above inputs, not beside them. This gives inputs much more horizontal space for children of deeply nested objects.

Issues left to fix:
- Checkboxes currently still cause the dialog to (incorrectly) close
- "Edit description" actions etc. do not properly focus inputs

Issues left to do (out of scope):
- Show username of user currently using a project (possibly as tooltip?) if the project is currently disabled.
- Dropdown and autocomplete entries should be in their own dialog, so that they can escape the parent dialog if they are too long

# Important Notes
None
2024-10-09 09:10:49 +00:00
Adam Obuchowicz
e6b904d012
Integration Tests (#11186)
A stub for integration tests to be run locally; part of #8487

To run tests, you need to:
1. Build IDE package: `./run ide build`
2. set ENSO_TEST_USER and ENSO_TEST_USER_PASSWORD to some working credentials (I used my personal account, but there will be also test user soon)
3. run `corepack pnpm -r --filter enso exec playwright test`

The tests are run with a separate projects directory set up in tmpdir, so any local workspace dir is not affected.

The only test so far just checks if it's possible to log in and create a new project.
2024-09-27 15:11:13 +00:00
Adam Obuchowicz
3941634036
Table Widget: removing columns and rows (#11151)
Fixes: #10758

[Screencast from 2024-09-23 13-19-31.webm](https://github.com/user-attachments/assets/aa28708e-f4c9-400a-966d-1d82abe99f1e)

# Important Notes
To add custom options, I needed to bump AGGrid version. But not the newest one, as it made some bugs I failed to fix.
2024-09-23 14:24:40 +00:00
Paweł Grabarz
c996707027
Add support for touch-based graph navigation and selection (#11056)
Fixes #9493

Tested on windows desktop (standard mouse), macbook touchpad and iphone, which should behave similarily to windows touchscreen devices.
2024-09-20 16:31:45 +00:00
Sergei Garin
b5122348da
MFA (#10875)
* Draft checkbox component

* Fixes in Setup Page

* Invite Users

* Add usergroup setup after subscription

* Fix comments

* Refetch Interval + Feature Toggles

* Fix lint

* Address issues

* Fix Dialog

* Assign users to the user group

* Use transitions to navigate between steps

* Small fixes

* Improve styling for scrollbars

* Fix typescript

* OTP input

* Fix setup logic

* Show Setup dialog only for admins

* Add otp

* OTP input

* 2FA settings section

* Small improvements

* Fixes

* Small fixes

* Remove w-full

* TOTP at login

* Fixes in 2FA

* Fixes in types

* Fix totp

* Merge fixes

* Merge fixes x2

* Merge fixes x2

* Fix types

* Fix types

* Fix cancel button

* Fix reset button

* Fix types

* Fix prettier

* Fix prettier

* Fix lint

* Fix lint

* Fix control

* Address prettier

* Fix MFA mock

* Fix sign in message

* Fix tests

* Address CR

* Fix types
2024-09-13 16:00:31 +03:00
Kaz Wesley
1bcbc00004
Update Vue (#11016)
See: https://blog.vuejs.org/posts/vue-3-5
2024-09-10 13:18:35 -04:00
somebody1234
9ec60299e4
Local Dashboard fixes (#10958)
- Fix most of https://github.com/enso-org/cloud-v2/issues/1459
- Prevent click + click from triggering rename on Windows and Linux. Behavior is preserved on macOS.
- Fix text in Drive when root folder is empty
- Properly remove the "Drop here to upload box" after a file is dropped
- "Copy as path" now unconditionally uses `/` for path delimiters, even on Windows
- Duplicating a project in the root folder on Windows no longer errors
- Extra folders in the sidebar now (correctly) show folder name, rather than path, on Windows
- Mouse pointer when dragging to a folder is now move, not copy

Not addressed:
- [no-repro] Tooltips should have some latency before showing up
- This should already be the case, although it may work weirdly (once the tooltip opens, there is no delay on subsequent tooltips opening until the last tooltip closes.)
- [no-repro] Ctrl-click should add to selection
- Column width should be resizable
- This requires a refactor and therefore is considered out of scope for this PR
- [no-repro] Choosing root folder needs a file browser
- [no-repro] Choosing root folder doesn't do anything get the same list as we had before
- [no-repro] Open in explorer didn't work in a file but did on project - possibly fixed by path changes.
- [no-repro] Opening an enso-project by double clicking resulted on it being renamed with a (2)

Related changes:
- Make "root directory" picker's file browser default to the current root directory

# Important Notes
None
2024-09-08 06:54:41 +00:00
Sergei Garin
3be8770a0a
Setup Screen Improvements (#10844) 2024-09-05 16:11:02 +00:00
somebody1234
848e8699d7
Dashboard UX improvements (#10868)
- Fix dropdown focus issues
- Keyboard navigation to/from dropdowns and between options
- Mouse focus to/from dropdowns (there is no mouse navigation between options)
- Use new inputs in "new secret" modal
- Simplify form types
- Switch activity log date filters to use `DatePicker` which is a wrapper around a `react-aria-components` input
- Update `react-aria-components`
- Prevent Navigator2D from handling event if it has already been `defaultPrevented`
- Switch from `*` imports to `{}` imports for various files
- Switch assets table row headings to use new components

# Important Notes
None
2024-08-29 05:54:21 +00:00
Paweł Grabarz
4d2cc04e17
More robust ydoc server watch (#10817)
Fixed occasional issues with ydoc server starting in dev mode, which were caused by missing dist file, then nodemon failing to trigger a file watch event after esbuild completion. Now esbuild is directly responsible for managing a child process, without needing an additional layer of file watchers.
2024-08-14 13:17:53 +00:00
Adam Obuchowicz
6eece5f8d6
Table Editor Widget (#10774)
Fixes #10293

The Table Editor Widget allows adding rows and columns, editing cells and renaming columns.

[Screencast from 2024-08-07 13-17-37.webm](https://github.com/user-attachments/assets/d2e708b5-6516-4107-bc17-f018e455c111)

# Important Notes
* The parts of Table Visualization which were useful for the widget were put in vue component. On this occasion, we use aggrid vue.
2024-08-12 14:45:58 +00:00
Paweł Grabarz
b286adaae4
Split ydoc server into separate module (#10735)
# Important Notes
The command to run the gui dev environment has been changed. Invoking the old command will print a message about that.
From now on, use `pnpm dev:gui2` in repository root.
2024-08-08 12:12:05 +00:00
Kaz Wesley
3a4b942aae
Help tab (#10771)
Add context sensitive help to right side panel; implements #10582.

https://github.com/user-attachments/assets/0d6bce44-735a-4deb-86c9-72a088ab1d59

# Important Notes
- The rightmost (i.e. current) breadcrumb is no longer clickable.
2024-08-07 14:49:24 +00:00
Hubert Plociniczak
0c55ee50cf
Debug Ydoc/LS interaction without making code changes (#10687)
* Debug Ydoc without making code changes

Previously the log statements were guarded by a constant. Now log
statements are printed if YDOC_DEBUG=true env var is set during launch.

* debug LS RPCs

* bump vite to 5.3.5

* s/YDOC_DEBUG/YDOC_LS_DEBUG

* Address PR comment

* nit

* nit

* fix tests

* yet another linting problem
2024-08-06 19:53:36 +02:00
Sergei Garin
a5922e0844
New Signup flow (#10616) 2024-08-01 09:35:41 +00:00
somebody1234
4b96be8ef8 Edit prettier config (#10648) 2024-07-26 17:47:59 +10:00
Paweł Grabarz
8a3180eb89
Refactor node layout to handle arbitrary widget sizes, add Table.new widget stub (#10599)
Implements #10484, also fixed an issue with dropdown arrow icon being pointed in the wrong direction.

Changed the way we handle spacing around ports and other rounded widgets. Now it is the innermost token element that actually pads itself when appropriate, allowing rounded widgets to stay tightly nested together. This cleans up an issue we've had with an unnecessary padding at the end of node, and makes margins easier to control in general.


<img width="371" alt="image" src="https://github.com/user-attachments/assets/4aa2ae0f-06f6-45fd-b7a1-1b7c0f60d395">
2024-07-25 14:26:29 +00:00
somebody1234
ebf4cd5c1f
Inline modules in app/ide-desktop/ (#10305)
- Remove unnecessary modules
- Remove `ts-plugin-namespace-auto-import` as it was a workaround to use the non-conventional `import *` convention
- Remove `esbuild-plugin-copy-directories` as it is unuse
- Inline modules that are only ever used once
- Inline `project-manager-shim` into `gui2` - it is only used during `gui2`'s dev mode
- Inline `content-config` into `client`
- Flatten `app/ide-desktop/lib/` to `app/ide-desktop/`
- Flatten `app/ide-desktop/lib/dashboard/` to `app/dashboard/`

# Important Notes
- As mentioned above, all remaining modules have been moved up from `app/ide-desktop/lib/` to `app/ide-desktop/`. It's not ideal but I'd rather hold off on moving them anywhere else before we have a consensus on what should go where.
- (That is to say, this may not be the final directory structure - but I figure it's fine to get *something* done so that hopefully the rest of the restructuring is simpler.)
2024-07-17 09:10:42 +00:00
somebody1234
cf9d757457
Even more dashboard fixes (#10541)
- Fix https://github.com/enso-org/cloud-v2/issues/1383
- Fix file download - both on Electron, and in browser
- Refresh versions list when uploading neww file version
- Fix app crashing when asset is opened in asset panel while switching to Local Backend
- Don't show asset id when asset is opened in asset panel, but user is on the Local backend, resulting in the internal Asset ID being shown
- Fix drag-n-drop
- ⚠️ `npm run dev` is NOT fixed in this PR - however it should already be fixed in another PR which has already been merged. This needs testing to confirm whether it is fixed though.

Other changes:
- Add support for "duplicate project" endpoint on Local Backend
- Fix downloading project from nested directory on Local Backend (not working)
- Refactor more E2E tests to use the "new" architecture
- Simplify "new" E2E architecture to minimize boilerplate

# Important Notes
- When testing downloads, both Electron and browser should be tested as they use completely separate implementations for how files are downloaded.
2024-07-16 09:55:45 +00:00
Kaz Wesley
11d2a44792
Cloud file browser (#10513)
https://github.com/user-attachments/assets/54cc375d-2a77-431c-af85-75fc872e2bcc

Closes #10167.
2024-07-15 15:22:51 +00:00
somebody1234
151438157e
Optimize assets table (#10522)
- Fix https://github.com/enso-org/cloud-v2/issues/1379
- Stop re-rendering the entire `AssetsTable` on every `AssetEvent`
- This is achieved by using `zustand` for fine-grained reactivity.

Other misc fixes:
- Fix "unique key prop" error in sidebar
- Vertically center asset panel toggle icon in top bar
- Limit width of asset names (show tooltip when asset name is too wide)

# Important Notes
None
2024-07-15 10:06:15 +00:00
somebody1234
b55086de75
More dashboard fixes (#10494)
- Fix context menu floating some distance away from the right side when clicking near right edge
- Add a line beside nested categories to make it clearer that it's not a UI glitch
- Fix watch mode for electron app

# Important Notes
None
2024-07-10 09:04:20 +00:00
Kaz Wesley
bc92035683
Share tanstack QueryClient between dashboard and IDE (#10431)
* Share tanstack QueryClient between dashboard and IDE

Part of #10400.

* Lint

* Review: Use enso-common

* Remove outdated README

* Naming

* Fix

* Lint

* enso-common CODEOWNERS: GUI+Dashboard

* Review: Prepare for GUI to be run from cloud entry point

* Lint

* Lint

* Fix e2e tests

* Fix e2e tests in CI?

* Clean CI build

* Revert "Clean CI build"

This reverts commit 73f2fb7972.

* Fix redundant dependency

* Work around a vue-query bug

* Lint

* fmt
2024-07-09 11:01:10 -04:00
Paweł Grabarz
d9972d547a
Migrate to pnpm (#10422)
Fixes #10197

# Important Notes
From now on, package installation will be using `pnpm install`. Installing it globally is fine for convenience, but it can also be used as `corepack pnpm install` without having to install anything other than node. For now, all other scripts are still invoked using `npm`, so we can still invoke them with usual `--workspace` setting. As far as I can tell that doesn't really have any other side effects and is identical as running the script through `pnpm run` in respective workspace project subdirectory.
2024-07-05 11:13:04 +00:00