Commit Graph

547 Commits

Author SHA1 Message Date
Kaz Wesley
70253e73ed
Render tables in documentation. (#11564)
* Render tables in documentation.

Also:
- Separate parser for our flavor of Markdown from the CodeMirror integration;
  move the parser into ydoc-shared and use for Markdown line-wrapping.
- Introduce our own version of yCollab extension; initially just the upstream
  version translated to Typescript and our code style.
- Refactor CodeEditor.

* CHANGELOG, prettier

* Apply @farmaazon review.

* Fix

* Lint

* Cleanup

* Integration tests for GraphNodeComment

Also a little refactoring in preparation for new implementation.

* Workaround stuck CI

* Revert "Workaround stuck CI"

This reverts commit 74313842ba.

* Fix merge

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-11-20 10:40:24 +00:00
Ilya Bogdanov
d71781f9bd
New node colors (#11578)
* Show halo only on hover

* Fix numeric input widget. (#11561)

* Invert node colors, make edited widgets more prominent

---------

Co-authored-by: Paweł Grabarz <frizi09@gmail.com>

Skipping failing test in GUI packaging.
Nothing changes in Microsoft space.
2024-11-20 10:38:10 +00:00
Ilya Bogdanov
21cbf25067
Edges always end with arrows (#11590)
Bypassing the failing test.
2024-11-20 09:54:20 +00:00
Adam Obuchowicz
af39e0ec50
Pasting image in Documentation Editor (#11547)
Fixes #10059

https://github.com/user-attachments/assets/a528e26a-b388-4a2a-9bf4-3ccc734373f6

# Important Notes
* I put the logic for project's files management to a single composable "projectFiles"
2024-11-19 15:47:46 +00:00
Ilya Bogdanov
c52b8f9455
Disable EditContext API (#11554)
Fixes #11239

https://github.com/user-attachments/assets/eb57fb34-11f4-489b-9849-c93c7aa5e870
2024-11-19 11:36:59 +00:00
Sergei Garin
58512e701e
Show docs on Dashboard (#11391)
Closes: https://github.com/enso-org/cloud-v2/issues/1445

PR is more or less ready for feedback,CR, and QA.

# Read before looking into:

**Known issues:**
- [x] Need to adjust timings for the animations (they're a bit out of sync).
- [x] After the latest rebase, the side panel might expand while clicking on the sidebar toggle.
- [ ] Images no longer display. 🤦
- [x] Need to restore the functionality around spotlighting a component


Demo:

https://github.com/user-attachments/assets/8cec9ec0-4753-482e-8637-f3857b4396a5
2024-11-15 12:12:55 +00:00
Sergei Garin
9dc4e9b090
Redesign versions checker dialog (#11540)
* fix versions checker dialog

* Adress the issues

* Fixes

* Fix integration tests

* fix prettier

* Fix dialog

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-11-15 10:49:30 +03:00
marthasharkey
5b79f6729c
Table viz column header tooltip extended to add data quality stats (#11520) 2024-11-14 10:46:24 +00:00
somebody1234
af0b95b1d9
Animated resizing for dialogs (#11466)
- Cherry-picked out of #10827
- Add `framer-motion` to dialog to animate between dialog sizes.
- Currently visible when switching between types in the Datalink modal.
- Will also be visible when switching between types in the Schedule modal.

# Important Notes
None
2024-11-13 20:12:21 +00:00
Ilya Bogdanov
3d38b7174f
Add Write button to component menu (#11523)
Closes #10486

https://github.com/user-attachments/assets/df492946-0c54-481e-8499-992b3ae9e35d
2024-11-13 19:45:32 +00:00
Ilya Bogdanov
dd95eb2cf5
Reconnect visualizations when switching their types (#11494)
Fixes #11426

Now, visualizations should no longer receive stale data props cached from previous visualizations opened on the same node. We do so by changing the visualization ID (reattaching the visualization).

This does not protect from unhandled exceptions happening inside visualizations, though, so a bigger fix will be provided separately.

https://github.com/user-attachments/assets/821b3c11-818e-403b-812d-b3768399b3a4
2024-11-13 10:56:34 +00:00
Ilya Bogdanov
75733c55aa
Accept input when clicking off the component (#11541)
Closes #11360

https://github.com/user-attachments/assets/f030ddc0-e084-43de-8ed7-fcac21a740a5
2024-11-13 00:38:42 +00:00
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
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
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
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
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
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