- #9779 introduced (incorrect) detection to determine when to inject the Google Analytics tag. Instead, it should be injected by CI, because sending Google Analytics events is undesirable in development mode.
# Important Notes
None
- Closes#9778
- Add `open_app`, `close_app`, `open_workflow`, and `close_workflow` events
- Miscellaneous fixes for Google Analytics:
- Fix `open_chat` and `close_chat` events firing even when chat is not visible
- Add Google Analytics script to GUI2 entrypoint (i.e. the entrypoint used by the desktop app)
Unrelated changes:
- Add Nix development shell to allow Nix users to build GUI2 and the build script
- Java dependencies have *not* been added in this PR to keep things simple
# Important Notes
None
Fixes: #8522
Execution context is refactored slightly: now we have a single `sync` function to synchronize both visualization and execution stack.
Tested hibernation on Linux: I was able to continue my work 🎉
# Important Notes
The Refinement Notes state, that the execution mode should be set before updating the stack, but actually it makes an error on startup (changing context automatically re-executes programs, what fails if there's no frame on the stack).
Copying nodes:
- Multiple nodes supported.
- Node comments and user-specified colors included.
- Google Sheets data can be pasted to produce a `Table` node, handled the same way as Excel data.
# Important Notes
- Fix E2E tests on OS X.
- Add E2E and unit tests for clipboard.
- Use the lexer to test text escaping; fix text escaping issues and inconsistencies.
Fixes#8520
If the websocket is closed not by us, we automatically try to reconnect with it, and initialize the protocol again. **Restoring state (execution contexts, attached visualizations) is not part of this PR**.
It's a part of making IDE work after hibernation (or LS crash).
# Important Notes
It required somewhat heavy refactoring:
1. I decided to use an existing implementation of reconnecting websocket. Replaced (later discovered by me) our implementation.
2. The LanguageServer class now handles both reconnecting and re-initializing - that make usage of it simpler (no more `Promise<LanguageServer>` - each method will just wait for (re)connection and initialization.
3. The stuff in `net` src's module was partially moved to shared's counterpart (with tests). Merged `exponentialBackoff` implementations, which also brought me to
4. Rewriting LS client, so it returns Result instead of throwing, what is closer our desired state, and allows us using exponentialBackoff method without any wrappers.
Fixes on of the issues in #9354
Stale method call info for inner sub-application was causing additional argument placeholders on the node for certain expressions. Now it is fixed:
1. We only create function widget for the most top-level expression in the prefix application chain.
2. We reuse method call info from inner expressions, assuming it will be always correct for our purposes.
https://github.com/enso-org/enso/assets/6566674/91d2b4ba-a789-4c7b-b40c-f09ac45da7f0
In GUI E2E `widgets.spec.ts`, be more specific about which tested dropdowns should be visible. Since the tested node actually receives two dropdowns, the test could fail by detecting both and expecting only one. Since we already have a very specific selector for the dropdown we are testing, use it instead of fresh global locator.
Fixes#9492
Implemented generic component for flawless size-based transitions, then used it for hiding arguments and dropdown animation. That replaced the `max-size`-based CSS animation that caused original issue. Refactored dropdown positioning to avoid further issues related to animation overflow clipping. The dropdown also got a bit of a lift to fit closer to styles in current Figma designs.
https://github.com/enso-org/enso/assets/919491/e85fd68c-b2e8-4d58-90e1-4fd7b33f1c9b
- Close https://github.com/enso-org/cloud-v2/issues/1161
- Add context menu option (and associated shortcut) to open a Data Link in a new project
# Important Notes
- The corresponding backend endpoints do not yet exist. The frontend currently passes an additional parameter `dataLinkId: string | null` to the backend's `create_project` endpoint. Note that this is inconsistent with the rest of the backend's terminology which calls Data Links `connector`s, so the parameter name might want to be changed.
Prevent interactions such as an open dropdown from being disrupted by the temporary state of absent type information occurring after an edit.
https://github.com/enso-org/enso/assets/1047859/bcc7fa02-847f-4cd0-b9fc-3186a97c5816
All widget-edit interactions that are active when a component is to be unmounted save state and are suspended. When a new component defining a `WidgetEditHandler` is instantiated, if the component is found to be equivalent to a component that was suspended, and no other interaction has been initiated in the interim, the interaction is restarted using the suspended state.
# Important Notes
- Fix a bug caused by a variable tracking an interaction's active state getting out of sync with the interaction. `WidgetEditHandler` now provides a reactive `active` property; using it is simpler and avoids this type of bug in the future.
- Fix a flickering bug that sometimes made it hard to open dropdowns by clicking the arrow.
Fixed a long-standing annoyance that widgets weren't fully hot-reloadable. Now when the widget definition (e.g. `score` function) is modified, it is hot-reloaded and new version immediately takes effect.
https://github.com/enso-org/enso/assets/919491/8e6d5a67-68ec-4353-8235-32657b32e2ec
# Important Notes
Because of how HMR API works, it needs to be passed from each widget module to the `widgetDefinition` function as an argument. When not provided, the definition will not be hot-reloadable (but the widget will still work as it used to).
#### Tl;dr
Closes: enso-org/cloud-v2#863
This PR adds the ability to restore user account after deletion(So called soft-deletion)
<details><summary>Demo Presentation</summary>
<p>
#### TODO: video
</p>
</details>
---
#### Context:
This PR closesenso-org/cloud-v2#863, and it's a frontend part of the issue.
#### This Change:
1) Change the texts in settings, clarifying that a user can restore his account in 14 days after deletion.
2) Adds a new page (`/restore-account`)
3) If the user logs into the soft-deleted account, the app navigates him to the restore page.
4) The user can't interact with the dashboard until he restores the account(If the user navigates to the dashboard, the app will redirect him back to the restore page)
5) On the restore page the user can click a "Restore" button to restore his account or log out.
6) If the user restores his account, the app navigates him to the dashboard.
#### Test Plan:
1. Try to delete the account and log back in, expect to see the restore page
2. Try to navigate to protected pages(dashboard, settings, etc)
3. Try to restore the account
4. Try to log out on the restore page
5. (ideally) try to restore the account after 14 days :)
---
Closes: enso-org/cloud-v2#1084
Tl;dr: This PR disable almost all actions in trash folder, except restore/hard delete.
Context:
Currently, we can do a lot of actions it trash folder: arrange files in folders, create new folders, edit files and so on. We want to disable most of these actions.
This Change:
- Disables d&d support within trash folder, but leaves the ability to drag thigs back to home folder.
- Disables most of the keyboard shortcuts(copy,paste,new...etc) except hard delete/restore
- Disables launching projects
- Disables rename
- Disables assigning labels
- Disabled editing the description & sharing
https://github.com/enso-org/enso/assets/61194245/35c6532d-719f-46b2-a2f7-b54b54856bbd
Test Plan:
This PR expects thorough testing to make sure we have disabled everything except hard delete/restore and the same way we didn't break the home folder :)
Enables distributed tracing for Sentry. Enables profiling information collection for calls to backend APIs, which means that traces/errors can be correlated across the frontend and backend now.
Fixes#6250
With this change, I've also slightly refactored the graph editor component by grouping related functionality into neat block and moving already loosely coupled groups to separate files. Further work will be needed to simplify it, but it is a good first step.
https://github.com/enso-org/enso/assets/919491/fedce111-ea79-463f-a543-da3ecce28bf5
- Fix https://github.com/enso-org/cloud-v2/issues/1156
- Fix reloading when the saved project uses the Local Backend
# Important Notes
To reproduce the error:
- Open a project in the Local Backend
- Close and reopen the IDE, or refresh the IDE.
- Fix#9619
- Fix issue causing the full path to be shown on Windows.
Additional changes:
- Add `npm run watch:windows` script to `lib/client` for developing on Electron.
# Important Notes
Testing instructions:
- Should ideally be tested on Windows. All the following should work:
- Creating, opening and deleting top-level projects
- Creating folders
- Creating, opening and deleting nested projects
- Uploading and deleting top level and nested files
- Moving folders, files and projects
When a node has an error/warning/panic that exactly matches one of its input nodes, hide the message until the node is interacted with, showing an icon.
https://github.com/enso-org/enso/assets/1047859/4b1b5e3d-c236-40d7-a3e7-e6ab8182ecd5
# Important Notes
- New icon is used for panics.
- Opening circular menu now shifts any message out of the way, not just warnings.
- Close#8610
# Important Notes
QA notes:
- The GUI2 warning screen should not show up - the arguments that GUI2 do not understand have been removed.
- However, it should be tested that the warnings screen should correctly work when invalid arguments really *are* passed in:
- Via URL query parameters (electron, might need to open the electron app then the browser, *or* do `location.href = ` in DevTools in Electron.)
- By editing `Editor.tsx` to inject invalid args to the big configuration object we pass to the GUI entrypoint.
- Close https://github.com/enso-org/cloud-v2/issues/982
- Add keyboard navigation via arrows between different components
- This is achieved by a `Navigator2D` class which keeps track of the closest adjacent elements.
Other changes:
- Switch much of the codebase to use `react-aria-components`
- This *should* (but does not necessarily) give us improved accessibility for free.
- Refactor various common styles into styled components
- `FocusArea` to perform automatic registration with `Navigator2D`
- `Button` and `UnstyledButton` to let buttons participate in keyboard navigation
- `HorizontalMenuBar` - used for buttons below the titles in the Drive page, Keyboard Shortcuts settings page, and Members List settings page
- `SettingsPage` in the settings pages
- `SettingsSection` in the settings page to wrap around `FocusArea` and the heading for each section
- Add debugging utilities
- Add debugging when `body` has the `data-debug` attribute: `document.body.dataset.debug = ''`
- This adds rings around elements (all with different colors):
- That are `FocusArea`s. `FocusArea` is a wrapper component that makes an element participate in `Navigator2D`.
- That are `:focus`ed, and that are `:focus-visible`
- That are `.focus-child`. This is because keyboard navigation via arrows ***ignores*** all focusable elements that are not `.focus-child`.
- Debug `Navigator2D` neighbors when `body` has the `debug-navigator2d` attribute: `document.body.dataset.debugNavigator2d = ''`
- This highlights neighbors of the currently focused element. This is a separate debug option because computing neighbors is potentially quite expensive.
# Important Notes
- ⚠️ Modals and the authentication flow are not yet fully tested.
- Up+Down to navigate through suggestions has been disabled to improve UX when accidentally navigating upwards to the assets search bar.
- There are a number of *known* issues with keyboard navigation. For the most part it's because a proper solution will be quite difficult.
- Focus is lost when a column (from the extra columns selector) is toggled - because the button stops existing
- It's not possible to navigate to the icons on the assets table - so it's current not possible to *hide* columns via the keyboard
- Neighbors of the extra columns selector are not ideal (both when it is being navigated from, and when it is being navigated to)
- The suggestions in the `AssetSearchBar` aren't *quite* fully integrated with arrow keyboard navigation.
- This is *semi*-intentional. I think it makes a lot more sense to integrate them in, *however* it stays like this for now largely because I think pressing `ArrowUp` then `ArrowDown` from the assets table should return to the assets table
- Likewise for the assets table. The reason here, however, is because we want multi-select. While `react-aria-components` has lists which support multi-select, it doesn't allow programmatic focus control, making it not particularly ideal, as we want to focus the topmost element when navigating in from above.
- Clicking on the "New Folder" icon (and the like) do not focus on the newly created child. This one should be pretty easy to do, but I'm not sure whether it's the right thing to do.
- Hide secret values by default using `input type="password"`. They can be shown and hidden using the eye icon, just like regular password inputs.
# Important Notes
None