Commit Graph

1418 Commits

Author SHA1 Message Date
somebody1234
50d919d952
Simplify button variants (#10828)
- Remove "cancel" variant in favor of "outline" variant
- Remove "bar" variant in favor of "outline" variant
- Buttons in the Drive Bar have been switched to a new "outline-light" variant that is the same as the "outline" variant except with the border color of the "bar" variant
- Rename "tertiary" variant to "accent"
- Remove `components/Input` and `components/ControlledInput` which are no longer used

# Important Notes
None
2024-08-28 17:05:20 +00:00
somebody1234
2c1fe33f3f
Update launch.json and flake.nix (#10854)
- Update `launch.json` to use PNPM-compatible commands
- `launch.json` is currently used for "Run and Debug" configurations in VS Code
- Update hash of rust-toolchain in `flake.nix`
- `flake.nix` is used in combination with direnv to download and add the appropriate tooling binaries to `$PATH`, on systems with direnv (and Nix) installed

# Important Notes
None
2024-08-28 16:17:48 +00:00
somebody1234
01c49ce7a2
Support multiple local directories (#10664)
- Add support for multiple local directories
- Save primary local root directory in `localStorage`
- Fix primary local root directory not updating in some conditions
- Save additional local root directories in `localStorage`
- Add buttons to browse for and reset primary local root directory

# Important Notes
None
2024-08-28 16:06:29 +00:00
Kaz Wesley
92995d191f
Fix deletion-failure bug (#10888) (#10889)
Fix intermittent deletion failures (#10888)

- Fix bug in deletion logic (the `syncModule` itself was passed to a function that tried to commit it as an edit)
- Refactor APIs to avoid similar bugs (remove `direct` edit option)

# Important Notes
- `graphStore.getMutable` provides safer access to some of the functionality that was exposed by `direct` editing.
- `graphStore.transact` has been eliminated; it was redundant with `graphStore.batchEdits`.
2024-08-28 14:28:43 +00:00
Kaz Wesley
bd5ab43cf6
Improve component comment positioning (#10885)
Implement #10691
- Comment moves out of way of menu as needed.
- Animate comment and error shifting when menu is toggled.
- Match comment/component spacing to component/error spacing.

https://github.com/user-attachments/assets/7daa342d-a7f1-4f63-b934-1519724a59a5
2024-08-28 14:10:25 +00:00
Kaz Wesley
27f7d14140
Fix collapsed function renaming (#10884)
Fix #10763 and related issues:
- Fix bug preventing `WidgetFunctionName` from matching
- Fix missing icon when `WidgetFunctionName` matches
- Add testing for `WidgetFunctionName`
- Fix `WidgetFunctionName` padding
2024-08-28 11:05:19 +00:00
somebody1234
bd3ebc5000
Fix "Missing queryFn" error when reloading with project openn (#10894)
- Fix https://github.com/enso-org/cloud-v2/issues/1451
- Fix "Missing queryFn" error due to
- This is done by providing a default value to the query. A more ideal solution may be to use the full query with the `queryFn`, but this is not an option here as the full query for this query requires a lot more info, some of which we don't have.

# Important Notes
- Test opening a top-level project and then refreshing
- Test opening a project in a nested directory and then refreshing (to make sure the query is not being executed just because the corresponding row is visible)
2024-08-27 07:40:27 +00:00
Kaz Wesley
582b7f9a2e
Fullscreen improvements (#10876)
Implements #10686.
- Add fullscreen modes to doc editor and code editor
- Contain fullscreen view within graph editor tab
- Prevent persisting or synchronizing fullscreen state
- Animate transition

https://github.com/user-attachments/assets/e88801c2-8c56-494b-8500-95fbd76c4322
2024-08-23 13:00:44 +00:00
Paweł Grabarz
7653280e33
Remove all usages of unstable rust features (#10813)
Removed all `#![feature]` flags, except for `#![feature(test)]`. Once parser benchmarks are ported to something that is compatible with stable rust, we will be able to switch to it.
2024-08-22 14:09:17 +00:00
somebody1234
60ae6f9bdb
Hotfix opening links in browser (#10869)
Fix regression causing the link to user registration to not be opened in browser.

# Important Notes
None
2024-08-22 12:41:06 +00:00
somebody1234
1c76ad50d1
Accept/decline invite to new organization (#10822)
- Frontend part of https://github.com/enso-org/cloud-v2/issues/1403
- Add a new dialog (like the Version dialog) that appears over the Drive view (unlike the ToS dialog which appears in place of the Drive view)

# Important Notes
None
2024-08-22 11:49:12 +00:00
Kaz Wesley
6261018591
Fix circular menu z-index and position (#10867)
Dropdown now covers circular menu (fixes issue from #10666).

<img width="295" alt="Screenshot 2024-08-21 at 07 59 24" src="https://github.com/user-attachments/assets/9793b185-a575-4a05-8964-da35c26fecc9">
2024-08-21 20:48:53 +00:00
somebody1234
8d7b684019
User & Team spaces (#10477)
- Depends on https://github.com/enso-org/cloud-v2/pull/1344
- Implement https://github.com/enso-org/cloud-v2/issues/1342
- Refactor `Category` type to allow for extra metadata (user/team id and home directory path)
- Show list of users and teams in sidebar
- Add "My Files" category for users with team/enterprise plan - because in that case, the directory opened by the "Cloud" category is the organization's root directory, not the user's root directory

# Important Notes
None
2024-08-21 18:10:56 +00:00
Adam Obuchowicz
c294e05fd7
Do not propagate arrow events from Table Widget (#10859)
A trivial fix for bug reported in https://github.com/enso-org/enso/issues/10856

Without it, navigating selection in table widget is also displacing node.
2024-08-21 13:19:52 +00:00
Adam Obuchowicz
a9198c8d06
Make tab accept the text input (#10857)
Fixes #10855

Added handler for `tab` key. We cannot accept input on blur, as sometimes it should not be accepted (as when user clicks at drop-down option where text widget was providing filtering pattern).
2024-08-21 13:08:23 +00:00
Kaz Wesley
45a54b93cd
Dropdown improvements (#10853)
Implement changes requested in #10666.

#### Align left edge with widget

Top-level argument (edge aligned to TLA boundary):

<img width="639" alt="Screenshot 2024-08-20 at 10 10 27" src="https://github.com/user-attachments/assets/eb1712bf-1cbc-4a5d-bdb6-7458f94a27f4">

Nested (edge aligned to start of widget text):

<img width="519" alt="Screenshot 2024-08-20 at 10 11 47" src="https://github.com/user-attachments/assets/477ffe6e-ac00-41fb-bfb0-4d22c25c0f8b">

#### Adjust height

<img width="134" alt="Screenshot 2024-08-20 at 10 06 20" src="https://github.com/user-attachments/assets/17ac485e-deeb-4afd-973b-fc8c182ffb1d">

# Important Notes
- Also some HTML/CSS simplification in `CircularMenu`.
2024-08-21 12:53:11 +00:00
Adam Obuchowicz
2919e5833c
Update filtering in new CB (#10847)
Fixes #10604

Removed many parts of `filtering.ts` and `input.ts` - now our filtering is not "context aware", in the component browsing mode we just take entire input as filtering pattern.

[Screencast from 2024-08-20 11-49-20.webm](https://github.com/user-attachments/assets/23137036-5f46-4982-bac7-9196461e7c9c)

# Important Notes
As we agreed during refinement, I did not focus on exact unit testing - we need to first try the new design out.
2024-08-21 10:59:45 +00:00
Adam Obuchowicz
22263e8ff9
Y-docs: Fix write capability recovery (#10851)
When receiving no write capability in `text/openFile` response, the method returned error without synchronizing, but session state stayed at 'Opening' - this resulted in automatic success on the next retry without actually trying.

Added additional state to handle recovery from missing write capability errors.

# Important Notes
tested by applying the patch below (which simulates problem reported by James):

```diff
diff --git a/app/ydoc-shared/src/languageServer.ts b/app/ydoc-shared/src/languageServer.ts
index e1403f50420247575b437df8c603e5f1701b5e1d..753bbf9f9f449f6130c79040e44607ce0c308f7f 100644
--- a/app/ydoc-shared/src/languageServer.ts
+++ b/app/ydoc-shared/src/languageServer.ts
@@ -3,6 +3,7 @@ import { bytesToHex } from '@noble/hashes/utils'
import { Client, RequestManager } from '@open-rpc/client-js'
import debug from 'debug'
import { ObservableV2 } from 'lib0/observable'
+import { wait } from 'lib0/promise.js'
import { uuidv4 } from 'lib0/random'
import { z } from 'zod'
import { walkFs } from './languageServer/files'
@@ -268,9 +269,25 @@ export class LanguageServer extends ObservableV2<Notifications & TransportEvents
return this.request('session/initProtocolConnection', { clientId }, false)
}

+  private openCalls = 0
/** [Documentation](https://github.com/enso-org/enso/blob/develop/docs/language-server/protocol-language-server.md#textopenfile) */
openTextFile(path: Path): Promise<LsRpcResult<response.OpenTextFile>> {
-    return this.request<response.OpenTextFile>('text/openFile', { path })
+    if (this.openCalls === 0) {
+      this.openCalls = 1
+      return wait(1000).then(() =>
+        Err(new LsRpcError('Simluated timeout', 'text/openFile', { path })),
+      )
+    } else if (this.openCalls === 1) {
+      this.openCalls = 2
+      return this.request<response.OpenTextFile>('text/openFile', { path }).then(value => {
+        if (value.ok) {
+          value.value.writeCapability = null
+        }
+        return value
+      })
+    } else {
+      return this.request<response.OpenTextFile>('text/openFile', { path })
+    }
}

/** [Documentation](https://github.com/enso-org/enso/blob/develop/docs/language-server/protocol-language-server.md#textclosefile) */
```
2024-08-20 14:42:25 +00:00
Kaz Wesley
95e50f48c9
Fix multiselect stability (#10838)
Fix #10543.
2024-08-20 12:45:35 +00:00
Adam Obuchowicz
921632e38d
New design of CB: two modes (#10814)
Fixes #10603

[Screencast from 2024-08-14 12-10-51.webm](https://github.com/user-attachments/assets/fcd5bfa4-b128-4a84-a19f-c14e78dae8c9)

What is not yet implemented: the filtering. That means that spaces keep their special meaning, and we still display modules and types.

The component list itself was refactored to a separate vue component.

The logic of default visualization type in preview changed a bit: as now there is no selected component, we remember with what suggestion have we switched to code edit mode.
2024-08-19 13:28:38 +00:00
Kaz Wesley
2cfd6fa672
Don't select node when output port is clicked. (#10834)
* Don't select node when output port is clicked.

If we select a node on any click, it is not possible to connect from a node's
output port to a hidden-by-default port.

Reverts one commit from #10800.
2024-08-19 08:52:47 -04:00
marthasharkey
b2237f77c7
Add drilldown to XML (#10824)
This adds the drilldown behaviour to XML_Elements.

![10557-xml-drilldown](https://github.com/user-attachments/assets/062d7de9-c157-4ea2-8a9b-a39f91c26581)
2024-08-19 10:12:42 +00:00
Kaz Wesley
b442a38894
Reactive Asts (#10777)
Reactively track reads of fields of all `Ast` objects residing in the `graphStore`'s `syncModule` (i.e. the committed module state). Tracking includes reading the `parent` field of a node.

Note that non-`Ast` structured fields (e.g. `ArgumentDefinition`) are not themselves reactive--an access is tracked when obtaining the object from the `Ast`, not when accessing the inner object's fields. Structured fields are low-level, and mostly not exposed outside `Ast`, so I don't think transitively proxying them would be worth the overhead.

Implements #10697.
2024-08-16 16:35:48 +00:00
marthasharkey
ca396f5d15
Sort toolbar rendering for narrow nodes (#10831) 2024-08-16 15:04:01 +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
Kaz Wesley
a8551c7268
Select node on menu click (#10800)
* Select node on any click

Implements #10689.
2024-08-13 12:30:11 -04:00
Kaz Wesley
82e81acc9c
Wheel/pan zooming maintains pointer scene pos (#10802)
When zooming with the mouse wheel or trackpad gesture, translate the viewport position to keep the same scene point under the cursor.

Implements #10420.
2024-08-13 16:14:04 +00:00
Radosław Waśko
fc3ac6ced1
Various fixes to visualizations (#10745)
- Closes #10716 by un-marking the `Snowflake_Connection` as `private`.
- Does the same to `SQLServer_Connection`.
- Makes sure that `Snowflake_Connection` has correct visualization and enables links for it.
- Adds a fallback in `to_default_visualization_data` and in Table's `prepare_visualization` so that if `to_js_object` of a given type is malformed, we still get some kind of visualization + debug info about the underlying error.
2024-08-13 15:20:55 +00:00
marthasharkey
057beec373
Create node from sort and filter (#10704)
- closes #10491

When the user applies filters or sorts to the table visualisation. A button appears that will allow the user to add components reflecting the sort/filter to the work flow.

- single sort
![10491-single-sort](https://github.com/user-attachments/assets/5cac4365-d525-49ad-a91b-91eb03f53641)

- multi sort
![10491-multi-sort](https://github.com/user-attachments/assets/1f41b77a-47b0-4e73-8632-7094bbbdfbef)

- filter
![10491-filter](https://github.com/user-attachments/assets/78912d9e-7df0-43e6-ba47-0e91279fa1b5)

- true/false filter
![10491-filter-boolean](https://github.com/user-attachments/assets/fc2fc8bd-99f5-46c3-b798-ea3b8b97fd3f)

- sort and filter
![10491-filter-sort](https://github.com/user-attachments/assets/85557220-898f-4d46-9254-d3c4206d52ec)
2024-08-13 15:12:07 +00:00
Kaz Wesley
fa69e17bd1
Show scrollbars when scene is scrollable (#10797)
Implements #10681.
2024-08-13 09:01:04 -04:00
Kaz Wesley
89f50676cd
Fix breadcrumb height (#10801)
Fixes #10652 (extended menu padding seems to have been fixed already; remaining
visual differences are due to icons using different proportions of 16x16 area,
`text1` in particular is tall).
2024-08-13 08:59:44 -04:00
somebody1234
0fc09f8723
Show errors in forms in authentication flow (#10739)
- Fix https://github.com/enso-org/cloud-v2/issues/1422
- Show errors on "login" page by switching to custom Form component
- Also convert "registration", "reset password" and "forgot password" pages to use the new component
- Preserve email when navigating between auth pages

# Important Notes
None
2024-08-13 11:50:07 +00:00
Paweł Grabarz
31e589e362
Do not default to development ydoc server in prod build. (#10786)
Fixes https://github.com/enso-org/enso/issues/10784
2024-08-12 16:52:44 +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
somebody1234
1d0dfe17f8
Fix flaky dashboard E2E tests (#10773)
- Potentially fixes https://github.com/enso-org/enso/issues/10667
- Potentially fixes a similar issue with labels test failiing

# Important Notes
None
2024-08-12 12:55:49 +00:00
marthasharkey
0d5d01a294
Wip/mk/drive drilldown from enso (#10724)
This moves some of the drilldown logic to the enso code and utilises the new 'get_rows' method for Table
2024-08-12 12:51:51 +00:00
Paweł Grabarz
b277132950
Fix test report artifact upload error handling (#10789)
Fixed error handling for test report file discovery, skipping not-found errors. Applied flaky dashboard e2e test fix to missed test suite.
2024-08-12 10:25:18 +00:00
Adam Obuchowicz
09c4b7a993
Fix file open retry in ydocs server (#10787)
There is a code for exponential back off, but the result with error was lost at one place.

Tested by mocking timeouts in our `lanugageServer.ts`

Fixes #10606
2024-08-12 09:57:29 +00:00
somebody1234
5079b21207
Switch from applying optimistic updates to invalidating queries (#10601)
- The update handling is no longer reactive, so it will no longer cause unnecessary re-renders

Other changes:
- Rename `Root` component to `UIProviders` to be more descriptive

# Important Notes
None
2024-08-09 08:05:45 +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
12d690079c
Fix doc editor sync (#10766)
Fixes #10527.
2024-08-07 15:43:26 +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
Kaz Wesley
aafdef1aeb
Improve parser contextualization (#10734) 2024-08-05 15:46:58 +00:00
Sergei Garin
c179701a00
Fix Subscribe form UX (#10744) 2024-08-05 16:57:48 +03:00
somebody1234
1fda574656
Keep subscription payment form open until plan is successful (#10732)
- Keep payment form open until `plan` on `users/me` matches the new plan being upgraded to
- 3 second delay between fetches on `users/me`
- 30 second timeout after which an error message is displayed
- Note that currently this just keeps the form submit button spinning for longer, rather than having an extra dedicated full-page loading spinner.

# Important Notes
None
2024-08-01 11:58:55 +00:00
somebody1234
d9fc3a0fb6
Dashboard improvements (#10715)
- Frontend part of https://github.com/enso-org/cloud-v2/issues/1397
- Show organization details to everyone (behavior unchanged)
- ⚠️ Allow editing only for admins
- ⚠️ Currently there is no backend endpoint to get organization permissions
- Stop (incorrectly) submitting *all* settings inputs twice
- Frontend part of https://github.com/enso-org/cloud-v2/issues/1396
- Fix "remove invitation" sending wrong request
- Stop sending `organizationId` in "create invitation" request
- Not adding `email` autocomplete to `/registration`
- Currently already exists
- but it will need to be revisited after the new sign up flow PR is merged.
- Fix https://github.com/enso-org/cloud-v2/issues/1407
- Fix project open request being sent multiple times
- Address https://github.com/enso-org/enso/issues/10633#issuecomment-2252540802
- Fix path to local projects (previously gave the path to their containing folder

Other fixes:
- Various fixes for autocomplete:
- Fix autocomplete appearance (dropdown is no longer detached from main input)
- Add tooltips for overflowing autocomplete entries
- Add tooltips for overflowing usernames in "manage permissions" modal
- Animate height of "asset search bar" dropdown and "autocomplete" dropdown
- Auto-size names of object keys in Datalink input

Other changes:
- Avoid gap with missing background on right side of tab bar when resizing window due to the clip path being animated
- Add <kbd>Cmd</kbd>+<kbd>W</kbd> and <kbd>Cmd</kbd>+<kbd>Option</kbd>+<kbd>W</kbd> to close tab
- Make <kbd>Escape</kbd> only close tab if it is the Settings tab (a temporary tab)

# Important Notes
None
2024-08-01 11:29:05 +00:00
Sergei Garin
a5922e0844
New Signup flow (#10616) 2024-08-01 09:35:41 +00:00
somebody1234
636d0d11bf
Move selected rows state of Data Catalog to zustand store (#10637)
- Eliminates lag when using drag-to-select (the `SelectionBrush`) by moving the state into a zustand store.
- This avoids the lag because now the entire Data Catalog no longer has to rerender, because the state is no longer stored in the `AssetsTable` component that contains all the rows (and would therefore rerender all the rows when its state changes)

# Important Notes
- The lag is present on Chromium, but any lag in general is generally more visible on Firefox, so it's highly recommended to test on Firefox as well as Electron
- On current develop, *any* drag selection should be enough to trigger the lag (typically 200ms JS + 200ms rendering). If it's not reproducible, then you may need to create more assets.
2024-08-01 07:58:15 +00:00
Ilya Bogdanov
42ba5ee8a2
Fix editing number and string literals from code editor (#10693)
Closes #10684

https://github.com/user-attachments/assets/a6b42121-b684-414c-a370-f64174621212
2024-07-31 14:07:10 +00:00