Implementing most parts of the Documentation Panel in the new GUI.
Known issues:
- Links do not work (yet, covered by #7992)
- Some pages are entirely empty – I’m investigating. Missing doc sections likely cause this, so we probably want to add some placeholder.
- Tags do not look as in design. I tried implementing them correctly but didn't have enough time to finish everything. Some initial implementation is in place, though. I will create a separate task for them.
https://github.com/enso-org/enso/assets/6566674/a656ae78-5d4c-45f4-a0a5-e07fa573253e
[vokoscreenNG-2023-10-23_06-35-31.webm](https://github.com/enso-org/enso/assets/1047859/d8a5ffc5-4677-4264-a246-8def4418505a)
- Implement disconnected edges and edge interactions (#7864).
- Port edge layout from Rust.
- Implement output ports, hover extensions, backward-edge arrows, hover-splitting.
# Important Notes
- A new `currentInteraction` API supports mutually-exclusive interactions; this is used to cancel edge creation when the CB is opened. We can use it more generally to ensure only one major interaction is ongoing at a time.
- Remaining details to reach parity with gui1 edges: #8139
Disables visual tests, because they are occasionally flaky (e.g. the recent issues with lint CI action).
This is very bad as it would cause every PR to (potentially) cause other PRs to fail, if the flaky test is not caught in the CI runs in the offending PR.
# Important Notes
None
- Closes https://github.com/enso-org/cloud-v2/issues/721
- Drag-n-drop for adding labels to an asset
- Adds to a single asset when hovering over an asset that is not selected
- Adds to all selected assets when hovering over an asset that is selected
### Important Notes
- The backend endpoint for associating labels with assets is currently broken - specifically, it errors when the new list of assets is empty.
- Closes#8062
# Important Notes
- This PR uses a completely separate implementation from the regexes used for the existing filtering. AFAICT, this is unavoidable, since this needs to retrieve matched text.
- I've come across a couple minor bugs related to the Component Browser:
- When deleting text (backspacing), the full list of unfiltered entries momentarily reappear because the filtering is reset.
- Things like `h.m` match `HTTP_Method` - if this is not intentional, it seems like it might be more difficult to fix, unfortunately.
- Note that highlighting (I assume correctly?) *does not* highlight any part of `HTTP_Method`.
- Validate spans during existing lexer and parser unit tests, and in `enso_parser_debug`.
- Fix lost span info causing failures of updated tests.
# Important Notes
- [x] Output of `parse_all_enso_files.sh` is unchanged since before #7881 (modulo libs changes since then).
- When the parser encounters an input with the first line indented, it now creates a sub-block for lines at than indent level, and emits a syntax error (every indented block must have a parent).
- When the parser encounters a number with a base but no digits (e.g. `0x`), it now emits a `Number` with `None` in the digits field rather than a 0-length digits token.
Implements #8025: `LazyObject` now has a `visitChildren` method that observes each direct-child `LazyObject`. `childrenAstNodes` is now a simple function that flattens non-Tree nodes out of the hierarchy; `validateSpans` visits both `Tree`s and `Token`s the same way we would use the `ItemVisitor` Rust API.
- Fixes issue with `to_display_text` on `Date_Time`. Now a reversible format.
- Adjusted the auto width code on table so it works.
- Manually sized columns should remain fixed size.
- Enable Excel range style selection in table.
- Removed page support as not implemented yet.
# Important Notes
Will need to apply to Vue based viz at some point as well.
- Closes https://github.com/enso-org/cloud-v2/issues/722
- Completely disables remote logging
# Important Notes
This is a temporary fix - GUI2 should have remote logging, but it may need a reimplemented entrypoint anyway.
A recent PR introduced issues with circular imports in `categorySwitcher.ts` - the reason why this wasn't found before merge is because bundlers work fine with circular imports - it's just GUI2's dev mode that doesn't do well with them
# Important Notes
None
- Closes https://github.com/enso-org/cloud-v2/issues/676
- Adds labels to the dashboard:
- Filtering assets by label
- Creating new labels
- Displaying labels in "Labels" column
- Adding a new label to an existing asset (multi-select)
# Important Notes
WIP: Use a color picker with pre-defined colors, instead of randomly generated colors
- Change imports from `'./'` relative imports to `@/` or `shared/` whenever possible
- Imports in `shared/` and `ydoc-server` have been avoided for now in case they don't work with `@/` imports.
- Deduplicate `events.ts`, remove `useDocumentEvent` in favor of `useEvent(document,` (and same for `useDocumentEventConditional`
- Replace incorrect doc comments (`//*` and `///`) with correct doc comments (`/**`)
# Important Notes
None
- Closes#8041
- Integrates parser with CodeMirror
- Adds extensions builtin to CodeMirror
- Highlight text matching the selection
- Adds PoC CodeMirror extensions
- Basic syntax highlighting
- Code folding
- Hover tooltips
# Important Notes
As there is currently no way to get the corresponding node based on a position, the hover tooltip currently iterates through every node in `graphSotre.nodes`. This is potentially VERY SLOW and should be changed eventually, or disabled completely until an efficient implementation is possible.
SuggestionDb refactoring to facilitate documentation panel development and other features.
Now SuggestionDb uses `ReactiveDb` + `ReactiveIndex`es under the hood. There are no visual changes to the IDE. Everything still works the same.
You can now use two reactive indexes built on top of the SuggestionDb:
1. `db.nameToId` is a `QualifiedName→SuggestionId` relation. Reverse lookup allows you to get the qualified name by ID.
2. `db.parent` is a `SuggestionId→SuggestionId` relation, representing parent-children relations between entries. The rules are the following:
- If the `memberOf` field is present, it is used as a parent.
- Otherwise, a parent’s qualified name is used (through the `qnParent` function)
You can use reverse lookup to get the children of the entry.
You can easily add your own indexes if needed.
- Closes https://github.com/enso-org/cloud-v2/issues/697
- Adds infrastructure to support drag-and-drop
- Implements drag-and-drop for deleting and undeleting assets
- Implements drag-and-drop for moving assets to a new directory (or the root directory)
- Also implements "cut" and "paste" context menu actions (and keyboard shortcuts) using the new endpoint for moving files
- "Copy" and "duplicate" actions are *not* implemented, as I don't think there are backend endpoints for those yet.
- Fades items out when cutting (Cmd+X), fades them back in when cancelling (Esc)
- Fixes bug where keyboard shortcut handlers were not registered for table-wide shortcuts (delete all, restore all, cut all)
# Important Notes
Drag-and-drop for more situations are planned but intentionally not yet implemented:
- Labels (backend is WIP, and blocked on the corresponding frontend PR)
- Moving assets between folders (backend functionality does not yet exist)
- Closes#8015
- Note that the (few) fallback icons are still present, as most CB entries are still missing icons. *However*, now the `iconName` from the libraries take priority over the fallback icon names.
- Also fixes a minor regression, where nodes pending execution were no longer faded out. This was introduced in #7988 because the wrong CSS variable was set.
# Important Notes
None
Fixes#7784
Instead of some heuristic, we now parse the CB's input and get the pattern and qualified name. Also we keep the "context" structure which may be used to apply suggestions properly.
# Important Notes
I created several helpers for AST. One of them is very hacky: we traverse AST tree by reading all getters in JS. Instead, we could generate it basing on schema.
- Removed `Cursor` and moved all accessors to standalone functions, reducing the generated code size significantly (especially after minification).
- Removed unnecessary `seek`s from everywhere. Now the offseting is part of each `read` implementation.
- Removed unnecessary differences between `read`s on abstract and concrete types. Now abstract types do the pointer access internally in their `read`.
- Closes#7925
# Important Notes
The type -> matching visualization lookup is populated using a `Promise`, so there is a race condition where the selector will incorrectly show the full list of visualizations if it is opened before the `Promise` resolves.
Generate TS bindings and lazy deserialization for the parser types.
# Important Notes
- The new API is imported into `ffi.ts`, but not yet used.
- I have tested the generated code in isolation, but cannot commit tests as we are not currently able to load WASM modules when running in `vitest`.
- Implements https://github.com/enso-org/cloud-v2/issues/631
- Tests for dashboard (`app/ide-desktop/lib/dashboard/`):
- End-to-end tests
- Unit tests
- Component tests
The purpose of this PR is to introduce the testing framework - more tests can be added later in separate PRs.
# Important Notes
To test, run `npm run test` in `app/ide-desktop`, or `app/ide-desktop/lib/dashboard/`. All tests should pass.
Individual test types can be run using `npm run test-unit`, `npm run test-component` and `npm run test-e2e` in `app/ide-desktop/lib/dashboard/`.
Individual end-to-end tests can be run using `npx playwright test -c playwright-e2e.config.ts test-e2e/<file name>.spec.ts` in `app/ide-desktop/lib/dashboard/`.
End-to-end tests require internet access to pass (for things like fonts).
This PR *does* check in screenshots to guard against visual regessions (and/or to make visual changes obvious)
- Implements frontend component of https://github.com/enso-org/cloud-v2/issues/702
- Ensures that the new name is not already present in a sibling in the directory
- Only compares between directories when renaming a directory
- Only compares between files/projects/connectors when renaming one of those
# Important Notes
- This has not been implemented for connectors and files as currently there is no backend endpoint to rename those.
- Secrets are also not implemented yet, AFAIK, so there is no behavior related to secrets.
Fixes this issue:
- #7917
This is caused by the dashboard expecting `engineVersion` to be present, whereas it is actually optional.
# Important Notes
This may have been fixed on the Project Manager side, so the bug may not be reproducible. To properly test that this fix works, an older `project-manager` (e.g `2023.2.1-nightly.2023.9.30`) should be used.
- Depends on #7773.
- Implements binary WebSocket protocol (data protocol)
- Performs some editor initialization (the bare minimum so that visualizations work)
- Adds event handlers to receive visualization data updates
# Important Notes
None
Closes#6417
Creating and editing nodes with a component browser does not edit the node in place but creates a temporary AST node with the execution context switch. When the node is committed, the original AST is replaced by the new one, and the temporary node is removed.
This solves several issues:
1. Previewing suggestions or editing nodes should no longer produce unwanted side effects, as the edited node expression is always evaluated with the output context being disabled.
2. Errors no longer propagate down the graph when you edit the node. The edited node has no outputs connected. Inputs behave normally, though.
3. Undo-redo and editing abort is much simpler. To abort editing, remove the temporary node.
https://github.com/enso-org/enso/assets/6566674/8d38e6bc-a4de-4e69-8d48-52d9b45b6554
# Important Notes
The code is a bit awkward in a few places. This is the consequence of previous architecture.
Fixes#7474
Again, a quite complicated issue. The code editor was broken by https://github.com/enso-org/enso/pull/7167 for a few reasons:
1. The text component's shortcuts depend on the `focused` FRP endpoint, which is controlled by `deprecated_(de)focus` inputs. `focused` output was not changed by the code editor `model.focus()` call. (we still use `deprecated_focus` for all other components)
2. `focus()` FRP input was added to the text component but never triggered. It's too easy to confuse it with the `focus()` method of the `object::Instance` (Deref is evil!)
3. The graph editor handles clicks on the background by `blur_tree()`, effectively blurring any focused element in the application. But clicking on code editor (to focus it) also causes a click on the background! So we focus the code editor, and then handle the background click, defocusing it from the graph editor's point of view. It allows graph editor to open CB on <kbd>Enter</kbd> while the code editor is still active.
I solved (3) by disallowing CB opening while code editor is visible. Not ideal, but I guess it solves the issue.
Do you think the other solution is possible – to add some overlay for the code editor and avoid triggering `blur_tree` when clicking on it? That won't work because you still can't defocus the code editor using the new API, so it will always be focused.
So we have a situation when half of the app uses the new focus system, another half uses the old one, and none works properly.
https://github.com/enso-org/enso/assets/6566674/3a0d36ed-4d50-4606-9486-272fbd5d9cb7
Closes#7823
We set fallback color for components without an assigned group, use a color defined in the group, or otherwise derive the color from the group name.
All group colors are available in the graph editor as CSS variables so that they can be dynamically edited and debugged via dev tools.
For deriving the color, we use [murmurhash](https://www.npmjs.com/package/murmurhash), which quickly produces sufficiently uniformly distributed 32-bit values and [oklch](https://evilmartians.com/chronicles/oklch-in-css-why-quit-rgb-hsl) colorspace. We will still have *some* hash collisions between different groups, but it shouldn't matter that much. I have also tried a few other hashes (namely `cybr53` and Java's string hashing), and the results were more or less similar.
`oklch` is rather a new thing in CSS, but it is available starting with Chrome 111, which is exactly the version we're using in Electron.
https://github.com/enso-org/enso/assets/6566674/7177f041-93e9-4536-b19f-6b67a2da8b7e
This PR adds support for the new Vue-based GUI (aka `gui2`).
The user-facing changes are primarily:
* support for `./run gui2` and `./run ide2` commands (that build just the new GUI and the whole IDE package with new GUI embedded — respectively);
* the top-level `test` and `lint` commands will now invoke the relevant commands on the new GUI
---------
Co-authored-by: Paweł Grabarz <frizi09@gmail.com>
PR adds initialization of suggestion db from the language sever (instead of fetching some mock). Also support for applying updates.
---------
Co-authored-by: Paweł Grabarz <frizi09@gmail.com>
Added bidirectional synchronization of module edits with language server. All document edits made by any of the Yjs peers are sent to language server to apply to the file. Any local file changes cause reload, which is synchronized back to Yjs by finding a diff.
- Closes#7874
- Chosen solution: Use the dashboard's shortcut manager to register keybinds and match mouse shortcuts
- Switch existing shortcuts to shortcut manager as well
- Switch visualizations to use the shortcut manager too
- Closes#7865
- Implements all shortcuts for node selection, *except* the arrow key shortcut
- Adds circle cursor selection brush
- The fade out from inactivity (which is present in the Rust source code) is currently missing
Other changes:
- Change everything to use `pointerdown` as appropriate, to ensure the event handlers are called in the right order
# Important Notes
The arrow key shortcut to navigate to the nearest node in that direction *has not* been implemented.
This may need discussion on how it should work
The implementation in general is pretty inefficient - this is intentional, performance can be optimized in the future
- Fixes display of the assets table in Firefox. Before this fix, the table header grows instead of the table footer.
It seems like the correct behavior for tables is to [not be valid flex children](https://stackoverflow.com/a/41421700/3323231), so the correct fix is to add a `flex` wrapper div.
- Fixes missing error toast notification when `startup.project` is invalid
- Fixes#7589
- Enter (incorrectly) causes projects to be opened when the name is being edited
- Gracefully fail when `projectState` is missing from an asset
- Avoid opening editor for previously opened project, when `startup.project` is provided
- Fixes https://github.com/enso-org/cloud-v2/issues/688
- Fixes CSS for search bar
- Fixes https://github.com/enso-org/cloud-v2/issues/689
- Adds "New <X>" entries back to context menus for regular assets
- Fixes https://github.com/enso-org/cloud-v2/issues/692
- Fix `z-index` of top left (page switcher) icons
- Fixes https://github.com/enso-org/cloud-v2/issues/693
- Fix restoring local projects after closing and reopening
- Adds blur to top right menu bars for extra visibility
# Important Notes
Testing should test Firefox and Chrome (testing on Safari is optional) to make sure the following is working correctly:
- The table looks normal
- The context menu still triggers below the table (both with and without items being selected)
- There is no scrollbar if the table is shorter than the viewport
close#7750close#7834
Changelog:
- update: project manager uses the packaged language server to open projects
- fix: remove stack traces from connection errors on initial ping handler request (when the language server is booting)
- update: add engine and edition versions to the `initProtocolConnection` response for easier debug
- update: do not resolve project ensoVersion in the `project/list` to eliminate unnecessary network calls
Because several tasks require execution context, this is a fast PR making one.
# Important Notes
* Changes in languageServer.ts and languageServerTypes.ts were directly ported from #7873
* We display warning about missing namespace, because the dashboard does not provide us any. Needs to be fixed at some point.
- Closes https://github.com/enso-org/cloud-v2/issues/617
- Trash category
- Do not open "confirm delete" modal when on remote (cloud) backend
- Permanent deletion has been superseded by the trash category
- Save current category to `localStorage`
- Also implements "Recent" category. Differences to Home category:
- Hides sort indicators
- Disables sorting
Other fixes:
- Allow overriding cloud environment through environment variable
- Prevent triggering rename on click when multiple items are selected
- Remove "move to trash" context menu option when user is not owner
# Important Notes
- This registers the "Ctrl + R" (Cmd + R) shortcut for restoring an item from trash. This is the same shortcut used for renaming, however I think it is fine because items in trash cannot be renamed.
(As usual though, this is very simple to remove/change so it's not a big deal to remove/change it.)
- The "Recent" category lacks backend support - so it falls back to the default category, as the deserialization of unknown values falls back to the default category.
- Fixes https://github.com/enso-org/cloud-v2/issues/690
- Fixes password validation never becoming successful after failing once
Other changes:
- Add autocomplete attributes (Chrome said I should so 🤷)
# Important Notes
None
My first attempts to work with the `gui2` codebase. When looking at the IDE, I noticed that the top bar seems slightly off. I checked and confirmed that the sizes (heights) of some elements were not matching Figma.
Also, I tried using the `M PLUS 1` font, and it has a _completely_ different baseline than our previous one, effectively shifting all text down. I think we need to start using it as soon as possible, or else we will fix CSS rules everywhere.
I understand that the way I added the font is not the correct one, but I guess we can live with that until we properly include the files to the package.
Please forgive me, gods of Vue.js, @Frizi and @somebody1234, for this murder.
Before:
<img width="405" alt="Screenshot 2023-09-13 at 12 19 18 AM" src="https://github.com/enso-org/enso/assets/6566674/8ca81db8-1719-4761-97a1-741c2f76b45d">
After:
<img width="480" alt="Screenshot 2023-09-19 at 8 01 18 PM" src="https://github.com/enso-org/enso/assets/6566674/eb9783d3-0a34-4f1e-8afd-2f06a1b6db4f">
Dropdown animation:
https://github.com/enso-org/enso/assets/6566674/bab6baa9-23e3-4c2d-8494-1d464ba6902b
- Closes#7733
- Add infrastructure for defining custom visualizations
- Add all visualizations
# Important Notes
⚠️ Changes made:
- "Fit all" has been changed to always animate - this is because behavior was previously inconsistent:
- the scatterplot would always animate on "Fit all", but
- the histogram would never animate on "Fit all"
# Important Notes
- Binary LS endpoint is not yet handled.
- The parsing of provided source is not entirely correct, as each line (including imports) is treated as node. The usage of actual enso AST for nodes is not yet implemented.
- Modifications to the graph state are not yet synchronized back to the language server.
Fixes#7737
Added structures representing Suggestion Database entries. Currently, the db is loaded from a snapshot from the old GUI.
Added an input to CB and use it to filter components. The interpretation is simple: the input is split by the last dot, and the left part is considered a qualified name, and the right part is a function name written by the user so far. I rewrote the filtering algorithm designed by @jdunkerley, changing it a bit, so we support qualified names instead of just a type name.
https://github.com/enso-org/enso/assets/3919101/76a957f6-e53f-49ad-996c-398cd7112fc6
# Important Notes
* The component list is now sorted from "first to select" to "least interesting". The panel itself cares about putting the first on the bottom.
* The suggestion db snapshot is very big, so it's instead loaded from external server.
- Fixes#7799
The PR that introduced this bug stopped event propagation in certain cases, in order to fix another issue.
This PR introduces a way to run an event handler, but indicate failure so further handlers (if any) are run, otherwise the event will be propagated all the way to the document root.
# Important Notes
None
Add support for recovering from GL context loss. When the context is restored, the loading spinner is shown until shaders finish recompiling.
[vokoscreenNG-2023-08-25_09-39-11.webm](https://github.com/enso-org/enso/assets/1047859/cfa90ec5-72a1-41e6-bafa-177fa5e85fb2)
*While the context is missing, the loading spinner is rendered in the 0% state. (This condition will not normally be observed, except momentarily, as the browser should restore the context immediately if it is lost while the page is visible.) When we receive a new context, the spinner switches to the 90% state until restoration completes. Restoration is fast, as we don't need to do much work except recompiling shaders.*
# Important Notes
- A new debug hotkey, Ctrl+Alt+Shift+X, causes context loss for testing. Pressing it a second time causes context restoration.
- `Texture` is still a CPU-bound texture. It now uses the "immutable" `texStorage/texSubImage` API, which is a ["preferred alternative"](https://registry.khronos.org/webgl/specs/latest/2.0/#3.7.6) to the `texImage` API because it can be more efficient.
- The type for texture uniforms is now `Uniform<Option<Texture>>`. Texture uniforms are decoupled from the context.
- A new `ContextLost` error type can be returned by functions that cannot complete if the context is lost.
- Fix some crashes that could occur when context was lost.
- Clarify ownership of some rendering-related types: Externalize, and where possible eliminate, `Rc/RefCell`s.
Adds widgets:
- Checkbox (with sorting)
- Numeric slider
- Dropdown (accepting a list of strings)
- Closes#7731
- Placeholder (underscore - has no actions)
# Important Notes
The widgets are currently added to every node, but are not synced with the yjs representation. This is intentional, as (afaict) the format for the AST representation is not yet finalized.
There are a number of design differences, for practical reasons:
- The dropdown now has a scrollbar.
- As a side effect, the sort button needed to be moved left, to avoid overlapping with the scrollbar.
- Note that it is *not* centered in the 8px horizontal padding. It is 4px wide, and has 1px left and 3px right padding: `.||||...`. (Note that the 8px horizontal padding from the design is retained.
- 4px of vertical padding has been inserted, so that there is *some* padding between the bubble for the selected item, and the outer dropdown container, when the first item is selected. Note that this is different to the 8px
- 16px of right margin has been inserted after every item. This is the same amount of padding that is added by the bubble. This means that the dropdown does not change in width when a long item is selected.
Design issues:
- The sort button for the dropdown overlaps the text
Updated the Component Browser stub from @Frizi's branch. Filled with some mocked data and implemented highlight and navigation.
https://github.com/enso-org/enso/assets/3919101/6af57413-bcb6-4402-9a4a-a992d58504ba
# Important Notes
Still missing the input panel, and obviously, the integration with anything will be a part of another task.
- Closes#7730. Adds top bar containing:
- Project title
- Execution mode selector (design/live)
- Navbar containing:
- Navigation previous/next button
- Breadcrumbs
# Important Notes
Icons are currently all separate files. This may need to be changed to a single svg containing individual icons in `defs` if(/when) that is merged into `develop`.
- Renames "Move To Trash" to "Delete" on local backend
- This is because the local backend does not have a trash category (or categories at all)
- Fix search bar autofocus
- The "delete" hotkey was focusing the search bar - this was because the shortcuts handler, and the autofocus handler, were both registered on the same `EventTarget`. The fix is to do `stopImmediatePropagation()` to stop running any other event handler, even ones on the same `EventTarget`.
# Important Notes
None
- Fixes https://github.com/enso-org/cloud-v2/issues/659
`getProjectDetails` was calling `listVersions` to get a fallback IDE version, creating a lot of unnecessary requests to the backend, *especially* because `getProjectDetails` is called periodically when a project is opening.
In this PR, the implementation has been changed to cache the fallback version for one day, meaning the extra `listVersions` calls should now only ever happen once per client per day.
# Important Notes
None
- Closes https://github.com/enso-org/cloud-v2/issues/619
- Async execution controls
# Important Notes
There is no design for this, as such, implementation details use placeholder designs.
- The context menu uses a play icon. An icon similar in style to the "copy" icon *may* work to represent "run in background", but it may be difficult to visually represent that it is being run in the background, without obstructing it with a foreground window
- The icon for projects being run in the background have a green tint, to distinguish them from projects that will be (or are currently) opened in the editor.
- this will ***almost certainly*** need to be replaced with a proper design
- This *may* also make sense for the local backend, *however* as I don't know whether there is a way to access the completion progress of execution from the PM API, local backend support is currently *not* implemented in this PR.
- On a related note: as far as I am aware, there is also no such endpoint for the cloud backend. However, support for async execution was recently added, so I am adding the basic functionality corresponding to the `executeAsync` project state.
- Whether a project is being run in the background is currently lost on refresh. This is because the async execution state is currently not sent by the backend.
- Placeholder shortcuts have been added (Shift+Enter - Cmd+Enter is already taken by the "share" action, and shift+double click). These are totally optional, and can easily be removed.
Closes: #7309
The changed origin of the visualization container caused the issue. Now, the origin is at the top left corner of the visualization, and bounding box abstraction expects the origin at the bottom left. Despite the comments in the code, the bounding box is designed to work with bottom-left origin only.
https://github.com/enso-org/enso/assets/6566674/273abfaa-45b6-4374-8d4c-3b8c4e2c1fc2
Again I hit the problem with shader compilation failing with no apparent reason, and again bumping electron version helped me.
# Important Notes
I bumped to latest `25.x` version as I haven't dared to change major version expecting breaking changes.
Fixes#7468
The fix is pretty simple: we reuse the existing functionality for importing stuff and generating expressions. It fixes issues with `Nothing` or `Report_Unmatched` types.
https://github.com/enso-org/enso/assets/6566674/4e7addf9-2175-4f2a-a571-4ef823de5cb0
While debugging, I found it easier to work with a suggestion database when exported to some external format. Hence, I implemented serde serialization support for database entries and also a new debug shortcut <kbd>ctrl</kbd>+<kbd>shift</kbd>+<kbd>u</kbd> to dump all entries to the console.
- Closes https://github.com/enso-org/cloud-v2/issues/580
- Adds home screen
Other changes:
- Typing in the search bar from the home page, switches to the drive page. This is easy to change/remove, of course
# Important Notes
There are minor differences from the design:
- The Enso logo has opacity 0.6 to match the text color, rather than 0.665
- The list of samples is different
- The border-radius on the "create empty project" tile was changed from 18px to 16px, to match every other border-radius (especially the ones on the tiles for the other samples)
Implementation notes:
- The "new project" circled plus icon has a different color to the primary text color as well, but that has been left as-is
- The sample descriptions have a backdrop-blur, but the background image no longer extends underneath it
- There are currently no inset shadows for the home screen, but it will be easy to copy them from the old implementation from the old templates list
- "Read what's new in Enso 3.0 Beta" currently links to https://enso.org/, rather than a blog post (which does not yet exist)
- The new template backgrounds have been replaced with SVGs. The Excel one uses the Excel logo from Wikipedia; the new geospatial analysis one was converted to SVG via auto-tracing.
There are also several placeholders:
- Sample author icon
- Sample author
- Sample open count
- Sample like ount
Closes#6261
- Adds support for copy-pasting nodes with `cmd + C` and `cmd + V` shortcuts.
- Only a single, currently selected node will be copied. Adding support for multiple node copies seems easy, though (but was out of the scope of the task).
- We use a custom data format for clipboard content. Node's metadata is also copied, so opened visualizations are preserved. However, the visualization's size is not preserved, as we do not store this info in metadata.
- For custom format to work, we use a pretty new feature called [Clipboard pickling](https://github.com/w3c/editing/blob/gh-pages/docs/clipboard-pickling/explainer.md), but it is available in Electron and in most browsers already.
- Pasting plain text from other applications (or from Enso, if the code is copied in edit mode) is supported and is currently enabled. There are some security concerns related to this, though. I will create a separate issue/discussion for that.
- Undo/redo works as you expect.
- New node is pasted at the cursor position.
https://github.com/enso-org/enso/assets/6566674/7a04d941-19f7-4a39-9bce-0e554af50ba3
If the user does not have sufficient permissions to open the project, the project no longer shows the play button. However, this does not work on the local backend because the local backend lacks permissions completely.
# Important Notes
None
Fixes context menu options incorrectly being hidden due to incorrect logic when determining whether someone else is opening a project
# Important Notes
None
Fixes the project icon for new projects being disabled, because `opened_by` is missing, making the frontend think the current user was not the one that opened the project.
# Important Notes
None
- Closes#7463
- Makes table header sticky
- Clips table body so it does not overlap table header
Other changes:
- Clip table header row so it does not overlap extra columns selector
- Hide extra columns selector on local backend (PM backend)
- Focus search bar if the keypress will type regular text
- Change row height from 40px to 32px
- Add "Share" button when the editor is open
- Make entire area of backend selector (Cloud <-> Local) clickable (previously, the padding was not clickable)
- Remove the up-arrow icon to open a project. Projects are now opened by switching to the project tab using the tab selector on the top left (or by double clicking the row).
- Fix opening newly created folder (previously its entries were appended to the end, rather than under the folder)
- Indent background of "name" column (the first column)
- Minor code style changes
- Add background back to "change password" modal (oops)
- Hide "open" context menu entry and show "stop" entry, when a project is currently running
- ℹ️ It might be a good idea to support the "open" action on directories as well, however it is difficult without the assets table refactor in #7540. As such, this functionality will not be added in this PR.
- Fix horizontal padding on "sign in" user menu entry
- Hide email/password validation when using oauth logins
More fixes for assets list:
- Project is inserted at start of list when there are no existing projects
- Project is inserted at start of children when there are no existing children
- Deleting a folder collapses it (hides its descendants)
- Adding children to a newly created folder puts them at the correct depth, rather than depth 1
# Important Notes
None
- Closes https://github.com/enso-org/cloud-v2/issues/568
- Disable project with an `openedBy` that is not the current user
Fixes other issues:
- Fixes freshly restored saved projects not being unset when clicking stop before the editor first opens
- Changes "unable to" in errors to "could not", for consistency
- Users with insufficient permissions now see a network (node graph) icon instead of a play button:
![image](https://github.com/enso-org/enso/assets/4046547/0464ae66-4da7-4374-a4aa-80dd74fa1dc0)
# Important Notes
None
Extracted from #7660.
Fixes the bug that happens when you do:
- Open the app with a saved "last opened project"
- The app will immediately restore the project
- Close the project
- Reopen/reload the app
- The same project will start opening again.
- Expected behavior: The project does not start, because it was previously manually closed.
# Important Notes
None
- Closes https://github.com/enso-org/cloud-v2/issues/647
- Add handling for `Provisioned` project state to frontend
- Also fixes bug causing cloud project loading message to not disappear (oops...)
# Important Notes
- sometimes the editor opens fine, but the websocket times out
- when checking requests, I don't see a request that returns `Provisioned`, so I can't be 100% sure that the handling for the `Provisioned` state actually works
Fix issues restoring cloud projects that have been closed.
On current develop, the frontend assumes cloud projects are still open from the last time they were open. If this is not the case, it tries to open WebSocket endpoints that no longer exist
# Important Notes
For a relatively easy way to test:
- Run `Enso.dmg` or `./ide run watch`
- Open a cloud project
- Refresh Electron to make sure restoration is working
- Go to `localhost:8080`
- Close the project
- Refresh Electron to make sure startup + restoration is working
Should also test restoring local projects to make sure that didn't break.
I was unable to properly test cloud projects (the one I tested with opened, but was blank with just the IDE background and no cursor and no nodes, for some reason)
- Closes#6730
- Changes config to allow environment variables to override server host and port
- Adds port scanning to Electron app to ensure the PM is started at a free port
# Important Notes
- `SERVER_PORT=abcd enso.AppImage` does NOT work. It would not be difficult to implement, but it probably needs discussion on how exactly it should be implemented - for example, `SERVER_PORT` is quite a generic name, should the Electron app pass though something like `ENSO_PM_SERVER_PORT` to the PM as `SERVER_PORT` instead?
⚠️ Port scanning is *only* implemented in the JS frontend. It is not implemented:
- In Scala, because the JS/Rust code calling it needs to know the port as well. There shouldn't be any problems with adding port scanning though, if that's desired
- In Rust, because I'm not sure parsing the host and port from a string is a good idea.
- (This also applies to JS, but it *must* work in JS, and port scanning is already a dependency there so it's quite a bit easier)
- QA *will* need a new PM (`sbt buildProjectManagerDistribution` or `./run backend sbt` -> `buildProjectManagerDistribution`), and the path must be supplied as: `-engine.project-manager-path=path/to/new/pm/here`
- Fixes#7603
- "Move All To Trash" option sometimes appears even when the list is empty
# Important Notes
This appears to be caused by multiple things:
- deleting a single item does not remove it from the set of selected keys
- waiting for `project/close` to make sure a project can be `project/delete`d, takes a while.
Both issues have been fixed, by adding a new `AssetListEvent` to let the assets table to immediately remove the asset's key (its id or placeholder id) from the set of selected keys
This commit introduces a new cursor shape, a double arrow, to be displayed during the hover over the resize grip in the graph editor's visualization component. The rotation of the double arrow depends on whether the cursor is to the left or right of the dividing line from the top left to bottom-right corner of the grip. This gives a more intuitive visual cue to users about the direction of resizing.
![Peek 2023-08-23 13-57](https://github.com/enso-org/enso/assets/1428930/d0f19205-85f3-4046-b3ef-7540030c9ab5)
close#7604
After moving the rename action to the dashboard, IDE is unaware of the new project name. PR implements a new `refactoring/projectRenamed` notification that is sent from the server to clients and informs them about the changed project name.
# Important Notes
https://github.com/enso-org/enso/assets/357683/7c62726d-217e-4e69-8e48-568e0b7b8c34
- Closes https://github.com/enso-org/cloud-v2/issues/610
- New user menu
- Remove "go to profile" action that does not currently have an action, and does not exist in new design
- Add placeholder icons for existing actions
- Re-style "change password" modal to fit in with the design
# Important Notes
There are many differences from the design - none are visual differences though:
- The list of actions is completely different - there are no menu entries in common between the design and the current
- This also means that *all* current icons are placeholders. There are no appropriate icons in the "icons" Figma tab either.
- The user icon is still a placeholder, as there is no backend support for user icons yet.
- The user menu entries are highlighted on hover (not specified in the design), but to make this look nice, some of the padding has been moved from the outer container to the individual menu entries.
- The menu entries use the same component as the context menu, so they *do* support shortcuts, and adding shortcuts to them will be very easy, *however* no shortcuts have been set for the new actions, because they are different from the actions in the Figma design (and so they don't have an official default shortcut)
- Closes https://github.com/enso-org/cloud-v2/issues/511
- Adds sorting. Currently supported columns: "Name" and "Last Modified"
# Important Notes
The sort arrows have a slightly thicker border (changed from 2px to 2.14px), to remove the (very small) internal hole in the Figma design. It is possible to make the shape more accurate to the original design by using a polygon (or a path) that traces around the original outline instead, but I figured it's not worth spending the extra time on a fix that may not be correct.
ℹ️ The comparison function for sorting is quite complicated. I think this is the least intrusive change for now, but it is worth considering changing `AssetsTable` to store items internally as a tree instead, and do a preorder traversal to flatten it into an array when needed.
- Closes https://github.com/enso-org/cloud-v2/issues/615
- Add category switcher
# Important Notes
None of the buttons currently do anything. This is intentional, as the corresponding backend functionality does not yet exist.
- Closes#7576
- Stop using icons for non-macOS platforms, because it is non-standard to use icons
- Increase width otherwise entries will line wrap
# Important Notes
None
- Closes#7536
- Top bar is now below fullscreen visualizations
Other changes:
- Fully hides mouse cursor in editor view
# Important Notes
There should be basically no logic changes - check the code to be extra sure.
The main things that should be tested are:
- cursor should be hidden on top bar in the editor, and visible when not in the editor
- cursor should be visible in the "change password" modal
Use the new Enso Font; also change the anti-aliasing logic to be based on device pixel ratio, rather than platform. This will improve the clarity of font rendering on Windows/Linux machines with high pixel densities.
Design reference:
![image](https://github.com/enso-org/enso/assets/1047859/934ec9ac-52c3-4a81-a9f9-143378ecb658)
Tested on various combinations of DPR/platform:
OS X, `devicePixelRatio` = 2 (should look similar to how we were already rendering *mplus1* on OS X):
<img width="1440" alt="Screenshot 2023-08-07 at 5 46 11 PM" src="https://github.com/enso-org/enso/assets/1047859/2fdf251a-ba5e-426f-b6c4-194347a9cee4">
Windows, `devicePixelRatio` = 1.25 (should look similar to how we were already rendering *mplus1* on this platform/DPR):
![image](https://github.com/enso-org/enso/assets/1047859/55c4a129-4fff-4a9b-8e55-51a5d206e659)
Linux, `devicePixelRatio` = 1 (should look similar to how we were already rendering *mplus1* on this platform/DPR):
![image](https://github.com/enso-org/enso/assets/1047859/c5ac61f0-e3c5-43ca-8ee7-e1e04e84d35e)
# Important Notes
Style changes:
- Use the Enso Font for code in Rust, replacing the DejaVu fonts.
- Use the Enso Font in HTML: code in documentation, and error visualizations.
- Change SpanWidgets from Bold to Extra Bold, to match the design.
Implementation improvements:
- The new font download is cached (and Github-authenticated); this should eliminate a "rate limit" build failure I've
encountered in the past.
- Clean up DocSection HTML rendering a bit.
- Remove a CSS file that seems to have been superseded.
- Closes#7498
- Validation regex previously disallowed non-ASCII characters, now fixed
- Changes every password input to use the correct regex. For old/new passwords, it uses the regular input. For password confirmations, it uses the new password, converted to a regex. This makes it so that the password confirmation input's validation only succeeds when it exactly matches the new password.
# Important Notes
None
* Support arguments list in the doc parser
* Support new doc sections in documentation panel
* Remove headers
* Remove outer dom and place breadcrumbs
* Fix methods icon
* Use unordered list class in css
* Improve tags styles
* Remove virtual component groups docs
* Cleanup top-level css styles
* Small adjustments to headers
* Add styles for emphasized text
* Add bold font for arguments
* Self-review
* Remove redundant placeholder struct.
* Update outdated doc.
* Avoid allocation when comparing strings.
* Avoid empty paragraph.
* Reduce allocations.
* Update test to remove empty paragraph.
* Fix rebase issues.
* Improve padding and size handling in UI themes
Added padding_x and padding_y to hardcoded theme's breadcrumb settings to ensure consistent padding. Also, these padding settings and breadcrumb_height are now used directly in the Style structure, eliminating hardcoded values in the view documentation.
* Adjusted breadcrumb background dimensions calculation.
* Add support for improper arguments formatting in documenation comments
* Do not include Icon tag into the docs
* Fix documentation panel resizing
* enso-formatter
---------
Co-authored-by: Michael Mauderer <michael.mauderer@enso.org>
Fixes#7423
Refactored widget matching algorithm to allow creating wrapper widgets even in cases where the widget config override is present. That allowed the widgets to be reordered, such that the argument name ends up being inside the dropdown widget. That way clicking it opens the dropdown.
Added explicit manual layout for the dropdown arrow position. Now it is positioned on the center of a selected appropriate child widget. For prefix chains, the leftmost part of the prefix application (the method or constructor) is selected.
https://github.com/enso-org/enso/assets/919491/86678b9d-c04e-4545-8d11-2d1e85b9b951
Fix for `showLogs` when opening a second cloud project. Alternative to #7568.
This one avoids loading the cloud's `index.js.gz`, unless it is in the cloud - and in the cloud, it only loads the first `index.js.gz`.
1. When opening CB with source node, the type name is skipped and only method names are displayed. Fixes#7471
2. When entered Main module of some library, the module names are no longer displayed with their full qualified name.
![image](https://github.com/enso-org/enso/assets/3919101/2d1fe4ad-6391-41d6-89a1-410492457b57)
# Important Notes
Refactoring: I changed the internal representation of `ImString` to `Rc<str>` instead of `Rc<String>` to reduce the number of allocations and memory jumps. I even tried to remove `ImString` altogether, but it was not easy, and the main problem was lacking Default implementation.
This was meant to be a trivial change, but actually a dirty workaround needed to be applied. Because enter is used to both open searcher and accept input/entry, both actions were fired at once. I fixed it by debouncing opening searcher event (so the searcher will be opened only once key event handling is over)
This fixes a few issues:
* support for `enso-project` bundles that were compressed in a way that includes leading `./` in the paths;
* partially undos #7305 — projects won't be renamed on import.
Many thanks to @somebody1234 for the help.
Fixes cloud projects not being able to be opened.
The cause is because the IDE React component was calling `document.body.removeChild()`, but the script was being added to `document.head`. The `removeChild()` has now been replaced with `child.remove()` to prevent this from happening again.
# Important Notes
None
Closes#7409https://github.com/enso-org/enso/assets/6566674/d4cb6733-dc9f-454e-ba1b-e76260bda467
# Important Notes
A new config parameter was added, `startup.displayedProjectName`. When connecting IDE to the LS, it must be provided directly with the `rpcUrl` and `dataUrl` parameters. If not provided, `startup.project` will be displayed in the IDE instead. Remember that `startup.project` must be a valid Enso project name, so-called `normalized name`.
Closes https://github.com/enso-org/cloud-v2/issues/571
- Moves all interaction with `localStorage` into a `LocalStorage` class
- Saves and loads current tab (dashboard, or IDE)
- Saves and loads currently open project
Unrelated fixes:
- Changes authentication toast notifications to replace loading toast, rather than creating a new toast
# Important Notes
⚠️ `remoteLog` has not been parametrised with `projectId` (and `sessionId` for cloud projects)
There are several places that previously used manual `localStorage.setItem` and `getItem`:
- Whether the templates list is currently open
- The current project management backend (local, or cloud)
- The path to the current directory is (as far as I can tell) obsolete, as the new directory view always displays the root directory, and so it has been removed
Closes https://github.com/enso-org/cloud-v2/issues/560
- New context menu
- Global keyboard shortcut handler
- Moves the existing "escape" keybindings (close modal, cancel editing names) to global keybind handlers
# Important Notes
- The "Upload To Cloud" action is not present in the Figma design. As such:
- Its current icon is an edit of the "cloud_from" icon, with the arrow upside down
- It does not have a corresponding keyboard shortcut
- Closes https://github.com/enso-org/cloud-v2/issues/561
- New "Invite" modal
- Change autocomplete multi-select behavior
- Fix scrolling for autocomplete
- Scrolling when there are many users with permissions
- New backend permissions
- ⚠️ Intentional differences from Figma design:
- The permission type selector (the secondary modal) is slightly wider. This is because of minor changes to the text - check thread for details.
- The permission type selector for sharing with new users (the top one, next to the input) is vertically offset 4px more than usual. This is intentional; it means there is roughly the same spacing on either side of the input's border, and also means there is spacing between the "invite" button and the permission type selector
- Many buttons are faded out (`opacity-50`) when they are not interactable.
- Text changes
- "Invite" changes to "Share" in blue button
- "File" changes to "<asset type>" in permission type selector
# Important Notes
Some options don't work because the backend representation for permissions is currently different - in particular, the `admin`, `edit`, and `read` permissions, and the `docs` sub-permission.
ℹ️ Currently only works with new backend permissions - i.e. `ENVIRONMENT` must be `'pbuchu'` in `config.ts`.
- Closes https://github.com/enso-org/cloud-v2/issues/478
- Download local project as `.enso-project` archive
- Requires latest nightly version of Project Manager
- Closes https://github.com/enso-org/cloud-v2/issues/510
- Allow uploading `.enso-project` to local backend
- Closes https://github.com/enso-org/cloud-v2/issues/477
- Promote local project to cloud
- Currently errors with 500 (when uploading a small bundle) or 413 (when uploading a large bundle). May be fixed soon
# Important Notes
The "upload project to cloud" context menu action does not currently have an entry in the new context menu, so that will probably need an official design at some point
Fixes#7411
So far, this branch removes window control buttons and go-to dashboard (hamburger icon), and adds option for dashboard to set offset of the rest of top bar panels.
* Fix creating first local project
* Fix ESLint warning
* Fix bug
* Fix bug
* Remove `isRunning` from row state
* Fix row state resetting when placeholder is being forcefully shown
* Remove `forceShowPlaceholder` option from `table.tsx`
* Rename `DirectoryView` to `DriveView`
* Attempt to fix events
* Always keep `Delete` action enabled
On the local backend, now waits for project to fully open before deleting
* Only allow one project open at a time
* Fix "invalid params" error when creating new project
* Fix "invalid params" when creating many projects quickly
* wip: Fix cloud project loading modal not being dismissed
* Maybe fix opening cloud project after refresh
`/open` is no longer sent according to DevTools
* wip: Switching to local backend with cloud project open results in "invalid params"
* Fix "invalid params" when switching to local backend with cloud project open
* Fix logic for showing errors on buttons
* Don't close project when switching backend
* Fix minor error
Fixes#7405Fixes#7445
The "hidden entry" bug was caused by wrong component browser position and size set when all displayed entries fit the viewport.
The scrolling issue was due to change various "hover rectangles" order - some were above the scroll bars.
- Tweak the definition of "first-word match" so that, now that all components except aliases contain `.`, the delimiter doesn't result in penalizing non-alias matches.
- Fix matching of aliases containing spaces, and add test.
Fixes#7006Fixes#6999
Fixed several issues around visualizations:
1. The visualizations of previewed CBs are displayed. For some reason, the code which showed them wasn't there.
1. The AST ID is assigned to view ID before attaching visualization. This makes previews work in the first place.
2. The visualizations are restored after fixing an error on node.
For some reason, the hosted UI for both email and password and SSO, as well as the `Auth.federatedSignIn({provider: 'Google'})` call require the `aws.cognito.signin.user.admin` scope to be enabled to fetch and update user attributed. However, a call to `Auth.signIn(email, password)` does not. This is not well documented in AWS Cognito.
# Important Notes
`aws.cognito.signin.user.admin` gives you access to all Cognito User Pool APIs. Which federatedSignIn with google provider uses to get `currentUserInfo()` where we store optional `organizationId`. It does not provide any admin level access to other cognito or AWS parts.
* wip
* wip
* New backend switcher
* New user bar (user and chat buttons)
* Page switcher
* New search bar; minor style fixes
* Address QA
* Refactor HTML `button`s into `Button` component
* Add cloud color back to Tailwind
* Fix icons shrinking
* Fix bug
---------
Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
Closes#7244
- Section navigator removed
- Added a button panel on top of the documentation
- Show/hide documentation panel button is functional, documentation panel has animation.
- All other buttons are read-only (unclickable).
- "Hovered item preview" caption was removed from the documentation panel
- Breadcrumbs are flying in the temporary position. They should be functional but will be moved to the documentation panel in a separate task.
- Sizes and layouts of the CB panels match the design.
- The color of the application background changed. Also fixed a bug because of which the stylesheet setting of the background was not taken into account.
Known issues:
- ~~The buttons panel partially hides the topmost entry in the list. To fix that, we would need API changes to the grid view, I decided not to do that as part of the PR. We need to add padding on top of the scroll area content.~~
- Scrollbar is not rendered correctly at the bottom – the scroll area mask should crop it.
- Component list entries are not exactly as in design – I didn't touch this part of the code.
- Breadcrumbs are in the wrong position.
https://github.com/enso-org/enso/assets/6566674/409bebb5-572a-4760-852d-f666124689a2
Fixes#7301
When dropping the entire Application, we were removing the scene first, and only then the executor. But when executor had tasks containing still some GUI elements, those elements tried to reach scene on drop, what caused panic.
Here we clear the executor earlier, so the scene is deleted when nobody should try to access it.
Fixes#6552Fixes#6910Fixes#6872
Implementation of new node design. Includes many changes related to stylesheet update handling and per-style FRP construction, as well as refactoring of scene layers used by graph editor. Some additional components were migrated to use `Rectangle` shape and new mouse handling events. Fixed text rendering, where random thin lines appeared at the borders of glyph sprites. Refined edge layout to match new node sizes and not leave any visible gaps between line segments.
The node colors are currently randomly selected from predefined list. Later this will be improved to use group information from the suggestion database, once that is fully migrated to use the documentation tags, thus removing the dependency on the execution context.
https://github.com/enso-org/enso/assets/919491/aa687e53-a2fa-4e95-a15f-132c05e6337a
<img width="653" alt="image" src="https://github.com/enso-org/enso/assets/919491/30f3e897-62fc-40ea-b57b-124ac923bafd">
* Set translucency options
* Vibrancy on Windows
* Use explicit background image instead of vibrancy
* Attempt to fix `ide build`
* Fix lint warning
* Remove background from authentication flow
* Fix background image and position
---------
Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
Introduce new APIs for managing focus and using focus to inform delivery of keyboard events.
Use new APIs to implement the following behavior:
Focus:
- If the component browser is opened, its initial state is *focused*.
- If the node input area's text component is clicked, the component browser's state becomes *blurred*.
- If a click occurs anywhere in the component browser, the component browser's state becomes *focused*.
Event dispatch:
- When the component browser is in the *focused* state, it handles certain keyboard events (chiefly, arrow keys).
- If the component browser handles an event, the event is not received by other components.
- If an event occurs that the component browser doesn't handle, the node input area's text component receives the event.
[vokoscreenNG-2023-06-29_10-55-00.webm](https://github.com/enso-org/enso/assets/1047859/f1d9d07c-8c32-4482-ba32-15b6e4e20ae7)
# Important Notes
Changes to display object interface:
- **`display::Object` can now be derived.**
- Introduce display object *focus receiver* concept. Many components, when receiving focus, should actually be focused indirectly by focusing a descendant.
- For example, when the CB Panel receives focus, its descendant at `self.model().grid.model().grid` should be focused, because that's the underlying Grid View, which has its own event handlers. By allowing each level of the hierarchy to define a `focus_receiver`, focus can reach the right object without the CB panel having to know structural details of its descendants.
- When delegating to a field's `display::Object` implementation, the derived implementation uses the child's `focus_receiver`, which will normally be the correct behavior.
**Changes to `shortcut` API**:
- New `View::focused_shortcuts()` is a focus-aware alternative to `View::default_shortcuts()` (which should now only be used for global shortcuts, i.e. shortcuts that don't depend on whether the component is focused). It's based on the *Keyboard Event* API (see below), so events propagate up the focus hierarchy until a shortcut is executed and `stop_propagation()` is called; this allows sensible resolution of event targets when more than one component is capable of handling the same keypress.
Keypress dataflow overview:
DOM -> KeyboardManager -> FrpKeyboard -> KeyboardEvents -> Shortcut.
Low-level keyboard changes to support Focus:
- New `KeyboardManager`: Attaches DOM event handlers the same way as `MouseManager`.
- New *Keyboard Event* API: `on_event::<KeyDown>()`. Events propagate up the focus hierarchy. This API is used for low-level keyboard listeners such a `Text`, which may need complex logic to determine whether a key is handled (rather than having a closed set of bindings, which can be handled by `shortcut`).
- FRP keyboard: Now attaches to the `KeyboardManager` API. It now serves primarily to produce Keyboard Events (it still performs the role of making `KeyUp` events saner in a couple different ways). The FRP keyboard can also be used directly as a global keyboard, for such things as reacting to modifier state.
Misc:
- Updated the workspace `syn` to version 2. Crates still depending on legacy `syn` now do so through the workspace-level `syn_1` alias.
* wip: refactor all tables into one single `AssetsTable`
* wip: Continue merging the four asset tables; make files type-error-free
* Get table working again
* Prepare for nested directories; insert new items at correct position
* Save extra columns state; minor style fixes
* Make tab toggle bar sticky
* Rename array.withItemsInsertedAtBoundary
* Fix minor bug; adjust dropzone appearance
* Indentation for nested assets; fetching nested assets; svg color changes
* New appearances for permission display; minor fixes for "shared with" modal
* Address issues
* Minor bug fixes
* New assets upload bar
* Adjust permission display and table cell borders
* Adjust styling
* Change `toastAndLog` to a hook
* Address issues
* Make table full-width
---------
Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
This PR consists of two primary changes:
1. I've replaced `react-hot-toast` with `react-toastify` library. Both serve the same purpose — sending popup notifications (so-called "toasts"). However, the latter comes with a richer feature set that matches our requirements much better.
2. I've exposed the relevant API surface to the Rust. Now Rust code can easily send notifications.
### Important Notes
At this point, no attempt at customizing style of notifications was made (other than selecting the "light" theme).
Likely we should consider this soon after integration as a separate task.
Fixes#7336 in a quick way.
Next to the old way of defining groups, the library can just add `GROUP` tag to some entities, and it will be added to the group specified in tag's description.
The group name may be qualified (with project name, like `Standard.Base.Input/Output`) or just name - in the latter case, IDE will assume a group defined in the same library as the entity.
Also moved some entities from "export" list in package.yaml to GROUP tag to give an example. I didn't move all of those, as I assume the library team will reorganize those groups anyway.
### Important Notes
@jdunkerley @radeusgd @GregoryTravis When you will start specifying groups in tags, remember that:
* The groups still belongs to a concrete project; if some entity outside a project wants to be added to its group, the "qualified" name should be specified. See `Table.new` example in this PR.
* If the group name does not reflect any group in package.yaml **the tag is ignored**.
* A single entity may be only in a single group. If it's specified in both package.yaml and in tag, the tag takes precedence.
---------
Co-authored-by: Ilya Bogdanov <fumlead@gmail.com>
Fixes#7198Fixes#7318https://github.com/enso-org/enso/assets/3919101/4aead1e2-de01-4b6e-aa12-403af0b3c677
This PR changes the way components are kept in the controllers to allow mixing different groups when filtering. On this occasion, the code was greatly simplified:
* Instead of identifying entries by section, group and entry ID we have just a single EntryId representing position on the list. This way the view was simplified.
* Removed support for headers in Component Grid (but the Grid View still has this feature).
* Removed remnants of the old searcher and "actions".
Also, this PR fixes#7201. I decided that the top modules will have full path (namespace, library and module name), so they will be displayed as `Standard.Base.Data` instead of just `Data` (so it's clear we're browsing part of the standard library.
### Important Notes
The searcher's breadcrumbs controller is in not very nice state, but it will be revised anyway, as the breadcrumbs will be synchronized with documentation panel in the new design.
* Consistent order for statements in `dashboard.tsx`; change functions back to lambdas
* Create convenience aliases for each asset type
* Remove obsolete FIXME
* Refactor out column renderers into components
* Enable `prefer-const` lint
* Remove hardcoded product name
* Add fixme
* Enable `react-hooks` lints (not working for some reason)
* Consistent messages for naming-convention lint overrides
* Enable `react` lints
* Extract out tables for each asset type
* Refactor out column display mode switcher to a file
* Switch VM check state to use an enum
* Fix lint errors
* Minor section change
* Fix position of create forms
* Fix bugs; improve debugging QoL
* Add documentation for new components
* Refactor out drive bar
* Refactor out event handlers to variables
* Minor clarifications
* Refactor out directory view; some fixes; improve React DX
There are still many issues when switching backends
* Add `assert`
* Use `backend.platform` instead of checking for properties
* Fix errors when switching backend
* Minor style changes; fix lint errors
* Fix assert behavior
* Change `Rows` to `Table`
* Fixes
* Fix lint errors
* Fix "show dashboard" button
* Implement click to rename
* Fix lint errors
* Fix lint errors (along with a bug in `devServiceWorker`)
* Enable dev-mode on `ide watch`
* Fix bug in `useAsyncEffect` introduced during merge
* More fixes; new debug hooks; fix infinite loop in `auth.tsx`
* Inline Cognito methods
* Remove redundant `Promise.resolve`s
* Fix column display
* Fixes
* Simplify modal type
* Fix bug when opening IDE
* Shift+click to select a range of table items
* Implement delete multiple
* Fixes
* Tick and cross for rename input; fixes
* Implement rename and delete directory and multi-delete directory; fixes
* Optimize modal re-rendering
* Make some internal `Props` private
* Remove old asset selection code
* Eliminate re-renders when clicking document body
* Fix name flickering when renaming
* Use static placeholders
* Avoid refreshing entire directory on rename
* Use asset name instead of ID in error messages
* QoL improvements
* Enable react lints and `strict-boolean-expressions`
* Extract dashboard feature flags to its own module
* Feature flag to show more toasts; minimize calls to `listDirectory`
* Deselect selection on delete; hide unused features; add exception to PascalCase lint
* Fix projects disappearing after being created
* Fix name of `projectEvent` module imports
* Re-disable delete when project is being closed
* Fix assets refreshing when adding new projects
* Refactor row state into `Table`; fix delete not being disabled again
* Address review
* Implement shortcut registry
* Fix stop icon spinning when switching backends (ported from #6919)
* Give columns names
* Immediately show project as opening
* Replace `asNewtype` with constructor functions
* Address review
* Minor bugfixes
* Prepare for optimistically updated tables
* wip 2
* Fix type errors
* Remove indirect usages of `doRefresh`
Updating the lists of items will need to be re-added later
* Remove `toastPromise`
* Fix `New_Directory_-Infinity` bug
* wip
* WIP: Begin restoring functionality to rows
* Fix most issues with DirectoriesTable
* Port optimistic UI from `DirectoriesTable` to all other asset tables
* Fix bugs in item list events for asset tables
* Merge `projectActionButton` into `projectsTable`
* Remove `RenameModal`; minor context menu bugfixes
* Fix bugs
* Remove small default user icon
* Fix more bugs
* Fix bugs
* Fix type error
* Address review and QA
* Fix optimistic UI for "manage permissions" modal
* Fix "share with" modal
* Fix template spinner disappearing
* Allow multiple projects to be opened on local backend; fix version lifecycle returned by local backend
* Fix minor bug when closing local project
---------
Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
Closes#7200
Updating the looks of the project's top bar to the new design.
- Project name moved from breadcrumbs to the left of the execution environment selector.
- All components use auto-layout in most places, except for breadcrumbs (changing them means basically rewriting them from scratch, but we will use CB's breadcrumbs instead)
- Components no longer rely on individual positioning but rather work as parts of the "project view top bar" abstraction (with the use of auto-layout)
- We have a new debug scene for the project view top bar, replacing the debug scene for execution environment selector.
- Most style parameters were moved to the stylesheet, except breadcrumbs.
- Top bar is now fully managed by the Project View, not Graph Editor
- Project name is no longer editable. There is no way to rename a project inside the IDE (the corresponding code is removed). It can react on mouse hovers, but the color will not change for now.
- Current execution environment has extra bold font and is no longer capitalized.
- **Breadcrumbs can be considered broken** from the design point of view. I have no intention of making them look as in the design because we want to reuse CB's breadcrumbs component instead. The functionality should be fully preserved, though.
- The Play Icon on the execution environment selector is not updated to the newest design, I suggest creating a separate task for that (I think it is the first case of a rounded triangle in the application, and implementation would some time).
https://github.com/enso-org/enso/assets/6566674/16747c02-15b2-4806-ace3-6f03c98040f1
Fixes#7259
Node label (and output port in general) used to depend on view-mode logic, which is currently not fully functional. Since we have removed profiling mode from the application, It's best to remove some remaining parts of it to avoid them from interfering.
Labels now work as they used to, being shown on hover or when ctrl is held down.
![image](https://github.com/enso-org/enso/assets/919491/5e6996a4-6d84-4d36-a624-03a53f7e6e8a)
This PR contains minimal changes to have a visual part of #7198. It updates the view of _component list only_ to the newest design. The CB panel was shrunk in process, and breadcrumbs are a bit obscured, but they will be moved around in the next few PRs.
![image](https://github.com/enso-org/enso/assets/3919101/a562e365-d512-4320-ae19-10701edaa9ac)
### Important Notes
* This does not touch proper entry ordering yet.
* The component browser background is not (yet) updated; as some colors have alphas in the design, this may affect them.
* Add backend endpoints for "share with" button
* wip
* Fix bugs
* Invite user to organization if email is not found
* Minor fix for error message
* Address review
* Address issues
* Fix React error about identical keys
* Fix "share with" modal z-index; filter out users with permissions on asset
* Fix errors; address comment
* Fix
* Change submit button text to "Already has access" when appropriate
* Address review
* Show email on hover
* Finish renaming "share with" modal
* Select multiple for "share with" modal
* Minor style changes
* Deselect other permissions when "own" permission is selected
* Fix deselecting permissions
* Remove unused svg
---------
Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
* Show spinner on templates when creating project
* Immediately show project as loading
* Fix infinite spinner bug
* Fix bugs
---------
Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
part of #7178
Changelog:
- add: `text/fileModifiedOnDisk` notification
- update: during the auto-save, check if the file is modified on disk and send the notification. I.e. auto-save does not overwrite the file if it was changed on disk (but the save command does)
- update: IDE handles the file-modified-on-disk notification and reloads the module from disk
# Important Notes
Currently, the auto-save (and the check that the file is modified on disk) is triggered only after the file was edited. The proper check (using the file-watcher service) will be added in the next PR
https://github.com/enso-org/enso/assets/357683/ff91f3e6-2f7a-4c01-a745-98cb140e1964
Fixes#7236
# Important Notes
This was caused by `userMenu` having an effect that depends on `setModal` and `unsetModal`, which were not memoized - so they would be a different value every time.
Closes#7047
Adds an ability to resize visualizations by dragging a special (invisible) shape along the bottom and right borders of visualizations.
- Visualizations are aligned to the left border of the node now.
- Default visualization width now equals to the node's width (default height is the same)
- Changing the width of the node also changes visualization width, but only if no manual drag-resizing was applied
- Visualization size is preserved when reopening visualization (but it is not saved in project metadata)
- No visual indication that resizing is possible exist, it will be implemented in #7049https://github.com/enso-org/enso/assets/6566674/2f2525e8-cf10-4c92-953a-b69eb97a954a
Adds a new bare-bones AI searcher that can be triggered with `cmd+tab`. It will interpret the searcher input as a prompt to an AI model and replace the created node with the suggestion that was computed.
https://github.com/enso-org/enso/assets/1428930/f8403533-54ba-4ea5-9d3c-6bdf3cf336b5
Implements the first step of #7099.
# Important Notes
Contains some refactoring that allows us to have multiple controllers side by side. So QA testing should make sure that the Component Browser Searcher is still working as before.
part of #7178
Changelog:
- add: `cmd+alt+y` keybinding that re-opens the file, applies new content, and re-executes the program
This is the first part of the task to support the external edits. The next step will be to reload the module contents by the notification from the language server.
# Important Notes
https://github.com/enso-org/enso/assets/357683/79917e22-b846-4bd9-b03a-33a48d5f75b9
* Special noncapturable-nonbubbleable events
* A prototype of hover handling
* Revert "Special noncapturable-nonbubbleable events"
This reverts commit abdc0cf7eff9aba44656d959f6736250c69bf206.
* Make it consistent with docs
* Update app/gui/view/graph-editor/src/component/node/output/port.rs
Co-authored-by: Kaz Wesley <kaz@lambdaverse.org>
* Optimize a bit
* Extends docs
---------
Co-authored-by: Kaz Wesley <kaz@lambdaverse.org>
* QoL improvements
* Enable react lints and `strict-boolean-expressions`
* Address review
* Minor bugfixes
---------
Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
* wip
* wip. includes broken code
* Pass organization id when user is created
* Make backend endpoints properly error
The "set username" screen currently returns 500 server error
Fixes#6379https://github.com/enso-org/enso/assets/3919101/be509314-a5f7-41c8-be0f-a7c46deca477
Before, the quick visualization preview (ctrl/cmd + output port hover) was flickering, because shown visualization made output port no longer hovered. To fix that, the preview is hidden only when both the output port _and_ the preview stop being hovered.
Also discovered that the visualization chooser is not visible or looks ugly when visualization with HTML elements is shown over the nodes, so I made it not being visible on previews.
Closes https://github.com/enso-org/cloud-v2/issues/490:
- Make templates collapsible
- Add scroll-based shadow to templates
- Move scrollbars from body to templates and directory listing
# Important Notes
None
On my machine, I had a weird problem with shaders failing to link (without any meaningful error message). It was caused by my system upgrade - old packages had the issue as well. Bumping electron version fixed the issue.
Fixes#7064
Because our position adjusting mechanism was very confusing for users, especially on edge drops, this PR disables this adjusting for the cases where node is about to be put under the mouse pointer.
* Change cdn domain
Fixes cloud-v2/#484
* Remove modal from file upload flow
Fixes part of cloud-v2/#483
* Add optimistic UI; add more toast messages
Fixes part of cloud-v2/#483
* Handle `authentication` and `new-dashboard` flags correctly
Fixes cloud-v2/#481
* Fix bugs
* Use offline mode when `-authentication=false`
* Stop row from resizing when loading permissions
* Fix issues
* Navigate back to login screen on registration success
* Prevent scrollbar flickering
The scrollbar still blinks when switching backends, but it now does not resize. The blinking seems to be very difficult to avoid.
* Stop modal close button from overlapping text
* Fix stop icon spinning when switching backends
Remote backend not tested
* Remove modal from files table plus button
* Scrollbar-aware column count
Fixes#6955 by:
- using `visualisationModule` to specify the module where the visualization is to be used
- referring to method in `Meta.get_annotation` with `.method_name` - e.g. unresolved symbol notation
- evaluating arguments to `Meta.get_annotation` in the context of the user module (which can access the extension functions)
* Extract SVGs to individual files
Probably not working for cloud frontend (`watch-dashboard`, `build-dashboard`) yet
Dynamic SVGs were not extracted out
* Make file SVGs work for `watch-dashboard` and `build-dashboard`
* Document SVG loaders
* Address QA issues
Fixes#6908
Fast typing leads to a race condition where the end of the node editing can happen where the state of the CB is not caught up yet. This leads to two issues:
1. The wrong selection is made, as the View of the Component Browser has not been updated yet, but the selection from there is used to determine how the node is created.
2. Processing of the keys is aborted early, while still waiting for additional key input.
This is now fixed.
https://github.com/enso-org/enso/assets/1428930/dce82bb3-1c25-4a67-988a-d74469dc8fcd
Closes#6705
This PR removes Tailwind from dependencies of the documentation panel and also brings some essential design improvements.
List of fixed things:
- Massive refactoring, removing unnecessary HTML tags, and simplifying the overall layout.
- Spacing to the right of the bullet in the bullet lists is much smaller. Bullets also have the same color as the following text.
- Paddings before headers increased.
- Colon used instead of the comma between the method link and its summary.
- Module or type names in the top header are now delimited by `.`, which matches the Enso language.
- We now use Twemoji icons in marked sections. Now `Info` and `Important` icons are much nicer.
- Constructors are now in a separate section as methods.
- Headers correctly handle long entry names.
List of not fixed things: (I will create additional issues for them)
- Argument names in the list are not bold. We receive a `<ul>` HTML code from the engine. We don't know whether it contains argument names or something else. It requires support from the LS protocol.
- No highlight for things delimited by `<pre>` tags in the text (like `Nothing` on the screenshot below). It also requires support from the LS protocol because we don't inspect received text and can't modify it.
![image](https://github.com/enso-org/enso/assets/6566674/868f1e03-e53a-4eb6-a306-8b439264fec5)
In the video from IDE, you can see some issues with spacing in the documentation, namely redundant blank lines at the beginning of each example and multiline (and multi-paragraph!) summaries for methods. This can't be fixed on the IDE side. I will create separate issues for that.
https://github.com/enso-org/enso/assets/6566674/e4cef3d1-7a13-4d3b-b11d-f5ee2c05ca82https://github.com/enso-org/enso/assets/6566674/43970982-ba43-4530-8ffd-6bce790d5d77
Fixes#6816.
The code for adding imports for dropdown widgets was unified with CB. The code was moved from the searcher controller to the graph controller.
Also, I changed the signature for a few `lookup_*` methods of the suggestion database, because I have always found it weird that they return `Option` instead of `Result`. They now work nicely with the surrounding code.
https://github.com/enso-org/enso/assets/6566674/49125f8d-096e-4cca-a922-4811ed717a4d
Fixes#6772
When detaching an existing edge by grabbing by a source port, the node's code is no longer immediately modified. It is only changed once the edge has been either connected or destroyed. When grabbing on the source side, the existing behavior is preserved. That way, we always have guaranteed place to keep the edge connected to.
https://github.com/enso-org/enso/assets/919491/49e560cb-0a29-4c6a-97ec-4370185b8c89
In general, the detached edges are now more stable, resilient to all kinds of expression modifications during the drag.
https://github.com/enso-org/enso/assets/919491/e62450ff-46b2-466f-ac33-f4f19e66ee1d
In case there is a situation where the currently dragged edge's port is destroyed (e.g. by Undo/Redo), instead of showing glitched port position it is simply dropped.
https://github.com/enso-org/enso/assets/919491/8fb089aa-a4a5-4a8c-92eb-23aeff9867b8
# Important Notes
The whole edge connection and view handling at the graph-editor view level has been completely rewritten. The edge endpoints are now identified using new `PortId` structure, that is not dependant on the span-tree. This prepares us for eventual removal of the span-tree in favour of manipulating AST directly. Right now those `PortId`s are still stored within the span-tree nodes, but it will be easy to eventually generate them on the fly from the AST itself. The widget tree has also already been switched to that representation where appropriate.
Additionally, I have started splitting the graph editor FRP network into smaller methods. Due to its absolutely enormous size and complexity of it, I haven't finished the split completely, and mostly edge-related part is refactored. I don't want to block this PR on this any longer though, as the merge conflicts are getting a bit unwieldy to deal with.
Fixes#6855
Correctly sets the layers of the full-screen panel and the scrollbars. The full-screen panel needs to be in the `panel` layer, as it is fixed and above everything else. The scrollbars in the text visualization should be placed together with their parents, so they are switched correctly between layers when enabling/disabling full-screen. Leaving their layer otherwise unspecified should not lead to occlusion issues, as all other elements in the text visualization are Dom elements, and therefore placed below EnsoGL elements.
https://github.com/enso-org/enso/assets/1428930/db80c5b7-69fd-4bf5-84ab-c83664227059
Fixes performance problems observed when creating/resolving errors (#6674):
|before|after|
|---|---|
|![vokoscreenNG-2023-06-09_08-49-46.webm](https://github.com/enso-org/enso/assets/1047859/a0048b32-4906-41cd-8899-6e2543ef6942)|![vokoscreenNG-2023-06-09_08-50-54.webm](https://github.com/enso-org/enso/assets/1047859/fef81512-ad89-4418-ae10-d54de94d96ea)|
This also helps with #6637, although I haven't been able to reproduce the degree of slowness shown there so I can't confirm that this resolves that issue.
# Important Notes
- Disable visualizations until shown. [Faster startup, and all graph changes.]
- 6x faster message deserialization. [Saves 400ms when making a change with many visualizations open.]
- Fast edge recoloring. [Saves 100-150ms when disconnecting an edge in Orders.]
- Add a checked implementation of a `profiler` data structure, used instead of the fast `unsafe` version when `debug-assertions` are enabled.
Several small changes:
- Dropdowns: Populate `GridView` lazily (fixes#6865).
- Clear disconnected edges when editing node (fixes case 1 in #7018).
- Fix regression in node selection rendering (2nd bug in #6975).
- Update profiler docs. The hotkey to *prOfile without exiting* is now `Ctrl+Alt+O` (`Ctrl+Alt+P` has been requisitioned by the CB).
Node selection:
| Pre-`Rectangle` | This PR |
| --- | --- |
| ![image](https://github.com/enso-org/enso/assets/1047859/bec341c1-dbf8-404d-9f2a-5d070c80ff15) | ![image](https://github.com/enso-org/enso/assets/1047859/8161390c-f64b-4bb3-8b7a-b87b2f9b4cd3) |
# Important Notes
- `Rectangle`: When `inset > border`, the extra space is now between the body and the border, not outside the border.
- More robust node layering logic. Now an inconsistent layer order cannot occur, even if something strange happens (like editing an expression and an edge at the same time).
- The dynamic drop down in the `drop_down` example scene doesn't show any entries before (or after) this, so I can't test the dynamic case.
This PR adds facilities for controllers to be aware of what shortcut command is currently being processed. This allows grouping consequences of single user action into a single transaction without hard-coding it separately for all the separate paths case-by-case, which turned out to be challenging and error-prone.
Additionally, a number of minor fixes were carried over from #6877:
* workaround for #6718;
* avoiding creating spurious transactions when dealing with node positions;
* dropping any non-user user-triggered transactions that occur during the IDE project initialization.
Implements #6544 (eliminates 10/42 of the constantly-displayed draw calls).
Fixes#6717. Improves startup CPU time by 5% (250ms, loading Orders on my dev box).
# Important Notes
- Edges: New implementation uses only Rectangle under most conditions.
- Node and action area: Replace some shapes with Rectangle.
- List view: Replace some shapes with Rectangle.
- Display object hierarchy: The lowest-level shape instance types no longer have their own display objects.
- Includes initial support for using `Rectangle` to display triangles.
`executionContext/create` method has an optional `context_id` parameter. Supplying this argument makes the user's session more reproducible. I.e. this way the language server can recreate the user's session by recording the requests.
* Save backend type; fix `-startup.project`
* Attempt to fix for cloud
* Fix for cloud and implement automatic opening
* Fixes
* Add missing functionality
* Switch default backend to local backend
* Fix type error
* Fix saving backend
* Make loading message appear instantly
* Fix context menu positioning
* Fixes and QoL improvements
* Style scrollbar on `document.body`
* Fix `-startup.project`; other minor fixes
* Open project immediately when creating from template; minor fix
* Finally fix spinner bugs
* Fix some minor bugs
* Fix bugs when closing project
* Disallow deleting local projects while they are still running
* Close modals when buttons are clicked
Fixes#6763
The bug was caused by pushing stack frames in the engine first, then failing to get graph controller - in that case we didn't update graph, but kept the stack, so graph was not synchronized with stack.
This PR changes the approach: we try to open graph first, only then push frames to stack. If _any_ frame will fail, we try to pop those we pushed so far, to restore the previous state. The same fix was applied for leaving nodes.
Also, I realized, that running several "enter node" / "leave node" actions could mix push/pop operations, making a mess with our execution context state. I've added a mutex to ensure we won't do this: the contesting operation will simply fail.
# Important Notes
In case when _restoring_ state fails, I did not have any better idea than just trying until it succeed.
- Add the missing dropdowns for `Locale` and `Encoding`.
- Correct a few mismatched type signatures.
- Adjust `order_by` calls with a single `Sort_Column` to call in a Vector.
- Adjust parameter names for `transpose`.
- Fix for the table viz: escape HTML and `suppressFieldDotNotation`.
- Use `Filter_Condition.Equal True` for the default filter.
- Adjust `Data.fetch` to return the response on success when parse fails. Rename `parse` to `try_auto_parse`.
- Add various aliases for methods.
- Add tests for `Table.set` when using a `Vector`, `Range` or `Date_Range`.
- Add check for mismatched length on `Table.set`.
![image](https://github.com/enso-org/enso/assets/4699705/23ea0ba3-2b05-4af8-afd9-f35b55446c24)
![image](https://github.com/enso-org/enso/assets/4699705/8b0253e6-e9e8-490a-9607-0da51ab5a215)
* Dashboard and authentication changes
* wip
* Replace `useNavigate` with a wrapper
* Fixes
* Fix flipped boolean
* QoL improvement for request blocking
* Add service worker to cache dependencies
Now, quick typing in component browser and pressing "enter" should not cut off the last part typed. Fixes#6733https://github.com/enso-org/enso/assets/3919101/3979ed5a-ba4e-4e25-93e6-672e731b7bd8
On this occasion, also fixed "go-to-dashboard" button and "Unsupported engine version" being over the full-screen visualization. Fixes#6722
# Important Notes
I did a significant refactoring of Project View:
1. The huge `frp::extend` block was split into multiple `init` methods.
2. Remaining of the "Old searcher" were removed.
3. The "Edited" event from node's input is emitted only when in edit mode (it's consistent with other API terminology, and makes FRP for showing CB much simpler.
The code was _mostly_ moved around, but the check is advised anyway, as there were small changes here and there.
close#6800
Update the `executionContext/expressionUpdates` notification and send the list of not applied arguments in addition to the method pointer.
# Important Notes
IDE is updated to support the new API.
Implements #6792Fixes#6715Fixes#6052Fixes#5689
The dynamic dropdown widgets entries now can specify additional widget configuration as a list of `parameters` of the inner method call. That allows for creating smarter widgets within nested constructors, taking the outer widget's context into account.
<img width="772" alt="image" src="https://github.com/enso-org/enso/assets/919491/97c70654-9170-4cf0-ae4d-2c25c74caa96">
With the changes to the serialization logic, I have also adressed issues related to automatic label generation for both static and dynamic dropdown entries. For access chains (e.g. `Foo.Bar.Baz_Qux`), the label will now always contain only the last segment, and all underscores will be removed (e.g. `Baz Qux`). This also applies to dynamic entries where the label is not explicitly specified in method annotation.
<img width="265" alt="image" src="https://github.com/enso-org/enso/assets/919491/1abe6c77-010b-4622-b252-97cd1543cb48">
Additionaly, now the dynamic entries containing constructors will also be resolved within suggestion database, allowing us to automatically insert relevant import, shorten the actually used expression and wrap it with parentheses if required. That was required for nested widgets to show up, as we depend on properly resolved argument names to show them. The widget definitions in annotations no longer need to wrap the expressions manually. Instead, the constructors used in dropdown entries should be specified using fully qualified names, similarly to how we do it in tag values.
CC @jdunkerley - The dropdown entries containing just a constructor will no longer need added parentheses around them. Instead, the constructors should be specified using fully qualified names, similarly to how we do it in tag values.
<img width="389" alt="image" src="https://github.com/enso-org/enso/assets/919491/19944b5b-d0c7-43ac-bf17-ca1556e0b3f0">
Note that currently the import resolution is attempted even if the used constructor is is not specified using a fully qualified name. To accomplish that, the IDE is performing a more expensive search through whole suggestion database for matching type and module (e.g. in example above, we are searching for a match for `Aggregate_Column.First`). If there are multiple potential matches due to a name collision, it is undefined which one would be preferred. Effectively one will be picked at random. To avoid that, the libraries should over time transition to using fully qualified names wherever possible.
# Important Notes
I have removed the `payload` field from the span tree, and with it the generic argument on its nodes. This was already partially done on the branch with new design, on which I also had a few changes that turned out to be useful for this PR. So I pulled it in as well. It is a nice simplification that will ease our further work on removing the span-tree altogether. The biggest impact it had was on the node output port, where I had to store the port data outside of the span tree. This is the approach we would be taking when transitioning to AST anyway.
This is a fix for a couple of recent regressions:
- Fixes#6756: Projects couldn't be renamed anymore from within the project view.
- Fixes#6804: One could no longer switch between projects from within the project view.
- It also unblocks the issue with the spinner (that got reverted), but that probably needs some extra attention.
It might be the long-term goal to have different UX solutions to these cases, but this should fix those regressions in the short term at least.
Thanks to @somebody1234 for the in-depth conversation (and the actual code!).
Fixes#6736Fixes#6486Fixes#6601
To achieve goal mentioned in the title the following changes were made:
1. Now it's normal state of Component Browser to have no entry selected. In that case pressing enter will accept the input as-is.
2. The issues of `Column.from_vector` or actually any code being unintentionally inserted should be resolved, as in most of those scenarios we do not select any item in CB after list reload. Specifically, the first element is selected only when:
* the input is empty (so the user just starts writing code)
* or we filter by some pattern (we select the best match). This includes writing literal.
3. On this occasion, inserting literal was fixed, so no more random spaces are inserted inside.
4. Also, the entries in groups other than local group are reversed: now the entries specified as first in "component groups" section in the library will be easily approachable. In particular, now "Text input" is selected by default in empty node instead of `Column.from_vector`.
https://github.com/enso-org/enso/assets/3919101/42064b08-16b4-4519-81de-8a2d3701c112
Only invalidate the graph editor view at most once per frame. On develop, this saves about 70ms (2%). Testing a recent backend without #6755 as a stress-test, this saves about 5s (45%). This reflects better scalability to large numbers of `SuggestionUpdate` messages.
Fixes#6630.
# Important Notes
- Also fix intermittent profiling failures occurring since the introduction of microtasks.
* Remove unused code: project management in component browser
* Encapsulate internal FRP logic of project list
* Collapse some code paths
* Open project passed on command line through presenter
A project name or ID that is passed on the command line was initialised
in the controller setup, before the presenters and views are set up.
Now, we fully initialise the IDE before opening a project so we have
control over the view while a project is being opened.
* Show a spinner in all cases of opening a project
* Let root presenter open/close projects when switching projects
* Change spinner to make progress over a fixed period
* Resolve issues when Project Manager API isn't available
* Bump wasm size limit
Re-introduce a feature that was removed with #6638: only initialize visualization choosers when they are visible. This avoids initializing lots of invisible UI elements at the same time when opening a project.
Fixes#6754. The issue mentions being able to create and delete nodes when the full-screen visualisation is active. Besides those, you now also can't:
- collapse nodes into a function
- enter a function
- exit a function
- Handles the `show-dashboard` event to hide the IDE and show the dashboard
- This replaces the temporary Ctrl+Alt+D shortcut to do the same action. The Ctrl+Alt+D shortcut has been removed.
# Important Notes
None
Fixes some of #6662
Issues addressed:
- `ide watch` and `gui watch` should now use the desktop platform
- error screen should now be shown when passing invalid options
- password (both creating password when registering, and resetting password) should now warn on invalid input
# Important Notes
Instead of checking whether `location.hostname === 'localhost'`, I've opted to use a constant defined by the build tool instead. This is to make it easier to merge the cloud IDE and desktop IDE entrypoints in the future, since it would be able to simply set `platform: Platform.cloud` in the build config.
Should fix [cloud-v2#464](https://github.com/enso-org/cloud-v2/issues/464).
# Important Notes
I'm not 100% clear on how to repro the issue so i'm partly just guessing the root cause.
I have eliminated various other things from being potential causes though - e.g. `localStorage` indicates that the AWS libraries are clearing their entries as expected.
* Fix cloud-v2/#432
* Delay setting backend to local backend; don't list directory if user is not enabled
* Add a way to debug specific dashboard paths
* Fix bug
* Check resources and status immediately
Refactored the logic behind selecting appropriate widgets for span tree nodes. Now the bulk of it is moved into widget methods. When a given widget type is reporting to be not compatible with the expression, it will not be used even if the configuration was overriden using an method argument annotation. In that case, the usual logic for automatically selecting the appropriate widget will kick in.
![image](https://github.com/enso-org/enso/assets/919491/6316e21e-c509-4cc4-a3a6-c482798894d0)