Commit Graph

292 Commits

Author SHA1 Message Date
Michael Mauderer
38906b39da
Implement Lazy Text Visualisation. (#3910)
Implements [#183453466](https://www.pivotaltracker.com/story/show/183453466).

https://user-images.githubusercontent.com/1428930/203870063-dd9c3941-ce79-4ce9-a772-a2014e900b20.mp4

# Important Notes
* the best laziness is used for `Text` type, which makes use of its internal representation to send data
* any type will first compute its default string representation and then send the content of that lazy to the IDE
* special handling of files and their content will be implemented in the future
* size of the displayed text can be updated dynamically based on best effort information: if the backend does not yet know the full width/height of the text, it can update the IDE at any time and this will be handled gracefully by updating the scrollbar position and sizes.
2023-01-24 20:55:36 +00:00
Michael Mauderer
5b5a2be829
Use focus information to prevent new node creation on pressing enter in Project Name and Code Editor. (#4068)
This PR fixes the Component Browser opening when pressing enter while editing either the Project Name or the text in the Code Editor. This is achieved by using our focus management system to check whether something is focused. The Component Browser only appears if nothing else is focused.
2023-01-24 15:09:39 +00:00
Galin Bajlekov
aa995110e9
Separate component browser sections for every namespace libraries are imported from (#4044)
This PR adds new sections to the component browser section navigator bar. The sections are based on the namespaces from which libraries are imported. Selecting a namespace section from the navigator bar highlights the modules from that namespace. Selecting a module from a different namespace switches the navigator bar indicator to the correct namespace category. The currently selected namespace is also shown as the root of the breadcrumbs.

https://user-images.githubusercontent.com/117099775/212144719-2470a99d-8d8c-47ca-ab50-5bac65468090.mp4

For a new project where only the `Standard` namespace exists the only visible change is the breadcrumbs. Adding for example additional modules in the project `src` folder will create them in the `local` namespace, this namespace will show up as a separate navigator section.
2023-01-23 11:57:17 +00:00
Ilya Bogdanov
341b235fb1
Generate HTML for section headers and synopsis (#4038)
Two tasks:
- [Task link](https://www.pivotaltracker.com/story/show/184024127)
- [Task link](https://www.pivotaltracker.com/story/show/184024148)

This PR implements the generation of HTML from Documentation IR for section headers and the Synopsis section.
The synopsis contains documentation of the type/module + a list of the type's constructors.

https://user-images.githubusercontent.com/6566674/212684680-d999b525-56c7-4952-8ccc-192989acdf33.mp4

# Important Notes
- Paddings are removed from the documentation panel because they are now implemented in the HTML generator, but it doesn't affect the looks much (documentation still looks awful). All other changes do not affect the current look of the component browser and are only shown in the demo scene.


https://user-images.githubusercontent.com/6566674/212685347-addb9204-8441-44be-8d8e-3c2626d77f77.mp4
2023-01-18 13:18:26 +00:00
Adam Obuchowicz
503c680eb9
Fix CB making many frames for Undo-Redo (#4025)
The fix consists of two parts:
1. All the "review-apply" and "store temporary md" actions in the searcher controller are now guarded by an ignored transaction.
2. Because some of the temporary state may reach the UR frames assigned to other actions, added a bunch of code for removing all temporary expressions from the code and use it after restoring a frame. We may consider using it after project load as well.

### Important Notes

Added a useful method "log_err" to ResultOps (so every Result will have those).
2023-01-18 12:55:57 +01:00
Nikita Pekin
4ea1880dec
chore(183909391): Remove existing Cloud dashboard code (#4047)
* chore(183909391): Remove Cloud dashboard

* update changelog
2023-01-18 10:46:48 +03:00
Adam Obuchowicz
6c7c1c7d66
Additional shortcut for Redo (#4035)
Add a cmd+shift+z shortcut for redo while keeping alse the old one
2023-01-17 12:38:25 +00:00
Paweł Buchowski
8300d2f823
move hardcoded mixpanel token to the config (#3954)
Remove hardcoded mixpanel token and move it to the config class. This will allow for injection cloud's id and distinguish Enso Ide project from Enso Cloud in mixpanel.
2023-01-17 10:30:47 +00:00
Kaz Wesley
662992eb37
Replace tracing (#4017)
Logging: Replace tracing with an efficient logging implementation, with 0-runtime cost for disabled log levels. (https://www.pivotaltracker.com/story/show/183755412)

Profiling: Support submitting `profiler` events to the User Timing Web API, so that measurements can be viewed directly in the browser. (https://www.pivotaltracker.com/story/show/184003550)

# Important Notes
Logging interface:
- The macros (`warn!`, etc.) now take standard `format_args!` arguments (the tracing implementations accepted a broader syntax).
- Compile-time log levels can now be set through the CLI, like so:
`./run ide start --log-level=trace --uncollapsed-log-level=info`

Profiling:
- The hotkey Ctrl+Alt+Shift+P submits all `profiler` events logged since the application was loaded to the Web API, so that they can then be viewed with the browser's developer tools. Note that standard tools are not able to represent async task lifetimes or metadata; this is a convenient interface to a subset of `profiler` data.
- As an alternative interface, a runtime flag enables continuous measurement submission. In the browser it can be set through a URL parameter, like http://localhost:8080/?emit_user_timing_measurements=true. Note that this mode significantly impacts performance.
2023-01-16 20:31:01 +00:00
Paweł Grabarz
1578ed093a
Defer dropdown view initialization until opened and cache shaders between layers (#4046)
Fixes https://www.pivotaltracker.com/story/show/184216698

Reduced impact of node dropdown widgets on load times by deferring creation of grid views until each widget is opened. This also improves node editing time, as the dropdowns are not recreated immediately.

This approach of lazy initialization now caused a significant lag when opening the dropdown. Two major causes of the lag spike is glyph generation (msdfgen, `new_glyph`) and shader compilation (happened every time, because each dropdown has unique layer stack). To reduce the impact of that, the shader compiler now caches the shaders based on generated shader source. Glyph creation hasn't been changed and is still slow. The startup performance is now roughly where it was before introducing widgets.
2023-01-13 15:30:38 +00:00
James Dunkerley
ccde47e24e
Simple Warnings visualization. (#4043)
A simple first pass at showing warnings as a visualization.

![image](https://user-images.githubusercontent.com/4699705/212064721-6452d653-5421-4937-b70e-8ce58d92bff5.png)

Ideally, we would have a PayloadType which showed that the node had warnings attached to it, but that is significantly more work. So as a first pass to allow us to see the warnings, I have added a simple JS visualization.

Also update the file upload so puts valid code in.

https://user-images.githubusercontent.com/4699705/212096242-048b6301-6e7f-4c5b-a4e5-809640dbfb17.mp4
2023-01-13 11:28:57 +00:00
Ilya Bogdanov
6b8d8e9270
Implement documentation IR (#4024)
[Task link](https://www.pivotaltracker.com/story/show/184012434)

This PR implements Intermediate Representation for our documentation. Later these data structures would be used to generate HTML and CSS for the documentation panel. For now, we display it in the debug scene.


https://user-images.githubusercontent.com/6566674/210674850-480a3e6e-76c3-4f34-a235-15c44dc9ec01.mp4

# Important Notes
- `suggestion-database` now lives in a separate crate
- also, two utility crates were introduced for the `notification` and `executor` modules of enso-gui
- documentation debug scene is moved to a separate crate
- All refactorings are done in the last two commits
2023-01-12 14:50:33 +00:00
Adam Obuchowicz
fc62b3b60c
Fix for "When editing text if you Ctrl-Enter quickly it deletes some of the input" (#4040)
Fixes https://discord.com/channels/401396655599124480/1060273629729927180

The issue was caused by delay in refreshing component browser: if it did not pass when the user pressed enter or cmd+enter, the input was not refreshes in controller and thence in the edited/created node.
2023-01-12 10:24:41 +00:00
Paweł Grabarz
fe1cf9a9ce
Basic dropdown widget integration (#4013)
Implements https://www.pivotaltracker.com/n/projects/2539304/stories/184023445

Added a dropdown widget to graph node for all span tree nodes that have tag values present. When an option is selected, the controller receives a partial expression update, which targets specific crumbs of the expression (similar to how edge endpoint updates work).


https://user-images.githubusercontent.com/919491/210219931-8ae418fd-3ac4-44a5-abea-9e670f15cdf9.mp4

# Important Notes
Right now the dropdown widget is recreated every time the node is edited, including a dropdown option being selected. This causes it to close every time. I wanted to get around that by diffing span trees, but I wasn't able to do it in useful way. Additionally, current implementation of node input expression view heavily relies on being reinitialized from scratch every time. This led to more necessary changes than I was comfortable with for this task. I believe it will be easier to implement it as part of more complete widget support, especially after dynamic data support, as we will have proper widget type information.
2023-01-11 14:32:25 +00:00
Ilya Bogdanov
654a8351c8
Prune unused ids from metadata on loading file (#4033)
This PR fixes a bug reported in [Task](https://www.pivotaltracker.com/story/show/184159167).

To reproduce the issue, one can do the following steps:
1. Create a new project in the IDE.
2. Check the metadata section in the `Main.enso` file – `IdeMetadata` (a JSON object starting with `"ide":`) contains info for two nodes.
3. Edit the project in the external editor. For example, replace the expression of the second node.
4. Open a project in the IDE and observe the metadata. Now `IdeMetadata` contains three nodes – one unmodified, one added, and one no longer present. It leads to constantly growing metadata if you use an external editor.

This PR fixes the issue by pruning unused node metadata on loading.

No visual changes to the IDE were made.
2023-01-11 11:13:31 +00:00
Ilya Bogdanov
37af06b14d
Integrate Tailwind framework (#3999)
[Task link](https://www.pivotaltracker.com/story/show/183992025)

This PR moves the documentation visualization into a separate crate and sets up the Tailwind CSS framework for this new crate.

We would use Tailwind to style our HTML documentation.


https://user-images.githubusercontent.com/6566674/208719213-85f78f7e-8dc2-45d5-95a1-db4baad1bda1.mp4
2022-12-23 14:20:24 +00:00
Paweł Grabarz
4042b5b237
Grid-view based dropdown component (#3985)
Implements https://www.pivotaltracker.com/n/projects/2539304/stories/184023380

Dropdown component. Planned to be used in nodes as a single and multiple selection widget, both for static and dynamically loaded values. Initial support is focused on static data, with limited support for dynamic sources. Notably, loading states are not supported yet. Full support for that is planned to be added later with widget lazy-loading.

- Supports single and multiple selections.
- Dedicated API for providing a static list of all entries.
- Range-based query API for dynamically loading data as it is scrolled (only basic support - will need more work for proper async lazy-loading).
- Internal entry cache and query batching to avoid querying data one by one (the batching for now is very basic, will have to be improved for proper lazy-loading).
- Automatic dropdown width adjustment based on the entry label lengths, up to a set max allowed value.
- Open and close animation.
- Keyboard support for focusing and selecting entries.

![image](https://user-images.githubusercontent.com/919491/207866293-de2e3fef-c93b-48cc-8253-11c186d223fd.png)

# Important Notes
Implementing the dropdown on top of grid-view have uncovered some assumptions around grid-view layers. It was assumed to always be a part of the component browser. Removing that assumption required a mechanism for propagating camera update information through layer tree. This is now implemented using a `camera_parent` layer field. Ideally each layer should simply have at most a single parent, and camera inheritance would follow that. That refactor turned out to be quite involved, so right now the simpler temporary solution is introduced in order to not delay this PR further.
2022-12-22 18:19:40 +00:00
Dmitry Bushev
ee476eaf74
Clean restart on keypress (#3998)
A small adjustment to recompute shortcut. It makes sense to do a clean restart, instead of just re-executing the program.
2022-12-21 09:48:31 +00:00
Michał Wawrzyniec Urbańczyk
622c7ce326
Browser selection for wasm tests (#3994) 2022-12-21 05:35:42 +01:00
Michał Wawrzyniec Urbańczyk
e47d22321c
Allow overriding electron-builder target. (#3996) 2022-12-21 02:14:54 +01:00
Wojciech Daniło
be17f31dbf
Fixing set_size regression. (#3995) 2022-12-20 12:42:31 +01:00
Ilya Bogdanov
0e8616e8d7
Demo scene & DocSections in suggestion database (#3980)
[Task link](https://www.pivotaltracker.com/story/show/184000483)
[Task link](https://www.pivotaltracker.com/story/show/184012363)

This PR adds a new `documentation` demo scene that would be used while developing a new documentation panel.

Also, entries in the Suggestion database now store `DocSection`s provided by the engine, and we can mock them for testing purposes using the new `doc_section!` macro.

No changes in the documentation panel were made.


https://user-images.githubusercontent.com/6566674/207567074-5c5682df-a0e8-435c-b393-6f02b2969614.mp4
2022-12-20 11:35:36 +00:00
Ilya Bogdanov
dbe60d2466
Implement hierarchy index in suggestion database (#3992)
[Task link](https://www.pivotaltracker.com/story/show/184012397).

This PR adds a hierarchy index to our suggestion database. The index will be used in the future when building documentation pages. E.g., documentation of the Module includes all the Types defined in this module; documentation of the Type includes documentation for every Method and Constructor defined for this type.

We could call this index "self-type index", but the Type-Module relation is not using self-type.

No visual changes to the IDE were made.

# Important Notes
We rely on the order of updates from the engine. In particular, the following scenario would lead to inconsistency in the DB:
1. Engine sends an update, changing the parent module of some type to "NonExistentModule"
2. Engine sends an update, adding a new entry "NonExistentModule"

I assume that the engine would never send the update with a non-existent qualified name used.
2022-12-20 02:16:19 +00:00
Galin Bajlekov
4b28f8f8f0
Visual indication of outdated VCS snapshot (#3950)
This PR provides a visual indication of whether the project's current state differs from the most recent snapshot saved in the VCS. The project name displayed in the IDE changes to a darker text to indicate that the VCS snapshot is outdated, and back to a lighter text when the current project state corresponds to the last saved VCS snapshot.

https://user-images.githubusercontent.com/117099775/208088438-20dfc2aa-2a7d-47bf-bc12-3d3dff7a4974.mp4

The outdated project snapshot indicator is set when:
* A node is moved.
* A node is added or removed.
* The text editor is used to edit the text.
* The project is auto-saved, and the auto-saved project state does not correspond to the last saved snapshot in the VCS.

The outdated project snapshot indicator is cleared when:
* A new project snapshot is successfully saved using `ctrl+s`.
* The project is auto-saved, and the auto-saved project state is confirmed to correspond to the last saved snapshot in the VCS. This occurs, for example, when a project change is undone and the project is reverted to the last saved snapshot state.

The auto-save events do not occur immediately after a project change but have a short delay, thus the VCS status update is affected by the same delay when triggered by an auto-save event.
2022-12-19 21:22:33 +00:00
Wojciech Daniło
06cfafca09
Auto Layouts (#3937) 2022-12-19 02:16:54 +01:00
Adam Obuchowicz
a6b5db9021
Update Component Browser only when user stops typing. (#3991)
Currently on every keystroke we try to refresh the Component Browser content. Due to some performance problems one refresh can take > 500 ms, so several keystrokes can hang our app for few seconts.

This PR mitigates this problem by refreshing the CB only when 200 ms passes since last keystroke. It should not be problematic for the user (actually many search engines, like this in IntelliJ do this), but we avoid choking our app with multiple CB refreshes at once.
2022-12-18 19:17:49 +00:00
Michał Wawrzyniec Urbańczyk
a2d8c1d0ab
Fix directing JSON data to JS visualizations. (#3984) 2022-12-15 11:29:09 +01:00
Dmitry Bushev
3e74afca51
misc: bump wasm-pack (#3983) 2022-12-14 18:45:39 +01:00
Ilya Bogdanov
285959835f
Scroll the documentation panel when it is hovered by the mouse (#3968)
[Task link](https://www.pivotaltracker.com/story/show/183970810).

Now documentation panel is being scrolled when only hovered by the cursor (you don't need to click on it beforehand).

Tested on macOS with both the touchpad and the mouse.

https://user-images.githubusercontent.com/6566674/206667769-04aae6b2-91ff-4877-bf10-8c0f0c4c5873.mp4
2022-12-14 16:37:04 +00:00
Michał Wawrzyniec Urbańczyk
965d1ff28b
Bump wasm-bindgen (#3971)
This PR brings wasm-bindgen (and related crates) to the latest version. I've also removed patching code, so future updates should be much easier.
2022-12-13 22:20:25 +01:00
Dmitry Bushev
957279153a
Add a shortcut for interrupting the program (#3967)
Add shortcuts for interrupting and restarting the program execution.
2022-12-12 17:48:42 +00:00
James Dunkerley
79de5eecd9
Move Create New Project button to top. (#3972)
- Moves the Create button to the top.
- Adjust default project to also bring in Table and Database.
2022-12-12 15:30:36 +00:00
James Dunkerley
6eb30c37a5
Small tweak to convert Date and Time objects to strings in Table viz. (#3953)
Currently, Date, Time_Of_Day and Date_Time are rendered as `[Object object]` in the table.
![image](https://user-images.githubusercontent.com/4699705/206166467-a08c8a78-af63-4b2e-93d7-4f4d4190f117.png)

This makes them render in simple text format.
2022-12-09 00:10:26 +00:00
Ilya Bogdanov
82dabd329d
Show default mouse cursor over documentation panel (#3951)
[Task link](https://www.pivotaltracker.com/story/show/183970777)

The default mouse cursor is now displayed over the documentation panel.


https://user-images.githubusercontent.com/6566674/205954491-177fcc01-7e15-4a5c-825e-c0b02be527cc.mp4
2022-12-08 18:50:19 +00:00
Dmitry Bushev
20fd9f4b96
Ensure project name starts with uppercase (#3947)
Fixes the regression when IDE fails to create a project from template. Project name should start with an upper case letter to pass the server side validation.
2022-12-06 17:43:33 +00:00
Michał W. Urbańczyk
f8834f5a63 formattind, moving data collection note before the changelog 2022-12-06 17:32:41 +01:00
Ilya Bogdanov
43b79e4569
Skip and Freeze macros in IDE (#3913)
[Task link](https://www.pivotaltracker.com/story/show/180886630).

This PR implements support for adding/removing skip and freeze macros on nodes by clicking on corresponding buttons.

This PR does not touch the parser and engine side, so `skip` and `freeze` macros return syntax errors.

https://user-images.githubusercontent.com/6566674/205052940-440553ae-1761-4452-927d-c3c39620e20a.mp4

# Important Notes
- `skip` and `freeze` macros are not working with the new parser. The code currently produces syntax errors. This would be fixed as a separate task {TBD link}
2022-12-06 14:48:28 +00:00
Ilya Bogdanov
410204a3d9
Update component browser design (#3935)
A continuation and replacement for #3832

This PR updates the design of the component browser to match the latest Figma design file.


<img width="588" alt="Screenshot 2022-12-02 at 16 52 51" src="https://user-images.githubusercontent.com/6566674/205297344-d8d46e68-8c46-4e5a-b7f5-5e23014df23f.png">


https://user-images.githubusercontent.com/6566674/205297307-659c633c-a977-4c9f-9903-db72958895b7.mp4

# Important Notes
- Invalid color of the section navigator highlight is caused by a regression [#183915546](https://www.pivotaltracker.com/story/show/183915546)
2022-12-05 17:43:27 +00:00
Nikita Pekin
bd455ffabd
feat(183557950): Add ProjectsGrid View for Cloud Dashboard (#3857)
This PR is a draft PR while I learn EnsoGL. The eventual goal is to implement the projects list portion of the cloud dashboard in this PR. This PR will implement part of https://www.pivotaltracker.com/n/projects/2539513/stories/183557950

### Important Notes

This PR is still really rough and contains a lot of hacks & hard-coded values. The FRP usage is also likely to be suboptimal and need fixing.
2022-12-04 05:41:56 +01:00
Galin Bajlekov
a2b57b4eb6
Make a VCS save on ctrl+s shortcut (#3923)
Save a snapshot of the project directory to the VCS on `ctrl+s`. If the operation fails because the VCS was not initialized previously, it will try to initialize the VCS first and then save a snapshot.
2022-12-02 12:39:11 +00:00
Paweł Grabarz
6e1666e8b1
enable node labels by default and keep their position up to date (#3932)
Fixes https://www.pivotaltracker.com/n/projects/2539304/stories/183899185


![image](https://user-images.githubusercontent.com/919491/204636854-77f0a860-1cdb-4b0f-a925-292afbaa874a.png)
Screenshot taken while holding ctrl, so all labels are visible.

# Important Notes
The node labels config option default switched to true. The fact that this is configurable can potentially explain why it was rougly working for some people, but not other. Apart from that, the labels position update is also now fixed, so it is properly drawn next to the node.
2022-11-30 19:57:49 +00:00
Paweł Grabarz
1285dbd809
Reapply node output regression fix that got reverted by accident (#3928)
Reapplies a change from #3886 

### Important Notes

There is no new code here. This change got accidentally reverted in #3890 and needs to be reapplied.
2022-11-30 13:35:33 +01:00
Adam Obuchowicz
73a09e2d5b
Fix node still editing after accepting Expression Input (#3905)
So far this branch contains more diagnostics, and PR is for building PRs for @sylwiabr .
2022-11-30 06:24:54 +00:00
Michael Mauderer
c7c555314a
Bump rustc nightly-2022-11-22 (#3911) 2022-11-30 03:16:25 +01:00
Wojciech Daniło
717325f472
removing optional dependencies from prelude (#3922) 2022-11-28 12:42:31 +01:00
Michał Wawrzyniec Urbańczyk
e31e3ccefb
Bumping JS dependencies (#3901) 2022-11-28 11:31:57 +01:00
Michał Wawrzyniec Urbańczyk
1b52ae239f
macOS signing fix: replace unzip with 7za (#3912) 2022-11-27 03:43:18 +01:00
Wojciech Daniło
d60e3835f2
Display object refactoring (#3877) 2022-11-25 07:49:52 +01:00
Adam Obuchowicz
d79b7df886
Make Component Browser code generation valid and other fixes. (#3890)
This PR fixes the `code_to_insert` method of entry to insert valid code according to the newest language version. Also created a separate method for getting imports required by given entry.

Now, method entries do not add imports (except when they are extensions), and are insterted with place for this type `_.method`. Static methods and constructors are inserted with the type name, and proper import for type is added.

There are some additional work done:
* The ReferentName and NormalizedName were removed, as we are now case-sensitive.
* All QualifiedName structures were replaced with new one in `name` module, as there is no longer functional difference between type qualified name and module qualified name.
* The QualifiedName structure removes "Main" module segment where it is not necessary, thus simplifying our code base and avoiding potential issues.
* Added macro `mock_suggestion_database` which should make creating consistent mocks of SuggestionDatabase much simpler.
* Fixed bug where the visualization preview show no value for some time.

https://user-images.githubusercontent.com/3919101/202750275-0d378d5f-1482-4637-bdcd-c428a9eac0d4.mp4

# Important Notes
The tests in controller/searcher.rs file are not of the best quality, but those will be overhauled anyway when implementing my next task.
2022-11-24 20:34:13 +00:00
Adam Obuchowicz
76ede71f2c
Fix lambda removing when it gets connection inside (#3899)
This is a part 1 of the fix for https://discordapp.com/channels/401396655599124480/1041669067188219914/1041669067188219914

Every time the node would have a connection going into a lambda body, the entire lambda in the destination node was replaced with the input variable. That because the lambda for some reason is not decomposed into span tree, and the presenter created a connection going to the port spanned over the entire lambda, and then thought this was a connection created by the user.

Such connections, going into "inside" of the span tree, should not break nodes expression, so they are not displayed at all after this fix. The proper fix will be making span-tree lambda decomposition, but it will be a next PR.
2022-11-22 17:22:22 +00:00
Paweł Grabarz
ae9380856f
Remove unnecessary watcher in dev server (#3896) 2022-11-22 16:07:58 +01:00
Michael Mauderer
9361cfe3ff
Implement TextGridView (#3819)
Implements [#83453449](https://www.pivotaltracker.com/story/show/183453449).

https://user-images.githubusercontent.com/1428930/197791213-f2e0ec69-5fe0-4482-aaaa-673ca5fcacc9.mp4

# Important Notes
* refactors some part of the visualization API to allow integration of EnsoGL UI components that require access to an `Applciation` struct (instead of just a `Scene` which was available before)
* extends the JS API mock library
2022-11-18 18:52:28 +00:00
Paweł Grabarz
f287ee16a9
set node output size on expression change (#3886)
Fixes regression about inaccessible node output port. https://www.pivotaltracker.com/n/projects/2539304/stories/183792368

Additionally, a related issue related to nodes not being visible after initial load has been uncovered and fixed in the process.

# Important Notes
Previously the output shape size was only updated when node size itself was updated. When node's expression was changed, the output port view is recreated from scratch, but the current node size has not been propagated to the newly created port. In some cases the node size was changed shortly after, masking the bug. In other cases, the newly created shape size was never set.

The port size management has been moved from model method into frp network, and the initial size value is emitted during network initialization.
2022-11-18 16:32:39 +00:00
Paweł Grabarz
88e40479d1
Rust compile time optimizations (#3873) 2022-11-15 14:09:39 +01:00
Wojciech Daniło
77934e09f7
Focus management (#3863) 2022-11-14 10:09:49 +01:00
Dmitry Bushev
14012a751f
Add parent type field to suggestion (#3846)
PR adds `parentType` field to the `Type` suggestion. All Enso types have parent type except `Any`.
2022-11-07 13:21:04 +00:00
Wojciech Daniło
48ce68cda1
Wip/wdanilo/text shape system single scene 183406745 (#3776) 2022-11-03 08:35:06 +01:00
Dmitry Bushev
a6ce49e8a5
Split Atom suggestion entry to Type and Constructor (#3835)
Changelog:
- update: split `Atom` suggestion to `Type` and `Constructor`
- update: gui API
- update: JSONRPC doc
2022-11-02 09:53:40 +00:00
Adam Obuchowicz
c4a7e28fb5
Recognize unqualified import syntax in double representation library. (#3816)
Fixes [#183511669](https://www.pivotaltracker.com/story/show/183511669)

This PR improves the `ImportInfo` structure from Double Representation crate so it provides information what names are brought into the scope with this import. The from_ast method also recognized [various ways of defining imports](https://github.com/enso-org/enso/blob/develop/docs/syntax/imports.md)

# Important Notes
The parser seems to not recognize properly imports with aliases. I have not fixed that, as we expect a new parser to be merged very soon.
2022-10-27 13:22:06 +00:00
Dmitry Bushev
3a8aa90f1b
Document no changelog label (#3833) 2022-10-27 15:28:34 +03:00
Adam Obuchowicz
639f612adf
Update shortcuts to reflect Component Browser design docs. (#3823)
When no node is edited, `Enter` creates a new one (opening Component Browser). The shortcut for entering node was changed to `cmd + Enter`
2022-10-25 17:21:12 +00:00
Ilya Bogdanov
c2b82b9934
Editing via esc does not correctly update node view (#3799)
Fixes https://www.pivotaltracker.com/story/show/182926584
[Task link](https://www.pivotaltracker.com/story/show/183426449)

This PR fixes an IDE freeze introduced by https://github.com/enso-org/enso/pull/3732 and reimplements reverting edited nodes to their previous state.

The cause of the IDE freeze is quite interesting. A detailed investigation is available [here](https://gist.github.com/vitvakatu/785e34881368b8cfda61715d7543cbd0).

The graph editor needs to update the Presenter state only if the user is editing the node. Before this PR, the graph editor notified the Presenter with a visual representation of the node content instead of code expression. It caused inconsistency between the states of the controller and Presenter and caused severe performance issues.

https://user-images.githubusercontent.com/6566674/195831224-6d6e8258-e347-48b4-890a-d89c7300bc39.mp4

# Important Notes
- ~~There is a more complex alternative solution – it requires refactoring of the `component::node::input::area` module. The Presenter can be notified with `expression.code` changes, not `expression.viz_code`. I found a simpler solution (`.gate(&edit_mode)`), which has the same effect but does not require additional refactoring.~~ Said solution is implemented in a separate commit
2022-10-25 15:37:49 +00:00
Mateusz Czapliński
81e5e77ae8
A caption when hovering the marketplace button on the left bar of Component Browser (#3783)
When hovering the mouse pointer over the Marketplace button on the left bar of the Component Browser, show a caption informing that the Marketplace will be available soon.

https://www.pivotaltracker.com/story/show/182613789

#### Visuals

The video below demonstrates the caption shown when hovering the Marketplace button on the left bar of the Component Browser. It shows the caption disappearing after a hardcoded time, or when the mouse pointer is moved away from the button.







https://user-images.githubusercontent.com/273837/196195809-45a712e1-ad86-47d8-99ff-1475a0b74c6e.mov

# Important Notes
- The "Label" visual component was fixed. Previously, the width calculation of the background was not synchronized correctly with the text width. As a result, a zero-width background was displayed when a Label was shown for the first time.
2022-10-19 16:07:40 +00:00
Ilya Bogdanov
78b8f43b96
Show section name in breadcrumbs (#3778)
This PR implements displaying a currently active section name as a first crumb in the breadcrumbs panel. Sections are called `Popular`, `Modules` and `Local`.


https://user-images.githubusercontent.com/6566674/194551276-90bd7d6b-8509-43ec-b3c0-11c35fda9063.mp4

# Important Notes
This PR also contains a fix for [this bug](https://www.pivotaltracker.com/story/show/183499312). It was caused by mistake in the FRP implementation of the breadcrumbs. You could only trigger this bug after code changes in the `animation/loop.rs` module. It is not possible to see it otherwise. Still, the code was not correct, and now it is fixed.
2022-10-17 13:26:40 +00:00
Adam Obuchowicz
148d32e4c3
Component Browser with Grid View (#3766)
This PR introduced an overhauled Component List Panel implementation, making use of the efficient EnsoGL grid view component. Also, it delivers a couple of new features:
* A part of the new design: there are no more section headers in grid, instead groups are "glued" together. The local scope section is under "popular" (old "favorites").
* The keyboard management inside grid works.
* there is a mouse hover highlight
* selecting the lowest entry in section when jumping with navigation bar.
* accepting input as-is with cmd/ctrl + Enter.

https://user-images.githubusercontent.com/3919101/194561890-fffb9b41-2f0d-4357-8d9a-5038a6bcb023.mp4


### Important Notes

**What is not implemented:**
* [Focus management between panels.](https://www.pivotaltracker.com/story/show/180872763) The grid is always focused. To accept the current input, use ctrl+Enter shortcut.
* [Proper handling of selection when having empty space on the right and pressing right arrow.](https://www.pivotaltracker.com/story/show/183487880)
* When entering a module, its name is not added to the input as described in the design doc. Will be a part of [this User Story](https://www.pivotaltracker.com/story/show/181058321).

**Known issues**
* [the selection, especially in the local scope section, has sometimes an undesirable offset](https://www.pivotaltracker.com/story/show/183487730). The cause is known, but not so easy to fix.
* The inserted nodes are often producing errors. The Browser's inherits the outdated understanding of the language from old Node Searcher, and it does not include new form of imports, static methods etc. Those all will be fixed as a part of [this User Story](https://www.pivotaltracker.com/story/show/181058321).
* The performance is improved, but still not ideal, due to problems in [text areas](https://www.pivotaltracker.com/story/show/183406745).
* To scroll the documentation panel, you must first click on it.
2022-10-14 12:42:59 +02:00
Adam Obuchowicz
6c3a95296b
Sign MacOS package on CI only (#3788) 2022-10-12 00:32:08 +02:00
Michał Wawrzyniec Urbańczyk
ad69eeb4ad
Build script merge (#3743)
Merged the build script into main repository. Some related cleanups.
2022-10-10 23:38:48 +02:00
Adam Obuchowicz
4152962161
Fix text sync with Engine (#3779)
There was a regression introduced by PR #3678 with text synchronization between IDE and the Engine. This PR fixes it.

It was reproducible as an error log about version mismatch in a case when the metadata becomes shorter (e.g. on removing node).

# Important Notes
[ci no changelog needed]
2022-10-10 12:41:08 +00:00
Wojciech Daniło
61546a7ade
Wip/wdanilo/widgets 182746060 (#3678) 2022-10-04 04:51:27 +02:00
Ilya Bogdanov
0d74ab6124
Breadcrumbs integration (#3720)
[ci no changelog needed]
[Task link](https://www.pivotaltracker.com/story/show/182675703)

This PR implements the actual integration of the breadcrumbs panel with the component list panel. A special breadcrumbs controller (`controller::searcher::breadcrumbs`) is tracking the currently opened module with a list of its parents. The searcher presenter uses the API of the controller to sync the displayed list of breadcrumbs with the controller state.


https://user-images.githubusercontent.com/6566674/193064122-7d3fc4d6-9148-4ded-a73e-767ac9ac83f8.mp4

# Important Notes
- There is an `All` breadcrumb displayed at all times at the beginning of the list. It will be replaced with a section name as part of [Section Title on Component Browser's Breadcrumbs Panel](https://www.pivotaltracker.com/story/show/182610561) task.
- I changed the implementation of `project::main_module_id`, `project::QualifiedName::main_module`, and `API::main_module` so that they are logically connected which each other.
- I adjusted the Breadcrumbs View to avoid "appearance" animation glitches when opening new modules. `set_entries` was replaced with the `set_entries_from` endpoint.
2022-10-03 10:54:09 +00:00
Ilya Bogdanov
146b8a5695
Revert "Editing via esc does not correctly update node view (#3732)" (#3751)
This reverts commit 98ace6a1d1.
2022-09-30 16:42:05 +02:00
Dmitry Bushev
15084feaa6
Remove here keyword (#3749)
Changelog
- Remove `HERE` keyword
- Replace `here` with module name when generating code
2022-09-29 18:34:17 +00:00
Jaroslav Tulach
835ac05218
Engine should send notification about node status (#3729)
When nodes get invalidated in the cache, they have to be recomputed. Let the IDE know which of the nodes are pending by sending `Api.ExpressionUpdate.Payload.Pending` message.

# Important Notes
This PR introduces new `Api.ExpressionUpdate.Payload.Pending` message. This message is delivered before re-computation of nodes. Later `Api.ExpressionUpdate.Payload.Value` or other is sent to notify the IDE that a value for given node is available.

Trivial implementation of of the `Api.ExpressionUpdate.Payload.Pending` message in the IDE is provided by this PR to (improperly) visualize pending node status - further improvements needed in follow up PRs.
2022-09-28 12:35:12 +00:00
Michael Mauderer
98ace6a1d1
Editing via esc does not correctly update node view (#3732)
Fixes https://www.pivotaltracker.com/story/show/182926584


https://user-images.githubusercontent.com/1428930/191850310-b52e07ec-d3b8-4f27-b15d-fc0944ce48ab.mp4

# Important Notes
[ci no changelog needed]
2022-09-26 12:49:07 +00:00
Michał Wawrzyniec Urbańczyk
6a56ceb147
Disable wasm-opt for all the entry point crates (#3734)
This PR disables the wasm-opt optimization in the crates that can be used as WASM entry points. Unfortunately, wasm-pack does not allow for disabling wasm-opt through a command line flag, so we have to disable it by setting an appropriate flag in each Cargo.toml.
2022-09-23 22:01:06 +02:00
Michael Mauderer
ff3c481601
Correct import handling when selecting items from the component browser #182634001 (#3708)
Implements [Task #182634001 ](https://www.pivotaltracker.com/story/show/182634001)

Handles adding and removing of imports for the visualization preview of suggestions.


https://user-images.githubusercontent.com/1428930/190930045-fcbd44b7-d3d8-4f20-a178-8542190b86de.mp4

# Important Notes
[ci no changelog needed]
2022-09-23 14:30:51 +00:00
Mateusz Czapliński
760469a4ac
Ensure the Visualization Is Opened on the Edited Node when the Component Browser is Opened. (#3714)
Show the visualization when a newly created node is being edited. Hide it after the editing is finished, unless the user explicitly changed the state of the visualization.

https://www.pivotaltracker.com/story/show/182634059

#### Visuals

The following video shows the behavior of the visualization when a new node is created by the user and is being edited:
- By default, the visualization is shown when the node becomes edited and disappears when the node's expression is accepted.
- If the user clicks the visualization toggle button once while editing the node, the visualization disappears and stays disabled after the node's expression is accepted.
- If the user clicks the visualization toggle button twice while editing the node, the visualization is visible and stays enabled after the node's expression is accepted.

This PR is not concerned with the correctness of the contents of the visualization window. This is in line with the current behavior on the `develop` branch, where clicking the visualization toggle button while editing a newly created node shows `null` content in the visualization (even if the edited expression is not null).



https://user-images.githubusercontent.com/273837/191294970-62143983-764a-446c-9616-9765de0923bf.mov
2022-09-21 16:00:27 +00:00
Adam Obuchowicz
50c8ecc255
Component Browser Entry (#3718)
This PR contains an entry definition for Grid View to be used inside Component List Panel View. The Example grid view with the entry definition may be seen on new_component_list_panel_view debug scene.

https://user-images.githubusercontent.com/3919101/190663278-23c35ab0-f426-4001-8128-df7147aafb9e.mp4

# Important Notes
* The styling is not detailed yet due to time constraints (I want to move to integration this grid view to Component Panel List ASAP) and the fact that I could not get new mplus1 font working with text Area.
* Implementing this required adding a "contour offset" feature to the Grid View.
2022-09-21 14:10:16 +00:00
Michał Wawrzyniec Urbańczyk
d6bd80011f
Fixing yargs and electron-builder regressions (#3725)
This PR reverts two version bumps from #3712:
* `yargs` needs to be downgraded, because a never version can trigger https://github.com/evanw/esbuild/issues/2441
* `electron-builder` needs to be downgraded, because our workaround for https://github.com/electron-userland/electron-builder/issues/6865 proved insufficient.

As the upstream issues are resolved, we should bump these dependencies again.
2022-09-21 11:32:20 +02:00
Ilya Bogdanov
97a28eed2d
Entering modules in component browser (#3719)
[ci no changelog needed]

[Task link](https://www.pivotaltracker.com/story/show/181870304).

This PR implements Controller-level support for entering modules in the component browser.

Clicking headers/entries opens the module, filling the Local Scope and Submodules sections.

Please ignore multiple visual issues with the component browser on the screen - this PR does not cause them, and they will be fixed soon when we change the implementation of the component list panel to Grid View.

https://user-images.githubusercontent.com/6566674/190933275-c544ea8d-529d-4b49-820f-d36874344572.mp4

# Important Notes
- We will implement the actual breadcrumbs integration in a separate PR: https://www.pivotaltracker.com/story/show/182675703
- The FRP changes in the component list panel code are temporary. The GridView-based implementation will later replace most of the boilerplate.
2022-09-19 20:12:17 +00:00
Michał Wawrzyniec Urbańczyk
10f45d7fd1
macOS Code Signing & Notarization (#3712)
This PR reenables code signing and notarization on macOS.

[ci no changelog needed]

# Important Notes
* electron-builder has been bumped, mostly to avoid missing Python issue. A workaround for a regression with Windows installer is provided as a patch.
2022-09-19 19:02:18 +00:00
James Dunkerley
d6346e9d66
Renaming various constructors and moving types around for Database. (#3715)
Repairing the constructor name following the types work. Some general tiding up as well.

- Remove `Standard.Database.Data.Column.Aggregate_Column_Builder`.
- Remove `Standard.Database.Data.Dialect.Dialect.Dialect_Data`.
- Remove unused imports and update some type definitions.
- Rename `Postgres.Postgres_Data` => `Postgres_Options.Postgres`.
- Rename `Redshift.Redshift_Data` => `Redshift_Options.Redshift`.
- Rename `SQLite.SQLite_Data` => `SQLite_Options.SQLite`.
- Rename `Credentials.Credentials_Data` => `Credentials.Username_And_Password`.
- Rename `Sql` to `SQL` across the board.
- Merge `Standard.Database.Data.Internal` into `Standard.Database.Internal`.
- Move dialects into `Internal` and merge the function in `Helpers` into `Base_Generator`.
2022-09-19 12:39:40 +00:00
Ilya Bogdanov
a771e40002
Component browser breadcrumbs (#3686)
[ci no changelog needed]

[Task link](https://www.pivotaltracker.com/story/show/181445628).

This PR implements a Breadcrumbs panel for the new component browser.
The Breadcrumbs is a horizontal list of text labels separated by a special icon and has an optional ellipsis icon at the end.
It is implemented using the new GridView component.

Video:

Demo of adding new breadcrumbs, scrolling behavior, and selecting breadcrumbs with the mouse.


https://user-images.githubusercontent.com/6566674/189199432-77807cef-00dc-4abe-b95c-b17a536f59f6.mp4

Demo of selecting breadcrumbs with keyboard shortcuts:


https://user-images.githubusercontent.com/6566674/189199603-53e55335-73ba-4ed7-8291-4455144c06aa.mp4

# Important Notes
- This PR implements an old interaction of the design of the component browser. The new design of the breadcrumbs can not be easily integrated into the current look of the component browser, so we would need to update styles later. It should be a relatively simple task. *The implementation uses color from the new design though. (but not fonts and sizes)*
- I found a bug in the grid view implementation that causes panics at runtime in some conditions. The reason is triggering FRP endpoints while constructing new entries. This issue is fixed in the PR.
2022-09-19 09:21:52 +00:00
Michael Mauderer
545e1d7ce9
Show Visualisation Preview when Selecting Item on Searcher (#3691)
Implements [#182634050](https://www.pivotaltracker.com/story/show/182634050).

Enables visualization previews for selections in the searcher.

Works for the old Searcher and the new Component Browser, but it was easier to show the examples for the old searcher, as the suggestions seem to be better/faster available currently (this will improve with the new implementation using better strings and the new GridView).

https://user-images.githubusercontent.com/1428930/188898560-fc4f412a-1529-49f7-9958-28bf5e01c001.mp4

Aborting an edit now also correctly reverts a node.


https://user-images.githubusercontent.com/1428930/188898549-ddd41294-2571-4e2e-b6d5-909cbf71de04.mp4
2022-09-16 16:05:40 +00:00
Michael Mauderer
fa2e42c4e7
Fix Regression: Node not selected after adding. (#3698)
Fixes nodes not being selected after creating a new node through the searcher.

https://user-images.githubusercontent.com/1428930/189626404-a1c34bd9-3341-4644-951d-578f29eaa4d9.mp4



[ci no changelog needed]
2022-09-12 22:36:11 +00:00
Dmitry Bushev
f233ea66b3
Use Mplus1 font (#3688)
Use Mplus1 font in the welcome screen.

# Important Notes
#### Before:
![ide-causten](https://user-images.githubusercontent.com/357683/188605189-b37d4545-7b35-469f-8497-b026d1ce2e75.png)

#### After
![ide-mplus1](https://user-images.githubusercontent.com/357683/188605262-b46597b8-a622-4740-9b78-17a2f71ddaa1.png)
2022-09-09 12:47:34 +00:00
Michał Wawrzyniec Urbańczyk
b8dd92e9dc
CI and build script update (#3677)
* added polyfill globals plugin to fix issue with missing types like Buffer that was affecting nightly releases;
* fixed exit code propagation for Windows build script wrapper;
* bumped the build script and refreshed the generated workflows.

Includes https://github.com/enso-org/ci-build/pull/8
2022-09-02 22:02:44 +02:00
Dmitry Bushev
de0a231417
IDE uses new visualization API (#3661) 2022-09-01 15:33:46 +03:00
Jaroslav Tulach
d4b4a31d89
Split long lines to 1024 long chunks (#3665)
Avoid long lines when using `dom().set_inner_text` - rather split the long lines to 1024 chunks and insert them as individual `<div>` elements.

# Important Notes
I was testing the behavior on following program:
```
from Standard.Base import all
import Standard.Base.Data.Statistics
import Standard.Visualization

main =
number1 = 200000
operator1 = 0.up_to number1 . to_vector . map .noise
operator2 = operator1.sort
operator3 = operator2.to_text
```
before my change the visualization of `operator3` was blank. With my change it gets filled with data.
2022-08-29 08:02:33 +00:00
Wojciech Daniło
4b96b4887c
Better fonts support. (#3616) 2022-08-27 00:25:34 +02:00
Michael Mauderer
14c516aff3
Add api for updating searcher with selected component (#3659)
Implements [#182593882](https://www.pivotaltracker.com/story/show/182633582).

Adds API for updating Searcher with the selected suggestion. To-dos are left in the places where this will be implemented in a subsequent PR for the next task.

**Example of the debug output generated by typing into the searcher.**

![ShowSearcherInputLog](https://user-images.githubusercontent.com/1428930/186120851-7292824c-7c6e-444e-8453-5f2d234f3244.png)

**Example of the debug output generated by selecting something in the searcher.**

![ShowSearcherSelectionLog](https://user-images.githubusercontent.com/1428930/186120857-d9610eba-04fd-4e65-bb9e-71ec7bfe361d.png)

# Important Notes
For testing/QA set the `app/gui/src/lib.rs:145` logging initialization to `DEBUG` to see the console output.

[ci no changelog needed]
2022-08-26 08:33:19 +00:00
Michał Wawrzyniec Urbańczyk
4537a4b57b
Adjusting CI / build configuration. (#3664)
* Downgrading the electron-builder to avoid https://github.com/electron-userland/electron-builder/issues/6865
* Removed "git clean" workaround from CI.
2022-08-25 00:46:36 +02:00
Adam Obuchowicz
610b128bfa
Component Panel List Layout structure. (#3662)
This PR does not add anything visual for the user: it's a first part of making efficient Component Browser using fresh Grid View implementation.

The Layout is an intermediate model, which keeps the information how the groups are laid out in the Component browser, and allows querying for group entry by location and location of specific group entry (or header).

The layout is meant for the new design, where there are no section separators and Local Scope section is below Favorites.

# Important Notes
The new structure is not used in action, but tested with unit tests.
2022-08-24 19:00:31 +00:00
Jaroslav Tulach
2b9352d2fc
Lazy scatterplot for Vector & Table (#3655)
First of all this PR demonstrates how to implement _lazy visualization_:
- one needs to write/enhance Enso visualization libraries - this PR adds two optional parameters (`bounds` and `limit`) to `process_to_json_text` function.
- the `process_to_json_text` can be tested by standard Enso test harness which this PR also does
- then one has to modify JavaScript on the IDE side to construct `setPreprocessor` expression using the optional parameters

The idea of _scatter plot lazy visualization_ is to limit the amount of points the IDE requests. Initially the limit is set to `limit=1024`. The `Scatter_Plot.enso` then processes the data and selects/generates the `limit` subset. Right now it includes `min`, `max` in both `x`, `y` axis plus randomly chosen points up to the `limit`.

![Zooming In](https://user-images.githubusercontent.com/26887752/185336126-f4fbd914-7fd8-4f0b-8377-178095401f46.png)

The D3 visualization widget is capable of _zooming in_. When that happens the JavaScript widget composes new expression with `bounds` set to the newly visible area. By calling `setPreprocessor` the engine recomputes the visualization data, filters out any data outside of the `bounds` and selects another `limit` points from the new data. The IDE visualization then updates itself to display these more detailed data. Users can zoom-in to see the smallest detail where the number of points gets bellow `limit` or they can select _Fit all_ to see all the data without any `bounds`.

# Important Notes
Randomly selecting `limit` samples from the dataset may be misleading. Probably implementing _k-means clustering_ (where `k=limit`) would generate more representative approximation.
2022-08-23 12:12:22 +00:00
Michał Wawrzyniec Urbańczyk
2507a2049b
Code Signing on Windows (#3654)
This PR reenables code signing on Windows.
Each Windows package built on CI should be now signed.
Additionally, some refactorings were done around electron-builder config, so it is easier to use outside the build script and offers more configuration options.
2022-08-23 00:49:23 +02:00
Michael Mauderer
58fb383791
Create new node when opening searcher and no node is selected. (#3645)
So far, when opening the searcher with no node selected, an empty input without an associated AST node was created. This input was manipulated by the user and the final expression from the input was used to create a new node when the user confirmed their input. This PR changes this, so that when the searcher is opened without a selected node, a new AST node is created right away with some placeholder content, and this node is updated when the user confirms their input.

The only change visible to the user, is that if the text editor is opened during editing, a new node will appear in the source when the searcher is opened to create a new node. All other behaviour should stay the same.
2022-08-22 15:32:44 +00:00
Mateusz Czapliński
fc089857d0
Filtering of Virtual Entries in Component Browser by input & return types. (#3652)
Filter the Virtual Entries displayed in the Component Browser based on the input type and the return type of the edited expression. Only the Virtual Entries with matching types are displayed.

https://www.pivotaltracker.com/story/show/182842444

#### Visuals

See below for two screenshots, showing the Component Browser with an empty expression and with the input port not connected. Two virtual entries are visible, with documentation.

<img width="871" alt="Screenshot 2022-08-16 at 15 19 55" src="https://user-images.githubusercontent.com/273837/184894042-0f64986d-2c89-4c94-90cf-215467e297c7.png">

<img width="866" alt="Screenshot 2022-08-16 at 15 20 04" src="https://user-images.githubusercontent.com/273837/184894059-5089414c-c1f3-407c-a6da-38fd9c3e7c81.png">

See below for a screenshot showing the Component Browser with `5.div ` expression entered. The `div` method expects an `Integer` argument. Only the `number input` virtual component is visible.

<img width="504" alt="Screenshot 2022-08-16 at 15 23 07" src="https://user-images.githubusercontent.com/273837/184894081-358ae780-cfca-4002-b7da-4be57f0357c1.png">

See below for a screenshot showing the Component Browser with `Geo.point ` expression entered. The `point` method expects a `Decimal` argument. Only the `number input` virtual component is visible.

<img width="500" alt="Screenshot 2022-08-16 at 15 24 37" src="https://user-images.githubusercontent.com/273837/184894119-d4f5e7e1-5948-4d8f-adc4-f94a2f4c7245.png">

See below for a screenshot showing the Component Browser with `5.format ` expression entered. The `format` method expects a `Text` argument. Only the `text input` virtual component is visible.


<img width="480" alt="Screenshot 2022-08-16 at 15 55 27" src="https://user-images.githubusercontent.com/273837/184897598-465569c8-8319-43ac-9589-4384ffdc33cc.png">

See below for a video showing that the Component Browser opened with the input port connected to a typed node. The Component Browser does not show virtual entries.

https://user-images.githubusercontent.com/273837/184914619-957a7369-1019-4636-989d-96d65954642f.mov

# Important Notes
- Unused code from the old `enso_gui::controller::searcher::action::hardcoded` module is removed. The `enso_gui::controller::searcher::component::hardcoded::Snippet` type is redefined to contain only the used fields from the old `action::hardcoded::Suggestion` type.
2022-08-18 09:40:41 +00:00
Mateusz Czapliński
3c12a8c0a2
Virtual Entries in Component Browser (#3621)
Add "text input" and "number input" virtual entries in the "Input" virtual component group in the Component Browser. The entries provide an easy way to put strings and numbers into a graph.

https://www.pivotaltracker.com/story/show/181870589

#### Visuals

See below for a video showing the "text input" and "number input" virtual entries in the "Input" component group in the "Favorites Data Science Tools" section of the Component Browser. Please note that the video also displays a few known issues that are present in the existing code and not introduced by this PR:

- "Opening the Component Browser 2nd or later time flashes its last contents from the previous time" - reported as [issue 15 in PR 3530](https://github.com/enso-org/enso/pull/3530#pullrequestreview-1035698205) (which is [expected](https://github.com/enso-org/enso/pull/3530#issuecomment-1187676313) to be fixed by https://www.pivotaltracker.com/story/show/182610422).
- The text of all the entries in the Component Browser does not show immediately, but the entries appear one by one instead (this is related to the performance of the current implementation of Component Browser and Text Area).
- Selection in the Component Browser can show half-way between entries - reported as https://www.pivotaltracker.com/story/show/182713338.

https://user-images.githubusercontent.com/273837/183472391-c14eeded-481f-492e-a1b8-b86f42faf0cd.mov

# Important Notes
- The virtual entries are not filtered by input type or return type. The filtering is expected to be implemented in https://www.pivotaltracker.com/story/show/182842444.
2022-08-17 13:28:07 +00:00
Michał W. Urbańczyk
146297a0a0 CR feedback 2022-08-16 15:38:10 +02:00
Michał Wawrzyniec Urbańczyk
6c82588972
Handling exceptions in IDE main to avoid entering "zombie process" state. (#3648)
This is meant to address https://www.pivotaltracker.com/story/show/182691027.
2022-08-16 12:56:08 +00:00