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.
Closes#7353
I introduce a new type `WithAggregatedProblems`, because `WithProblems` was too simple - it only allowed to hold a `List<Problem>` but `AggregatedProblems` is more than that. Ideally we shouldn't multiply entities like this too much. We should probably unify all to use `WithAggregatedProblems` - but after starting this, I realised it will likely just take too much effort to do for this little PR. So instead, I created a follow-up task for this: #7514
MethodProcessor generates code for builtin method invocation that is wrapped in `try-catch` and handles some predefined subset of `RuntimeException`. So far, only `com.oracle.truffle.dsl.api.UnsupportedSpecializationException`.
# Important Notes
#### The Plot
- there used to be two kinds of benchmarks: in Java and in Enso
- those in Java got quite a good treatment
- there even are results updated daily: https://enso-org.github.io/engine-benchmark-results/
- the benchmarks written in Enso used to be 2nd class citizen
#### The Revelation
This PR has the potential to fix it all!
- It designs new [Bench API](88fd6fb988) ready for non-batch execution
- It allows for _single benchmark in a dedicated JVM_ execution
- It provides a simple way to wrap such an Enso benchmark as a Java benchmark
- thus the results of Enso and Java benchmarks are [now unified](https://github.com/enso-org/enso/pull/7101#discussion_r1257504440)
Long live _single benchmarking infrastructure for Java and Enso_!
Seeing plenty of
```
java.lang.NullPointerException: Some(Null receiver values are not supported by libraries.)
at org.graalvm.truffle/com.oracle.truffle.api.library.LibraryFactory.dispatch(LibraryFactory.java:528)
at org.graalvm.truffle/com.oracle.truffle.api.library.LibraryFactory.getUncached(LibraryFactory.java:396)
at org.enso.interpreter.runtime.error.WarningsLibraryGen$UncachedDispatch.hasWarnings(WarningsLibraryGen.java:440)
at org.enso.interpreter.instrument.job.ProgramExecutionSupport$.sendExpressionUpdate(ProgramExecutionSupport.scala:366)
at org.enso.interpreter.instrument.job.ProgramExecutionSupport$.$anonfun$executeProgram$1(ProgramExecutionSupport.scala:62)
at org.enso.interpreter.instrument.job.ProgramExecutionSupport$.$anonfun$executeProgram$10(ProgramExecutionSupport.scala:151)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at org.enso.interpreter.instrument.job.ProgramExecutionSupport$.executeProgram(ProgramExecutionSupport.scala:139)
at org.enso.interpreter.instrument.job.ProgramExecutionSupport$.$anonfun$runProgram$3(ProgramExecutionSupport.scala:217)
```
during execution of simple programs.
Added a guard to prevent us from sending expression updates when dealing with nulls.
* 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.
- Fixes#7412
- Also adds tests and fixes some more edge cases:
- Ensures correct handling of existing Database tables whose column names may be invalid from Enso perspective, or clashing from Enso perspective (e.g. for most DBs `ś` and `s\u0301` are different names, but for Enso they are basically the same so this would cause issues - thus Enso now renames such columns when accessed (still using the correct column reference in the generated SQL under the hood).
Fixes#7213 by reacting to new `isBigInteger` and `asBigInteger` messages. Adjusts tests to require `BigInteger` when appropriate. `EnsoBigInteger` no longer extends `Number`. Enso tests to come.
- Closes#5951
- Ensures any SQL warnings reported by the database through the JDBC driver are processed and forwarded to the user.
- These warnings show issues like the implicit name truncation that this PR is also solving. It's good to make sure they are visible as they can help avoid and understand unexpected problems. They should not show up in most standard workflows.
- Adds simple history to our REPL.
- 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.
We can't really control the timing of file watcher events, which sometimes leads to failures of VCS tests. The PR disables the file watcher in the `VcsManagerTest` suite to make tests more stable.
Changelog:
- add: a `Watcher` and `WatcherFactory` interfaces
- add: a `NoopWatcher` test watcher
- update: disable the file watcher in the `VcsManagerTest` suite
close#7345#7254 introduced a delayed shutdown timeout. The `LanguageServerGateway` timeout should include the delayed shutdown time to prevent false timeouts.
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>