This is a prerequisite for adding a CI action for E2E tests.
- Fix E2E tests
- Remove visual regression testing (VRT) and associated fixtures (screenshots) for now
- Switch dashboard almost fully to Vite, from ESBuild, to match GUI2's build tooling.
- Add some new E2E tests:
- Creating assets
- Deleting assets
- Creating assets from the samples on the home page
- Sort assets
- Includes fixes for sorting:
- Group sorted assets by type again (regression) (see https://github.com/enso-org/cloud-v2/issues/554)
- Make sorting by title, case insensitive. This is because it is more intuitive for non-programmers if all items with uppercase names *aren't* separated from those with lowercase names - especially since the Windows FS is case-insensitive.
- Normalization of Unicode letters is *not* currently being done. It can potentially be added later.
- Double-clicking *anywhere* on a directory row now expands it. Previously it was only being expanded when double clicking
- Add recursive label adding/removal to mirror backend
- Note: The current implementation is not exactly the same as the backend's implementation.
- Fix https://github.com/enso-org/cloud-v2/issues/872
- Unset "saved project details" (for opening the last open project) if fetching it produces an error.
# Important Notes
- All tests pass. (run `npm run test:e2e` in `app/ide-desktop/lib/dashboard`)
- All `npm` commands should be run in `app/ide-desktop/lib/dashboard`. `dashboard:*` npm scripts have been removed from `app/ide-desktop` to prevent a mess.
- `npm run dev` confirmed to still work. Note that it has not been changed as it was already using Vite.
- `npm run build` now uses `vite build`. This has been tested using a local HTTP server that supports `404.html`.
- Other cases have been tested:
- `npm run test:e2e` works (all tests pass)
- `./run ide build` works
- `./run ide watch` works
- `./run ide2 build` works
- `./run gui watch` works
Closes#8823https://github.com/enso-org/enso/assets/6566674/966576ec-6507-401c-98d3-bd71c2ffc6b2
Adds a basic text widget for text literals.
### Important Notes
Several known restrictions:
- Separators would always be replaced with single quotation marks. All types of separators in Enso are supported though, and they would be correctly escaped if needed.
- Logic for widget selection probably needs refinement (works for text literals and `Text` types, but does not work for `Text | Integer`, for example)
- **(!)** There is a very annoying issue when the input field suddenly loses focus, closing the editing mode and discarding any changes. Debugging shows that it happens when we receive an engine update (and probably recreate the node component/widget tree (???)). It requires a separate investigation.
Adds a new test scenario that checks that types are correctly set and displayed after an expression update. Includes checking the string set on the node as well as showing the type label when hovering the output port of a node.
Part of #8518Closes#8822
The drop downs were missing, because WidgetFunction had a higher score than them and took precedence. The fix was to adjust scores, so drop down is before both argument name and function. Generally, any widget expecting to "overlap" existing code (and possibly further widgets) should go before WidgetFunction.
# Important Notes
* Extended mockExpressionUpdate to accept a subexpression of a node. Also, I removed it from GraphDb - I want this function to have as little impact on app code as possible.
Introduce new AST APIs. They will be used for synchronization in the next PR.
# Important Notes
- `Module.edit` now clones a YDoc containing all the module's data; the resulting `MutableModule` can be edited with mutation APIs.
- Every AST type now has a mutable subtype. These `MutableAst` types expose all editing operations that were previously in `MutableModule`, such as `replace`; they also provide field setters.
- Depends on unmerged backend features:
- https://github.com/enso-org/cloud-v2/issues/832
- https://github.com/enso-org/cloud-v2/issues/833
- Close https://github.com/enso-org/cloud-v2/issues/829
- Add scaffold for settings page
- Add endpoint for deleting user
- Add endpoint for uploading profile picture
- Modify API types to add profile picture to user info
- Add shortcuts:
- <kbd>Cmd</kbd>+<kbd>,</kbd> to open settings page (shortcut taken from VS Code)
- <kbd>Esc</kbd> to close settings page
- ℹ️ Note that, while the settings page is considered as a page by the logic, it is not saved for the next session, as the settings page should be a transitional page (it should only ever be open to do one specific task, and then immediately closed again)
- Partly implement https://github.com/enso-org/cloud-v2/issues/840
- Add "members" tab with member list
- Add "Invite Users" button to be able to invite multiple users
- Misc. QoL improvements
- Deselect selections when clicking away from the selection
# Important Notes
None
Fixes several points from #8745
* Brought back cursor pointer in full screen visualization
* Changed behavior of edge disconnected from one side: Esc will bring the connection back, while click will remove it (and start creating new node if the source was connected).
* When hovering connection, the "active" part (i.e. the part which will be the hanging connection after click) is in normal color, and the rest is dimmed.
[Screencast from 2024-01-19 09-06-48.webm](https://github.com/enso-org/enso/assets/3919101/6df28a9c-51b3-4f98-be10-a35275eac800)
Closes#8751Closes#8752
- The numeric widget allows the use of the input field after clicking with LMB
- Slider is only visible if the engine provides widget configuration with set limits (see below for testing)
- Setting value outside limits is possible
- For now, to distinguish drag from click, we compare relative mouse movement on the mouse up event. We might benefit from using a timer instead, but let’s see how good it is now.
- Changes after demo
- No more input validation. You can enter literally anything and it would be accepted.
- Updates debouncing – the code is updated on defocus or when slider dragging has finished.
https://github.com/enso-org/enso/assets/6566674/b3580083-c678-4734-881c-97f8ac56176b
Some refactoring separated from #8825 for easier review.
# Important Notes
**ID types**
The new *synchronization IDs* will replace `ExprId` for `Ast` references in frontend logic. `ExprId` (now called `ExternalId`) is now used only for module serialization and engine communication. The graph database will maintain an index that is used to translate at the boundaries. For now, this translation is implemented as a type cast, as the IDs have the same values until the next PR.
- `AstId`: Identifies an `Ast` node.
- `NodeId`: A subtype of `AstId`.
- `ExternalId`: UUID used for serialization and engine communication.
**Other changes**:
- Immediate validation of `Owned` usage.
- Eliminate `Ast.RawCode`.
- Prepare to remove `IdMap` from yjsModel.
A follow-up of [this comment](https://github.com/enso-org/enso/pull/8740#discussion_r1452282468)
`addRequiredImport` now reads the existing import from the edit instead of taking them from the current module. This way, it will consider any imports added so far as part of this edit.
- Close https://github.com/enso-org/cloud-v2/issues/856
- Implement upload for existing files
- This is triggered by uploading a file with the same name.
- Add a modal that allows the user to select whether to rename or update the file, for each conflicting file
# Important Notes
- There are a *lot* of buttons in the modal. Any ideas on how to make this screen clearer/simpler/easier to understand would be greatly appreciated.
- There are currently a few minor backend issues preventing all functionality from fully working:
- Projects currently cannot be updated due to a bug
- Neither files nor projects can be uploaded if their name contains `()` - e.g. `foo (2).txt`
This makes it consistent with the indentation style of GUI2.
# Important Notes
- This commit *will* need to be added to [`.git-blame-ignore-revs`](https://github.com/enso-org/enso/blob/develop/.git-blame-ignore-revs) *after* it is merged.
- This shouldn't need any particular QA (although QA doesn't hurt), as the only thing that was done is a `npx prettier -w .`, meaning that there should be zero logic changes.
- Closes https://github.com/enso-org/cloud-v2/issues/857
- Changes format for new folders from `New_Folder_1` to `New Folder 1`
- Changes format for new projects from `New_Project_1` to `New Project 1`
- Uses names for projects created from templates, rather than `Upper_Snake_Case`d IDs
# Important Notes
- Folders containing spaces work fine on cloud backend
- ⚠️ Unable to test opening a project with a space in its name on the cloud backend.
- Projects containing spaces work (open, edit, and execute fine on local backend
- Fix https://github.com/enso-org/cloud-v2/issues/848
- Disables dragging rows when a row is being edited
- Also disables dragging rows on the local backend, as folders are not yet supported there
- Fix other issues found (not sure if they were introduced by this PR):
- Cut (Cmd+X) does not fade out assets
- Cancelling editing names actually still renames the asset
- Cut/Copy/Paste/Undo shortcuts when renaming *also* trigger "copy assets" (etc.) shortcuts
- Apply suggested QoL improvement:
- Disallow renaming an asset to a blank name (a name consisting only of whitespace). Current (new) behavior is to silently revert the asset name to its original name.
# Important Notes
None
Related to https://github.com/enso-org/enso/issues/8518
These tests already caught one regression in nav breadcrumbs: https://github.com/enso-org/enso/issues/8756
It also provides API for mocking expression updates for arbitrary nodes on the screen. The implementation is a bit convoluted and includes setting a callback on `window`, but it looks like the only possible solution given our architecture and playwright restrictions.
Fixes#8788
- Fixed missing argument lists on constructors, and improved handling for various cases of partially applied functions.
- Extended tests to check for correct `self` argument placeholders.
- Additionally reworked some questionable test code to maintain separation between server and client code.
<img width="1241" alt="image" src="https://github.com/enso-org/enso/assets/919491/5377f57f-18f0-4a50-a8ab-9331862ca547">
Random.Seed doesn't work in the GUI and the TEXT_ONLY tag doesn't do anything so it was incorrectly showing up in the component browser.
This MR makes Random.Seed private to hide it from the GUI and completely removes the TEXT_ONLY tag which is unused and unimplemented.
These components are a legacy remnant of the old design, where `Table` needed to be reusable because there was a separate table for each asset type.
# Important Notes
None
- Correctly applying code edits when connecting to argument placeholders or disconnecting existing arguments.
- Prevented the placeholders from temporarily flickering right after the edit operation.
- Rewritten the placeholder argument placing logic to match the old GUI exactly - the argument should never move right after being connected.
- Fixes#8494
- Fixed some cases of ports either not existing, or existing where they shouldn't.
This is required because `index.ts` was renamed to `entrypoint.ts` in order to avoid colliding with the main export of the `enso-dashboard` module, which is used by `gui2` as `dashboard.run()`. This file was renamed in #8587, causing the issue.
Build script changes also included thanks to @mwu-tow.
# Important Notes
This should only affect projects opened against the remote (cloud) backend, meaning that to test this, you should open a project against the cloud backend.
Implements first two points of #8745
1. The fix for drop-down was simple, just stop click propagation
2. The fix for connections was much more complicated. It turned out, that it's about keeping track of hovered ports; when picking an option in WidgetSelection makes the drop-down disappear - but that won't emit `pointerleave` event, so the port was still deemed hovered. Changed the mechanism for tracking hovered port to more "centralized" one.
- Use `rootDirectoryId` returned by backend instead of mirroring backend behavior to generate the root directory ID
- To test this, move/copy an asset *to* the root directory.
- Move the right side of the top bar back to the right edge in editor view (oops)
- To test this one just open any project and make sure the top bar doesn't look funny.
- Delete the barrel export of `#/hooks` in the dashboard (left over due to an oversight when removing the other barrel exports)
- Should not need to be tested; all imports have simply been moved to point to the actual declaring file. As such, as long as the code still typechecks, it should be working fine.
- Delete a duplicated (unused) file caused by a bad merge.
# Important Notes
None
- Fix https://github.com/enso-org/cloud-v2/issues/828
- Fix appearance of search bar on small screens
- Close https://github.com/enso-org/cloud-v2/issues/830
- Rename "Data Connector" back to "Secret" for now
- Fix "create secret" endpoint
- Add "update secret" endpoint
- Repurpose "create secret" modal to also be usable for updating secrets
- Add new context menu option for editing secrets
- Add new shortcut (<kbd>Ctrl</kbd>+<kbd>E</kbd>) for editing secrets
- Add double-click trigger for editing secrets
- Fix https://github.com/enso-org/cloud-v2/issues/831
- Add the redirect, that was previously missing (only present in the very old dashboard)
- Fix https://github.com/enso-org/cloud-v2/issues/835
- Fix search query not updating when clicking label in sidebar
- Fix search query breaking when clicking a suggested label, after tabbing into a selection
- Fix https://github.com/enso-org/cloud-v2/issues/839
- Make search query refresh when pressing <kbd>Enter</kbd>
- Fix some buggy behavior when applying autocomplete
# Important Notes
None
- Significantly flattens directory structure of `lib/dashboard/`
# Important Notes
- Basic testing done on:
- dashboard's `npm run dev` which (since quite recently) uses Vite.
- specifically: `npm run dev` in `app/ide-desktop/lib/dashboard`, OR `npm run dashboard:dev` in `app/ide-desktop`
- dashboard's bundle script (`npm run build`) which uses ESBuild.
- GUI2's own entry point (GUI2's `npm run dev`).
- `./run ide build`
- `./run ide watch`
- `./run ide2 build`
- `./run gui watch`
- Closes https://github.com/enso-org/cloud-v2/issues/822
- Implements the following actions and their associated keyboard shortcuts
- "Duplicate"
- "Copy" and "Copy All" (= copy all selected items)
- "Paste" and "Paste All" (with copied assets - cut-and-paste already worked previously)
# Important Notes
None
[Screencast from 2024-01-05 12-18-55.webm](https://github.com/enso-org/enso/assets/3919101/f083512f-f698-42d1-b43a-4e50546b958a)
* Before most widgets didn't show in placeholders, because the argument name widget did not create further widgets. Now it try in more cases, and ignores the problem if no widget is found.
* WidgetInput is no longer a set of classes - instead it contains a set of common fields, and every widget can just extend it with new fields. Adjusted priorities accordingly.
* Updated widget definitions: they better try to match types, and take care about default values.
# Important Notes
Setting value on placeholder breaks widgets. The issue is also present in develop (when connecting to placeholder). To restore node, you have to reopen the project.
- Closes https://github.com/enso-org/cloud-v2/issues/782
- `owner:` to do exact matches against owner username
- `label:` (already existed)
- `name:` to do exact matches against asset name (exact match; case insensitive; the glob character `*` matches 0 or more characters)
- negated searches (`-owner:`, `-label:`, `-:` for negating keywords)
- Related changes that were not explicitly requested:
- add `no:`, `-no:`, `has:` and `-has:` to filter for assets that lack a specific field. Currently this only works for labels, because most (if not all) other fields cannot be empty.
- `label:a,b,c` to OR results together. `label:a label:b` ANDs results as usual.
- shift-click labels to add/remove it to the last search term as an OR
- clicking labels now cycles them from: absent -> present (positive) -> present (negative)
- Unrelated changes
- Switches unit tests to use `vitest`
# Important Notes
Some other suggestions have been added in the original issue, but currently intentionally left out to avoid prematurely over-engineering this feature.
Improve `commitEdit` API.
# Important Notes
- `commitEdit` now warns if it is called before a previous edit has been observed. The preferred approach is to ensure all related changes reside in the same `MutableModule`.
- Remove `root` parameter. I included it to avoid a null check/fallible operation, but it's better to repeat the check and simplify the API.
* Merged ArgumentAst and ArgumentPlaceholder into single class.
* Created `AnyWidget` input being a "general use" widget input. Most wigets try to match with it; the `Argument` input is now solely for WidgetArgument(Name) or those handling arguments in a specific way (like selector which want to show on arg name click).
* dynamic config is now part of widget input, and is properly propagated through vector editor/function widgets.
# Important Notes
The widgets still does not work perfectly:
* The chosen options often don't have argument placeholders - that's because we don't display them for constructors. Needs to be added on our side, or engine should send us methodCall info for constructors.
* There are issues with engine's messages sent to us. This makes widgets does not set up (so there is no drop-down, or vector adds `_` instead of default). I'm investigating them and going to fill issues.
More cases in E2E tests checking all ways of using component browser.
The tests found one actual bug: sometimes we displayed only a few entries after opening CB because the scroller size was not refreshed (we assumed it will be available in the next tick). Refactored Component Browser so it does not use nextTick anymore.
Further AST integration and API refinement before introducing the new synchronization mechanism.
closes#8609
# Important Notes
API changes:
- Renamed `Ast.parseExpression` / `Ast.parse` to better reflect their usage:
- `Ast.parse` returns a block or a single expression, depending on its input; this is convenient for expressions expected to be single-line.
- `Ast.parseBlock` always treats its input as a block; this is suitable for parsing a file.
- `astExtended` is no longer needed to access span information. `Ast.span` provides access to the value when appropriate (the project's committed modules have spans; uncommitted changes or other parsed expressions don't).
- `SourceRange` is now used everywhere in place of `ContentRange`--the two types had the same definition.
Features:
- Fix CodeEditor viewing.
Implementation improvements:
- Updated widget update handlers (#8545) implementation to Ast API.
- Integrated `imports` more thoroughly with new AST APIs.
- More tests.