* 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>
* 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.
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
- 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
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
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.
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`.
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.
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)
- 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
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.
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.
* 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
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
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.
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.