Commit Graph

1567 Commits

Author SHA1 Message Date
Paweł Grabarz
a83297b7db
Drop git dependency on enso-bot repository (#11539) 2024-11-12 18:25:19 +00:00
marthasharkey
f2037ee9d0
Add data quality indicators to table Viz (#11307) 2024-11-08 16:59:09 +00:00
marthasharkey
8b5cd9bbfc
Extend Selection Menu to allow text selection (#11352) 2024-11-08 16:36:45 +00:00
Adam Obuchowicz
86c59469d0
Increase timeout and vite version (#11492)
1. The electron test hit timeouts from time to time, probably because of slow response from the engine: increased timeout.
2. Unify vite version across packages.
2024-11-08 08:43:02 +00:00
Kaz Wesley
867c77d5cc
New markdown editor (#11469)
Implements #11240.

https://github.com/user-attachments/assets/4d2f8021-3e0f-4d39-95df-bcd72bf7545b

# Important Notes
- Fix a Yjs document corruption bug caused by `DeepReadonly` being replaced by a stub; introduce a `DeepReadonly` implementation without Vue dependency.
- Fix right panel sizing when code editor is open.
- Fix right panel slide-in animation.
- `Ast.Function` renamed to `Ast.FunctionDef`.
2024-11-06 16:54:32 +00:00
Paweł Grabarz
9703cb1dd0
Align esbuild versions across packages (#11459)
Part of #11458

Should get rid of the "magical" CI failure: https://github.com/enso-org/enso/actions/runs/11576387008/job/32225209090#step:7:254
2024-11-05 23:43:27 +00:00
Sergei Garin
7ffd5b5ee6
Fix TOS modal (#11473) 2024-11-05 22:36:38 +00:00
Sergei Garin
0f8f6da273
Add transitions support for zustand 'useStore' (#11474) 2024-11-05 17:08:08 +00:00
Sergei Garin
0e434cd318
Replace special characters while uploading a file (#11356)
Closes: https://github.com/enso-org/cloud-v2/issues/1489

This PR replaces all special characters with `:`
2024-11-05 15:36:28 +00:00
Dmitry Bushev
47943a2e62
Add compression to the metadata code snapshot (#11470)
close #11420

Changelog:
- update: add zlib compression to the `snapshot` metadata field
- add: implement nodejs `zlib` for polyglot ydoc-server
- add: implement nodejs `Buffer` for polyglot ydoc-server
2024-11-05 11:57:43 +00:00
Kaz Wesley
42fc2af5cd
Fix tests after semantic merge conflict (#11488)
Force merging to repair CI.
2024-11-04 22:24:14 +00:00
Kaz Wesley
2b3bd2cc90
Move documentation into documentable types (#11441)
Move documentation into documentable types (implements #11302).

# Important Notes
GUI:
- Distinguish expression and statement
- `Ast.Ast` is still present, as the base class for AST objects. Most references to `Ast.Ast` are now references to `Ast.Expression`. Operations on blocks use `Ast.Statement`.
- `Ast.parse` has been replaced with: `Ast.parseExpression`, `Ast.parseStatement`, and `Ast.parseBlock`
- `syncToCode` is internally context-aware; it parses the provided code appropriately depending on whether its AST is an expression, a statement, or the top level of a module.
- Remove `wrappingExpression` / `innerExpression` APIs: Wrapper types have been eliminated; modifier lines are now fields inside parent types.
- Simplify AST printing:
- Fully implemented autospacing in `concreteChildren` implementations; the type returned by `concreteChildren` now ensures that spacing has been fully resolved.
- Eliminate `printBlock` / `printDocs`: `concreteChildren` is now aware of indentation context, and responsible for indentation of its child lines.
- The `Pattern` type is now parameterized to identify the AST type it constructs. The `Pattern.parseExpression` function helps create a `Pattern<Expression>`.
- Refactor `performCollape` for testability.
- e2e tests: Improve table viz test: It still doesn't pass on my Mac, but these changes are necessary if not sufficient.

Compiler (TreeToIr):
- An expression in statement context is now found in an `ExpressionStatement` wrapper.
- Documentation for a `Function` is now found inside the function node.
- Deduplicate some polyglot-function logic.
2024-11-04 15:33:53 +00:00
Ilya Bogdanov
d3beac3a90
Consider additional self types (#11451)
Fixes #11427

Before:

https://github.com/user-attachments/assets/fc16cefd-f264-4410-bd30-1747c580da1a

After:

https://github.com/user-attachments/assets/e85b8fb3-35c4-4d18-a9a0-2aeb69201b6f
2024-11-04 15:08:59 +00:00
Adam Obuchowicz
2bbd909705
Implement the limit of 256 cells in the Table Editor (#11448)
Fixes #10864

[Screencast From 2024-10-30 13-45-48.webm](https://github.com/user-attachments/assets/9ed2384a-de85-4059-a0fe-c0a45b2fe07c)
2024-11-04 09:10:59 +00:00
Sergei Garin
7487a3b4d2
Addtional tiny performance follow-up (#11460)
This PR mostly improve performance of the assets table:
1. It removes calc of the `clipPath` on scroll which triggers position recalculation in `Navigator2D`
2. Adds caching for parsing a category (we do this a lot across components but we have only a few categories) and runtime validatation has relatively large perf penalty
3. Adds dom-based virtualization for rows (we still need to add proper react based virtualization though)
2024-11-01 13:03:21 +00:00
Sergei Garin
fdab2233ac
Add React compiler (#11405)
This PR adds React Compiler to the dashboard
Read more about the compiler: https://github.com/reactwg/react-compiler/discussions/5

- This PR expects that these PRs are merged:
- #11380
- #11382

## Reasoning

On our codebase adding React compiler led to significant perf improvements across the whole app. But the most impact was on the AssetsTable (see video attachment). Adding React compiler reduced the rerender scope of the AssetsTable from the whole table to the certain elements that changed, and made the table much more usable.

Without compiler (page freezed):

https://github.com/user-attachments/assets/16505b40-123b-4153-9c22-880f5dfa211c


Compiler solves the issue:

https://github.com/user-attachments/assets/6a298876-f28d-4b3d-8247-50b0c7ecb7f8

This PR requires thorough testing of the dashboard for potential bugs introduced by the compiler
2024-10-31 12:10:22 +00:00
somebody1234
c6e87c2a17
Optimize asset table rendering (#11382)
- Depends on:
- #11380
- Some optimizations for re-rendering assets table:
- Omit `visibilities` from `state` in favor of passing each `AssetRow`'s `visibility` directly to the row. This minimizes spurious `state` updates.
- Pass `id` and `parentId` to `AssetRow` instead of the entire object. This ensures that re-fetches do not force a re-render of the `AssetRow` - we are no longer passing a reference to the object, so we are now comparing by string comparison (which is almost always stable).

# Important Notes
None
2024-10-31 10:36:10 +00:00
Paweł Grabarz
950a93ddeb
Display error message when viewed graph doesn't exist. (#11452)
Fixes #11211

<img width="258" alt="image" src="https://github.com/user-attachments/assets/7adea4f6-774a-49ac-8c86-5e785df2acff">

When the "go back" button is clicked, the user is sent back to the `main` function graph. The breadcrumbs are also present on that view and can be used for navigation.

Current design of the error state is improvised, likely to be changed once we have some design guidance about it.
2024-10-31 07:48:48 +00:00
Ilya Bogdanov
0d731adeff
Add undo/redo buttons to the top bar (#11433)
Closes #11222

https://github.com/user-attachments/assets/66f8dfd1-a7c4-497a-8ff6-a22f56dbb1dd
2024-10-30 17:01:35 +00:00
Paweł Grabarz
0cf1c021ce
Add enter node button to the dropdown menu (#11447)
Fixes #11179

<img width="223" alt="image" src="https://github.com/user-attachments/assets/9b5ba054-717f-4124-98df-3d076bc73b32">
2024-10-30 16:55:12 +00:00
Ilya Bogdanov
6566b2da2f
Fix help panel (#11421)
Fixes #11392

The issue was caused by somewhat cumbersome logic of updating/overriding displayed suggestion. I’m not sure if it even was working correctly at any time.


https://github.com/user-attachments/assets/51e6fcd4-2198-40a2-86e7-8fcfa8b8b8d5
2024-10-30 14:14:28 +00:00
Paweł Grabarz
29f1f0d4e1
Add IDE version to window title. (#11446)
Fixes #10966

![image](https://github.com/user-attachments/assets/a46e38e9-1ff3-4eb4-9a88-901d684dc205)
2024-10-30 13:48:59 +00:00
Adam Obuchowicz
39c44e7adb
Table Input Widget: Size persistence (#11435)
Fixes #10861

Every widget may set metadata on its AST. Because once widget picker will be implemented a single AST node may have many possible widgets, their settings are kept in a map keyed by their name/key.
2024-10-30 09:34:58 +00:00
Sergei Garin
5bf064f97f
Open enso devtools on call of toggleDevtools() (#11423)
This PR changes the behavior of `toggleDevtools()` function and shows `ensoDevtools` with `tanstack` devtools
2024-10-28 15:53:40 +00:00
Sergei Garin
12267c6d98
Batch refetches for different listDirectory queries (#11380)
This PR moves invalidation of the `listDirectory` queries into a separate `useQuery` to sync mutliple invalidations into a single one
2024-10-28 14:44:23 +00:00
Sergei Garin
fae18c0a04
Add eslint-react-compiler (#11404)
* Add React compiler eslint rules and fix issues across reusable components

* Fix compiler errors

* Remove fail-on-warnings for eslint

* Set max-warnings to 41 to match the amount of warnings introduced by react-compiler

* Add comment for lint task
2024-10-28 15:58:41 +03:00
Dmitry Bushev
db0582d11c
Metadata should not depend on absolute text spans (#11390)
close #11304

Changelog:
- update: add `ide.snapshot` optional metadata field containing the source code of the file
- update: `syncFileContents` method tries to repair the metadata spans when it detects that the source file was edited and the received code does not match the code stored in the `ide.snapshot` metadata field

# Important Notes
Tested in gui
2024-10-28 09:41:46 +00:00
Ilya Bogdanov
6111a35ccc
New component menu (#11398)
Closes #11244

- The new dropdown contains all buttons that were present on the wheel before. (except for disabled ‘Write always’)
- The color component stays the same for now
- The visualization toggle button does not change the color depending on the state.


https://github.com/user-attachments/assets/a4d711be-5526-41aa-8e24-6be52e187844

**UPDATE**:

The ‘Edit component’ button was replaced with the ‘Help’ button, which toggles the Help tab of the right-dock panel. The behavior is displayed on the video:

https://github.com/user-attachments/assets/6da8c34a-8bc3-4be4-b0b6-982bf709e986

The ‘Help’ item in the dropdown list preserves its current behavior (opening API docs in the browser).

# Important Notes
- I failed to fix an issue with the unmatching colors of the dropdown menu and the circular menu. If somebody wants to check it out – you are welcome. For now, we just transition to pure white without any transparency to mitigate the issue.
2024-10-26 19:36:16 +00:00
Adam Obuchowicz
08fd9213e4
Table Input Widget: Add column with plus (#11388)
Fixes #10863

(The `Column #3` in a screenshot below is just created and actually existing).

![image](https://github.com/user-attachments/assets/995d1a85-eb04-4b8d-bf23-b47ea61185e4)
2024-10-25 12:26:21 +00:00
AdRiley
1d5242c169
Change 3 dots icon (#11400)
From

![image](https://github.com/user-attachments/assets/87e390ee-8949-4289-8e89-a8de0bdaea85)


To

![image](https://github.com/user-attachments/assets/582eee8f-e6b1-4b5c-bfc6-f901c70a9598)
2024-10-24 18:49:14 +00:00
Radosław Waśko
ca9df70ebf
Saving data links to a DB_Table (#11371)
- Closes #11295
2024-10-24 13:18:49 +00:00
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
Kaz Wesley
33904912ee
Move annotations into fields of Function and ConstructorDefinition (#11374)
Move annotations into fields of Function and ConstructorDefinition.

# Important Notes
New syntax: Constructor argument-definition lines
- Each argument in a type-constructor definition may be specified on its own (indented) line.

Relaxed syntax: Unparenthesized arguments to annotations
- A generic annotation now uses the rest of the line as its argument expression; the expression no longer needs to be parenthesized.
2024-10-23 20:35:06 +00:00
Kaz Wesley
ec0306ece0
Enable cloud file browser in local projects (#11383)
Implements #11139.
2024-10-23 18:25:00 +00:00
somebody1234
4f556f2882
Fix AssetSearchBar E2E tests (#11377)
- Fix https://github.com/enso-org/enso/issues/11368
- Split "tags" E2E test into two tests to avoid timeout
- Fix https://github.com/enso-org/cloud-v2/issues/1551
- Fix other flaky E2E tests

# Important Notes
None
2024-10-23 12:30:00 +00:00
Kaz Wesley
4e4a1e1df2
Move TypeSignature into field of Function (#11364)
Move type-signature lines into `Function` field. Also implements #11293.

Stacked on #11346.
2024-10-22 19:50:14 +00:00
Kaz Wesley
d278ad636c
Replace private modifier node with field on supporting types (#11346)
Eliminate `private` modifier-node: `private` is a field in supporting types, or a single-token node in the case of `private` declarations.

# Important Notes
- Rust parser tests: Switch to a builder-style API for defining expected `Function` ASTs to allow further changes to `Function` fields without rewriting all the tests again.
- TreeToIr: Fix discarded module-level `diag`; add a test that covers module diagnostics.
- Syntax: Disallow `private` methods in function blocks. (Previously this was enforced in the compiler.)
2024-10-22 16:26:00 +00:00
somebody1234
171a95f17a
Multipart upload for large files (#11319)
- Close https://github.com/enso-org/cloud-v2/issues/1492
- Use multiplart upload for large files (>6MB)
- Split file into chunks of *exactly* 10MB (backend currently returns a fixed number of chunks)
- Call "start upload", then upload each chunk to S3 (currently sequentially), then "end upload"
- Files <=6MB (lambda limit) still use the current endpoint

# Important Notes
None
2024-10-21 15:31:29 +00:00
Adam Obuchowicz
7718734bf2
Limit light selection to "widget-colored" widgets only (#11358)
Fixes #10862

Before, we set selection to whit on entire node, but this looked bad in Table Widget.

[Screencast From 2024-10-18 15-23-40.webm](https://github.com/user-attachments/assets/cdc3e5f0-05f3-4858-ac98-c634ca283244)
2024-10-21 13:38:57 +00:00
somebody1234
5faddf52f0
Fix ESLint errors, add some docs (#11339)
- Fix ESLint errors
- Add documentation for *some* functions with blank documentation

# Important Notes
None
2024-10-21 12:56:39 +00:00
somebody1234
45ad3a751c
Dashboard improvements (8 Oct 2024) (#11268)
- ⚠️ Follow up to #11219. MUST NOT be merged in before that PR.

- Changes:
- Add optional overlay to `Popover`s
- Add and use `useAssetPassiveListener` everywhere to get reactive updates to asset state even outside Asset Panel
- `setItem` has been removed in favor of simply waiting for invalidations
- Migrate more `Modal`s to `Popover`s
- Migrate more inputs to `Form`s
- Periodically refetch Datalink in Asset Panel
- Show optimistic state for asset description (adding this because it is trivial to add)
- Remove usages of `get*` as mutations throughout the entire codebase - replace with `fetchQuery`
- Fixes most of rest of https://github.com/enso-org/cloud-v2/issues/1529
- (1) ℹ️ fixed in #11219
- (2)  backend issue
- (3)  out of scope
- (4)  backend issue
- (5)  out of scope
- (6)  [wontfix]? i think this is intentional, it's not so much slow scrolling and moreso snapped scrolling
- (7)  backend issue
- (8) ℹ️ fixed in #11126
- (9)  out of scope (potentially requires a way to trigger a tooltip on a disabled button)
- (10)  (will check later) Make sure you are not able to open a project opened by another user: cmd + click is not always working.
- (11) Drag from team space to user space should copy asset
- (12)  (will check later) Drag from user space to team should move (and swap ownership)
- (13) ℹ️ fixed in #11219
- (14) ℹ️ fixed somewhere (?)
- (15) ℹ️ fixed somewhere (?)
- (16) Show correct (and up-to-date) description for projects
- (17) ℹ️ fixed in #11219
- (18) ℹ️ fixed in #11219
- Fix https://github.com/enso-org/cloud-v2/issues/1535
- Completely remove optimistic UI for "copy asset"
- Fix https://github.com/enso-org/cloud-v2/issues/1541
- Make selection brush work again
- Unintentionally regressed in 51733ee876 (diff-f3e29bffcda342ab6a9dbafc58dde88ce26638eaecda1f17f40ca7e319c90cc8L89)

# Important Notes
None
2024-10-21 10:30:19 +00:00
Adam Obuchowicz
fa87a1857a
Copying and pasting in Grid fixes. (#11332)
Fixes #10760
Fixes #11141

[Screencast From 2024-10-17 13-51-45.webm](https://github.com/user-attachments/assets/78924f87-6bdb-4cb6-8f95-d9f97c63aea4)

This PR also changes the name of new columns to `Column #n` where n is index of column - this way it's easier to quickly create tables with non-conflicting column names.
2024-10-21 07:27:46 +00:00
Kaz Wesley
4d4a2990a0
Distinguish assignment/thunk by statement context (#11324)
Align `Assignment`/`Function` distinction in AST with compiler's implemented semantics:
- The ambiguous case `funcOrVar = expression` is now parsed as a `Function` when in a `Type` definition or in the top level of a module. I.e. it is an `Assignment` in contexts where the RHS is evaluated immediately when the binding is evaluated, and a `Function` in contexts where the RHS is evaluated each time the bound name is evaluated.
- `Assignment` statements now may only occur in function bodies.

Correcting this distinction lays the groundwork for #11302.

Other changes:
- Fixed incorrect source code locations for negative literals and negated expressions.

# Important Notes
New APIs:
- The parser now exposes a `parse_block` entry point, which allows parsing input lines as if in the body of a function. The previous entry point has been renamed to `parse_module`.
2024-10-18 17:54:55 +00:00
marthasharkey
27a535f6d0
Display error message when Scatterplot Visualization errors out (#11284) 2024-10-18 11:30:14 +00:00
somebody1234
e7bc796fe5
Make Asset Table selection backend specific (#11288)
- Fix https://github.com/enso-org/cloud-v2/issues/1542
- Ignore selection (and clear target directory) when the selection is for a different backend

# Important Notes
None
2024-10-17 09:40:17 +00:00
Radosław Waśko
d75e20c1d2
Save Database connection as data link, SQL Server data link support (#11343)
- Closes #11294
2024-10-17 09:06:57 +00:00
Adam Obuchowicz
a45e233f03
Table widget: reordering rows and columns (#11271)
Fixes #10759

[Screencast From 2024-10-14 13-51-24.webm](https://github.com/user-attachments/assets/372c6f1b-8281-4bdc-9f46-fa90c3e32764)

# Important Notes
In this task, I also fixed some badly looking spacing after editing vector.
2024-10-17 07:49:01 +00:00
Kaz Wesley
d15a5853a3
syncToCode: Test case for rename binding (#11340)
Add a test case ensuring that the `Ast.syncToCode` algorithm is able to maintain AST identities when a binding and its reference are renamed. This is an important case, as mentioned here: https://github.com/enso-org/enso/issues/11304#issuecomment-2417168559
2024-10-17 07:26:32 +00:00
Sergei Garin
3711b25fa7
Allow updating local assets (#11314)
* Allow updating local assets

* Update shim

* Fix duplicate upload

* Manually invalidate once we upload file

* Fix queryKey

* upd prettier ignore

* revert prettier ignore
2024-10-15 14:32:52 +03: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