Commit Graph

411 Commits

Author SHA1 Message Date
Kaz Wesley
e1aeebd57e
Use external IDs for stable selection tracking. (#10314) 2024-06-19 17:52:56 +00:00
Kaz Wesley
3f70307a88
Pan capturing (#10304)
Panning or zooming "captures" wheel events. While events are captured, further
events of the same type will continue the pan/zoom action. The capture expires
if no events are received for 250ms. A trackpad capture also expires if any
pointer movement occurs.
2024-06-19 12:49:38 -04:00
somebody1234
ccfeac1c02
Move to the Tab layout for Dashboard (#9918)
⚠️ This PR depends on #9896 and MUST NOT be merged before that one.

- Close #9898
- Move right menu to Drive View
- Use new icon for toggling the menu
- Move Search Bar into Drive View
- both of these changes come with free simplifications to the code.
- Refactor entire Top Bar to show pages as tabs
- Fix https://github.com/enso-org/cloud-v2/issues/1301
- Remove grey background from arrow icon visible when hovering over directory rows

# Important Notes
- Fonts containing slight variants have been added to make it match more closely with the Figma design. HOWEVER:
- They have been added in `app/gui2` instead of the Dashboard codebase, because that is where the existing Enso font is located.
- While it's definitely possible to put them in the Dashboard codebase, I think it's preferable to avoid that, otherwise we will have two separate mechanisms for loading/packaging fonts.
- However, this problem SHOULD go away if (if not when) the entrypoints for the desktop app (in `app/gui2`) and cloud.enso.org (in `app/ide-desktop/lib/dashboard`) are merged.
2024-06-19 15:24:11 +00:00
Adam Obuchowicz
ef2f5f993d
Visualization Preview (#10310)
Fixes #8533

Visualization is shown when pressing ctrl (cmd on mac) and hovering output port.

[Screencast from 2024-06-18 17-06-59.webm](https://github.com/enso-org/enso/assets/3919101/4963eaa7-8b96-4fdb-af09-70de68c6df57)
2024-06-19 13:46:51 +00:00
Adam Obuchowicz
7eeea8e1c8
Fix autoscoped constructor dynamic widget config (#10297)
Fixes #10238

Updated the way we construct `get_widget_json` visualization configuration to take into account cases when there is no known self argument.

As this is a bit of logic, I moved parts of WidgetFunction to a separate composable for easier testing. Most if it was just moved: meaningful changes were only in selfArgumentExternalId and visualizationConfig.
2024-06-18 14:35:10 +00:00
marthasharkey
0fc3755d1b
Disable clickThrough for get nodes for anything thats datatype is not JS_Object (#10286) 2024-06-18 08:27:20 +00:00
Paweł Grabarz
07955f870b
Add test for usePropagateScopesToAllRoots (#10226)
Added missing test for `usePropagateScopesToAllRoots` that was added in #10172.
Also testing against the default Vue behavior, since it is possible that a future update will make the workaround obsolete.
2024-06-17 12:09:35 +00:00
marthasharkey
bb16db9c79
Remove legacy matrix and legacy objects from table visualization and remove the index column (#10260)
- remove legacy matrix and object types from vue component and any further code relating to those
- remove the index and index header being sent in the json for tables
- add has_index_col flag for json hat previously sent 'indicies_header' and 'indicies' so that index/# column is still rendered where required
2024-06-17 09:17:20 +00:00
Kaz Wesley
904ffe1dd6
Support empty and non-numeric default values in number picker (#10251)
Numeric default (unchanged):
<img width="400" alt="Screenshot 2024-06-11 at 10 19 21" src="https://github.com/enso-org/enso/assets/1047859/24549125-f7bd-4017-b04f-b9e8715203b1">

Non-numeric default:

https://github.com/enso-org/enso/assets/1047859/bfe812e2-4d1c-477b-9500-f384fa499890

No default:
<img width="400" alt="Screenshot 2024-06-11 at 10 19 36" src="https://github.com/enso-org/enso/assets/1047859/e99dcb0f-f146-4005-b4e5-79223fbe7744">

Closes #9449.
2024-06-13 17:43:35 +00:00
somebody1234
b053ab53e2
Dashboard hotfixes (#10271)
- Fix the appearance of the `tertiary` button variant
- Fix spinner for projects that are opening being misaligned by 1px
- Fix appearance of "Login with Google" and "Login with GitHub" icons in the Login page
- Fix #10279
- Switch to Local tab when on desktop app and user does not have an active plan

# Important Notes
None
2024-06-13 16:57:50 +00:00
Kaz Wesley
1096642fae
Fix numeric slider (#10267)
Prevent default pointerdown action from interfering with slider.

https://github.com/enso-org/enso/assets/1047859/736a01ca-9cdb-4163-8cd5-e3c1d7e15552

Fixes #10090.

# Important Notes
- Also fix drag detection when the slider is dragged and returned to its original position.
2024-06-13 16:03:09 +00:00
Hubert Plociniczak
6163733cf0
Add an option to profile AppImage (#9998)
* Add an option to profile AppImage

Add `-debug.profile` on startup to turn on the profiler on a local
machine and dump data to `profiling.npss` file. Previously not possible
in a standalone setup.

Useful for #9789.

* fix linter

* fix linter warning

* more linting

* lint
2024-06-13 17:01:50 +02:00
Kaz Wesley
0ff2ed6cc3
Add divider to numeric slider (#10268)
https://github.com/enso-org/enso/assets/1047859/5a9ba761-dfec-4ec7-99ce-3088556e63e4

Closes #10234.

# Important Notes
- Tested in combination with #10267, though they can be merged separately.
2024-06-13 13:03:43 +00:00
Kaz Wesley
aaf0e3da6a
Output port interaction hint (#10264)
When hovering an output port, show a dimmed edge to the mouse.

https://github.com/enso-org/enso/assets/1047859/90b6e67e-9036-4eb0-bc18-9550d610c923

Closes #10195.
2024-06-12 17:57:25 +00:00
Kaz Wesley
3e37faa34d
Change grab cursors; fix some bugs (#10215)
Change grab cursors:
- Node has grab/grabbed icons for only halo and icon.

Fix bugs:
- Empty part of top bar no longer blocks mouse events.
- JSON viz: Clickable parts of inline elements now use pointer cursor when hovered.
- Doc panel breadcrumbs: Icon can be clicked (behavior now consistent with cursor shown).

https://github.com/enso-org/enso/assets/1047859/3e48a6c1-3f43-497f-82ad-eb787e9c9643

Closes #10166.

# Important Notes
- New global `clickable` class replaces `cursor: pointer`; the class can be applied closer to the event handler.
- Refactor: Extracted `GraphNode` output port logic to a new component.
2024-06-12 14:09:50 +00:00
Paweł Grabarz
0e17beba73
Implement text ellipsis on dropdowns (#10198)
Fixes #10091

https://github.com/enso-org/enso/assets/919491/148d117a-8f2c-4176-b0c8-c7d2390173c3
2024-06-12 13:13:48 +00:00
Kaz Wesley
8423f31884
Format bar: Use icons from #10242 (#10252) 2024-06-12 09:03:53 -04:00
marthasharkey
55af1b9ffd
Add icon to indicate value type in table (#10225)
closes #10018

Sends the value type within the json for table visualisation
Header uses a html template to show it's value type to the right of the title
Displays the value type also in a tooltip, this displays the types "display_text"

<img width="392" alt="image" src="https://github.com/enso-org/enso/assets/170310417/0828e6a2-b30f-4ac7-9a8f-46b4a9cfac91">


tooltip:
<img width="498" alt="image" src="https://github.com/enso-org/enso/assets/170310417/f9964f90-9337-42d3-a0ef-3c58f6d74621">
2024-06-12 09:06:55 +00:00
Adam Obuchowicz
a2c4d94735
Fix arrow keys in text inputs (#10244)
Fixes #10239

# Important Notes
This is a quick fix, but we may consider better focus handling - perhaps the graph editor should be focusable?
2024-06-11 16:12:35 +00:00
AdRiley
19c50ceff9
Add icons (#10242)
Fixed duplicate text name.

Added

![image](https://github.com/enso-org/enso/assets/1720119/cc80e991-549e-4629-b0bc-81e58c2e93d8)

![image](https://github.com/enso-org/enso/assets/1720119/39ffccb7-99f5-4464-9b01-69c978972865)
2024-06-11 12:05:42 +00:00
Ilya Bogdanov
e502023922
Copy paste multiple nodes (#10194)
Closes #9424


https://github.com/enso-org/enso/assets/6566674/c0c5a524-ea6a-41f6-9fea-c94431211f33
2024-06-11 09:26:55 +00:00
Kaz Wesley
d7689b3357
Show images in documentation (#10205)
Render markdown image syntax in documentation. Relative URLs are fetched from the project directory; absolute URLs are hotlinked from wherever they point.

Syntax and URL resolution:
```
# In New_Project27/src/Main.enso

## Main method docs
- Image at `New_Project27/src/image.jpg`: ![Image](image.jpg)
- Image at `New_Project27/image.png`: ![Image](../image.png)
- Image at `New_Project27/src/image.jpg`: ![Image](/src/image.jpg)
- Image at `New_Project27/image.png`: ![Image](/image.png)
main =
42
```

https://github.com/enso-org/enso/assets/1047859/3f873f3f-31b1-44bf-ae3e-2f467f2d546d

Closes #10058.

# Important Notes
Stacked on #10064.
2024-06-10 14:15:36 +00:00
Paweł Grabarz
b0589d267d
Implement new design for tooltips in GUI (#10172)
Fixes #10088, #10154

Implemented figma tooltip design through Vue components and store. Attached tooltips to all existing SVG buttons, based on assigned label property.


https://github.com/enso-org/enso/assets/919491/85f5fef7-c6df-471b-b544-b45f45f4f51e

# Important Notes
Removed all usages of `v-bind` in styles due to issues during hot reloading when updating stores. The internal CSS binding composable sometimes crashes when the component is being unmounted due to hot reload.
2024-06-07 01:48:11 +00:00
Adam Obuchowicz
291db8aa07
Moving nodes or camera with arrows (#10179)
Fixes #10029

[Screencast from 2024-06-05 11-40-50.webm](https://github.com/enso-org/enso/assets/3919101/8dcb9099-5489-488c-86dc-560325e84f52)
2024-06-06 16:47:02 +00:00
Kaz Wesley
1b60e2531f
Fix visualization z-indexes (#10158)
Prevent visualizations (such as table) and visualization container (including toolbar) from drawing above widgets (such as dropdown).

<img width="245" alt="image" src="https://github.com/enso-org/enso/assets/1047859/51b86256-1d6d-4cf1-9e88-3b36d13f39b8">

Dropdown now covers visualization toolbars.

<img width="245" alt="image" src="https://github.com/enso-org/enso/assets/1047859/b7fe9e47-4121-47a5-9b8a-335449d25734">

Dropdown now covers table column resize handle.

Fixes #9783.
2024-06-03 17:58:12 +00:00
Sergei Garin
28655e13d7
Frontend adjustments for Stripe refactoring (#10054)
#### Tl;dr
Closes: enso-org/cloud-v2#1185
This PR changes endpoints according to the comment left by @PabloBuchu: https://github.com/enso-org/cloud-v2/issues/1185#issuecomment-2114606101


#### This Change:
Changes endpoint names and fixes subscription flow

---
2024-05-31 09:59:25 +00:00
Adam Obuchowicz
2ca2533a89
Adjust plus button position and new node created. (#10124) (#10127) 2024-05-31 08:26:45 +00:00
Adam Obuchowicz
65737b34f5
Consider currently written path when opening file browser (#10076)
We pass the current path as default to show(Open|Save)FileDialog.

# Important Notes
There is `wrapper` method of Ast, I assumed it is suitable also for Groups.
2024-05-30 07:25:25 +00:00
Paweł Grabarz
322662ee9d
Implement node ports below visualizations (#10113)
fixes #9830, #10108

![image](https://github.com/enso-org/enso/assets/919491/8ae50912-1dfb-4389-b51a-44022b334b89)
2024-05-29 13:20:53 +00:00
Adam Obuchowicz
f9ffa47e32
Fix record once (#10109)
Fixes #10103
2024-05-29 10:34:32 +00:00
marthasharkey
a9f14b1da9
Add check for null values in table visualization (#10116) 2024-05-28 16:24:25 +00:00
Dmitry Bushev
858e646328
Start Ydoc with the language server (#9862)
- related #7954

Changelog:
- update: Ydoc starts with the language server on the `localhost:1234` by default. The hostname and ports can be configured by setting environment variables `LANGUAGE_SERVER_YDOC_HOSTNAME` and `LANGUAGE_SERVER_YDOC_PORT`
- update: by default `npm dev run` uses the node Ydoc server. You can control it with `POLYGLOT_YDOC_SERVER` env variable. For example,
```
env POLYGLOT_YDOC_SERVER='true' npm --workspace=enso-gui2 run dev
```
To connect to the Ydoc server running on the 1234 port (the one started with the language server)
⠀
```
env POLYGLOT_YDOC_SERVER='ws://127.0.0.1:1235' npm --workspace=enso-gui2 run dev
```
To connect to the provided URL. Can be useful for debugging when you start a separate Ydoc process.
- update: run `npm install` before the engine build. It is required to create the Ydoc JS bundle.
2024-05-28 13:51:42 +00:00
Paweł Grabarz
8edf49343f
Expose cloud event logging endpoint to GUI and render GUI editor as react component. (#9951)
fixes #9730

Added a `logEvent` method to remote backend implementation in dashboard. Added an always-present remote backend instance that can be used for logging even when running a local project (intentional behavior).

# Important Notes
Because the backend implementation requires access to always fresh session token, the logger needs to be periodically updated on GUI side, so it can continue to function. To accomplish that, I simplified the app loading logic to treat GUI as an ordinary react component, so its props can be updated with normal react rendering flow. That refactor also removed the dynamic GUI asset loading code that was only needed for Rust GUI.
2024-05-27 17:32:42 +00:00
Adam Obuchowicz
a00d8bfca6
Restore old way of methodAst (#10096)
Fixes #10082
2024-05-27 13:19:36 +00:00
Paweł Grabarz
ca916b823e
Generalize keyed local storage for more client side graph-editor data (#9990)
Fixes #9938

The documentation panel openness and size state are saved in localStorage. On initial graph entry, the documentation panel is automatically opened if the graph's function is documented.
2024-05-27 12:53:16 +00:00
James Dunkerley
200da1ad50
Remove old GUI1 ICONs and mapping function (#10086)
* Remove old GUI1 ICONs and mapping:

```
  dataframe_clean: 'table_clean',
  dataframe_map_row: 'map_row',
  dataframe_map_column: 'column_add',
  dataframes_join: 'join2-1',
  dataframes_union: 'union',
  sigma: 'transform4',
  io: 'in_out',
  date_and_time: 'time',
  spatial: 'location',
  predictive: 'predict',
  machine_learning: 'robot',
  split_text: 'split',
```

* Linter.

* Linter (2).

* Sort out some Returns:

* Sort out some ? Example
2024-05-27 11:17:21 +01:00
Kaz Wesley
ca53b69dfb
Heading levels (#10078)
Larger h1 to enable three levels of headings.

<img width="508" alt="Screenshot 2024-05-24 at 07 38 31" src="https://github.com/enso-org/enso/assets/1047859/53e77040-30c2-4ed0-bfb5-81d4a703a565">

Fixes #10051.

# Important Notes
Refactored Lexical styling.
2024-05-24 21:27:18 +00:00
Kaz Wesley
ac5fbbcd17
Format bar support APIs (#10063)
Introduce APIs that will be used by the Markdown formatting bar UI; use new APIs to simplify `ExtendedMenu`.

# Important Notes
New APIs:
- `DropdownMenu`: Encapsulates the dropdown pattern, i.e. a toggle button that opens a floating pane.
- `MenuButton`: A low-level control that adds button behavior to any element; all other buttons are now implemented using it.

Changes:
- `ToggleButton` and `SvgButton` now accept an optional `label` parameter.
2024-05-24 16:34:57 +00:00
marthasharkey
a383819439
Right align numbers and format numbers if one is greater than 10000 (#10038)
- right aligns numbers with 'cellClass' method
- adds check of all data in column to decide whether to comma separate numbers
2024-05-24 15:28:35 +00:00
Kaz Wesley
b45e9e9c54
Backspace and delete delete nodes (#10075) 2024-05-24 10:57:45 -04:00
AdRiley
204fb3e9cb
Add new icons (#10070)
![image](https://github.com/enso-org/enso/assets/1720119/b57e7a2c-3d59-404c-bc15-ab69829f648d)

Icons for showing types in the table Viz.

Text, Datetime, boolean (check), mixed
2024-05-24 14:12:02 +00:00
Kaz Wesley
001e8caf67
Selection formatting toolbar (#10027)
* Selection formatting toolbar

* Icons

* Review

* Fix bold+italic rendering

* Preparing for top bar

* Refactor
2024-05-24 10:01:53 -04:00
Adam Obuchowicz
0f6b29c88f
Make background clicks less flaky (#10069)
We had some false test failures: https://github.com/enso-org/enso/actions/runs/9178969067/job/25240028635

The problem was the connection, which, while not being completely broken, still wasn't updated to proper position, thus taking clicks meant for the background. Now, I use proper locator click, so the test should wait for click spot being clear.

Also added locator-based clicks where I felt it's proper.
2024-05-24 13:28:51 +00:00
Adam Obuchowicz
8ac0ee41c6
Allow picking non-existing files in write component (#10047)
Fixes #9984

Added a flag to `File_Browse` widget configuration specifying if we require an existing file. Also, the FileBrowserWidget will match against all "Writable_File", also displaying Save dialog.
2024-05-24 09:21:32 +00:00
Adam Obuchowicz
a0a6f8c302
Tooltips (#10039)
First solution for #9828, just using HTML `title` attribute.
2024-05-23 07:52:39 +00:00
Kaz Wesley
dd5fa61d90
Add copy button to component messages. (#10023)
Add button to component messages that copies the message to the system clipboard.

https://github.com/enso-org/enso/assets/1047859/ab645ecd-78d6-4602-b210-9f0041f4329b

Closes #9878.
2024-05-22 16:38:21 +00:00
Adam Obuchowicz
8ba12356fe
Rename function widget (#9959)
Fixes #9790

Adds a new widget type which allows renaming the called function - if we are able to do it.
2024-05-22 15:07:39 +00:00
AdRiley
f000cf6999
Add copy2 icon (#10036)
![image](https://github.com/enso-org/enso/assets/1720119/90b0883f-cc0d-411e-8d3c-f62458243982)
2024-05-22 15:07:36 +00:00
Kaz Wesley
fcfc081851
Use group icon for components created by grouping. (#10020)
Use `group` icon for components created by grouping.

https://github.com/enso-org/enso/assets/1047859/50a0dbb6-d36e-4fcb-9f39-b6493b8cca86

See: #9831.

# Important Notes
- This PR always sets the icon, but it is not always shown due to missing updates from the backend; this issue is currently being investigated.
2024-05-22 14:38:21 +00:00
Sergei Garin
91a2afb098
Fix broken login flow (#9965)
* kill the electron process instead of restarting

limit the port range with single one

Make ENSO_CLOUD_REDIRECT optional, use window.location.origin by default

* Revert server changes

* limit the amount of ports in server
2024-05-22 16:56:42 +03:00