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>