Commit Graph

96 Commits

Author SHA1 Message Date
Ilya Bogdanov
698a6a0674
Left align component browser to the edited node (#3636)
[ci no changelog needed]

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

This PR changes the relative position of the edited node in such a way that it is left-aligned to the component browser window. This change reflects the most recent version of the [design doc](https://github.com/enso-org/design/blob/main/epics/component-browser/design.md#overview)

<img width="1157" alt="Screenshot 2022-08-08 at 19 15 47" src="https://user-images.githubusercontent.com/6566674/183454192-81960e0a-ab69-43a4-b7df-d13320a9d16d.png">

As an additional change, the FRP implementation of the `Camera2d` was extended with a new output (screen dimensions) and fixed. With the old implementation, there was a possibility of panic at runtime because of non-exclusive borrows of `RefCell`. The FRP event for camera position was emited inside the scope with a mutable `RefCell` borrow. Any attempt to borrow the camera one more time (e.g., by calling one of the getters, such as `zoom()`) caused panic at runtime.
2022-08-09 23:03:54 +00:00
Adam Obuchowicz
7f8190e663
Grid view selection and hover (#3622)
This PR adds a new variant of selection, where the mouse-hovered entry is highlighted and may be selected by clicking.

In the video below, we have three grid views with slightly different settings:
* In the left-top corner, both hover and selection highlight is just a shape under the label. Such a grid view does not require additional layers (when compared to non-selectable grid view).
* In the left-bottom corner the hover is normal shape, but selection is a _masked layer_ which allows us to have different text color. This setting requires three more layers to render.
* In the right-top corner, both hover and selection are displayed in the masked layer, creating 6 additional layers.

https://user-images.githubusercontent.com/3919101/181514178-f243bfeb-f2dd-4507-adc3-5344ae0579b7.mp4
2022-08-01 10:54:42 +00:00
Ilya Bogdanov
987333e1d3
Component Browser Section Navigator (left bar) (#3553)
[ci no changelog needed]
[Task link](https://www.pivotaltracker.com/story/show/181433641)

This PR adds a left bar with section navigation buttons to the Searcher List Panel. The buttons are implemented as a list view with an adjusted style.

https://user-images.githubusercontent.com/6566674/179517378-dba00f41-d32e-4ffb-a4d9-3cd376b3e781.mp4
2022-07-20 06:35:26 +00:00
Adam Obuchowicz
7fa4e5e369
Grid View with Scrolling (#3588)
**Note**: This PR also contains content of previous Grid View PR. We decided to discard the previous, because this one did some refactoring of old one, and it's not a big addition.

Added a scrollable::GridView component, which just embeds the GridView in ScrollArea. Also, re-worked the idea of text layers.

https://user-images.githubusercontent.com/3919101/179020359-512ee127-c333-4f86-bff5-f1cb4154e03c.mp4
2022-07-19 08:39:23 +00:00
Adam Obuchowicz
b0d627a797
Component list panel integration (#3530)
This PR contains all work for finishing integration of first Component List Panel in the IDE:
* It adds a stub for the whole Component Browser View. The documentation panel is re-used from the old searcher.
* It has the presenter implementation, integrating the view with Hierarchical Component List from the controller.
* It extends the View API, so the integration is possible, making use of Component Group Set wrapper.
* The selection integration was also merged into this PR, because it depended on the API extension mentioned above. However, we should avoid such practice in the future.

https://user-images.githubusercontent.com/3919101/177816427-8c4285b4-8941-4048-a400-52f4acf77a9f.mp4

# Important Notes
There are some known issues, to-be-fixed in the future.
* The performance is bad. It should be improved with new text::Area, and the decent one shall come with [GridView inside component browser](https://www.pivotaltracker.com/story/show/182561072)
* There is no keyboard navigation. It should also be delivered with [GridView](https://www.pivotaltracker.com/story/show/182561072).
* The Favorites section is not [filtered out by node source type](https://www.pivotaltracker.com/story/show/182661634).
2022-07-14 12:00:52 +00:00
Mateusz Czapliński
c1aa4aac87
Embedded-fonts crate should contain constants with font names. (#3403)
Add constants for font names. This reduces the number of "magic strings" and helps avoid typos in font names in the codebase.

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

[ci no changelog needed]
2022-07-12 09:05:10 +00:00
Mateusz Czapliński
d950499a90
Pan camera to created nodes. (#3552)
If a node created by the user gets placed off-screen, the screen's camera is panned to make the node visible.

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

#### Visuals

A screencast showing a number of node creation scenarios when the camera is panned to the newly created node, including when zoomed out.



https://user-images.githubusercontent.com/273837/177169716-50a12b0a-c742-4b01-9766-56206e7938b9.mov

# Important Notes
- Camera is panned also if the node is only partially visible, or if there's not enough free space visible around the node. The specific amount of free space that needs to be visible around a newly created node is configured in the theme.
- If the screen area is so small that the node cannot be fully fit in it (either horizontally or vertically), showing the left and top boundaries of the node's area takes priority over showing the corresponding opposite edges.
2022-07-06 10:33:35 +00:00
Michael Mauderer
1b0312b446
Avoid patching the file msdfgen_wasm.js more than once. (#3560)
Adds a fix for a build issue where the `msdfgen_wasm.js` file gets patched multiple times, which breaks the build.
[ci no changelog needed]
2022-07-04 19:07:52 +00:00
Mateusz Czapliński
2b2563a395
Implement trivial placeholder icons for all 5 Component Browser entry kinds. (#3557)
Implement simple placeholder icons for all entry kinds supported in the Suggestion Database. The icons are planned to be used in Component Browser as default icons for entries. This is intended to allow visually distinguishing different entry kinds.

The following additional fixes and tweaks are applied:
 - Icons previously using only 1 color from the theme now use the color provided through shape parameters instead.
 - The `data_science` and `network` icons now use only the 2 colors provided through shape parameters.
 - The `join` icon has its shape and colors modified and uses only the 2 colors provided through shape parameters.
 - The demo scene now parametrizes icon shapes using colors from the Component Browser Design Doc.

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

#### Visuals

Original contents of the demo scene before the PR:

<img width="2197" alt="x-orig" src="https://user-images.githubusercontent.com/273837/176669422-ee2e14c7-9ef4-42fd-acb7-ae3be6b68587.png">



Final contents of the demo scene after the PR:

<img width="2201" alt="x2-final" src="https://user-images.githubusercontent.com/273837/176668720-6f1685fd-f7e6-44d7-85f5-f6a6d6789644.png">
2022-07-04 16:36:27 +02:00
Michael Mauderer
e6b7d5b8fc
List Panel View Part 2 (#3537)
Design, integration and bugfix update for the List Panel View.

![image](https://user-images.githubusercontent.com/1428930/175554745-c4887d55-a885-4299-878b-4727f09a7520.png)

![image](https://user-images.githubusercontent.com/1428930/175554906-837db815-948d-4407-8233-10a15e4198b3.png)

![image](https://user-images.githubusercontent.com/1428930/175555165-bcbe5138-8e5c-416e-886b-c72df361d743.png)


[ci no changelog needed]
2022-07-04 14:08:31 +00:00
Michael Mauderer
655793aa78
Component List Panel View (#3495) 2022-06-22 16:39:32 +01:00
Ilya Bogdanov
71b3a9f40a
New selection box implementation for component groups (#3520)
[Task link](https://www.pivotaltracker.com/story/show/182194574).
[ci no changelog needed]

This PR implements a new selection box that will replace an old (not really working) one in the component browser. The old selection box wasn't working well with the headers of the component groups, so we were forced to make a much harder implementation.

The new implementation duplicates some visual components and places them in a separate layer. Then, a rectangular mask cuts off everything that is not "selected". This way:
- We have more control over what the selected entries should look like.
- We can easily support the multi-layer structure of the component groups with headers.
- We avoid problems with nested masks that our renderer doesn't support at the moment.

To be more precise, we duplicate the following:
- Background of the component group becomes the "fill" of the selection.
- Entries text and icons - we can alter them easily.
- Header background and header text. By placing them in separate scene layers we ensure correct rendering order.

https://user-images.githubusercontent.com/6566674/173657899-1067f538-4329-44f9-9dc2-78c8a4708b5a.mp4

# Important Notes
- This PR implements the base of our future selection mechanism, selecting entries with a mouse and keyboard still has several issues that will be fixed in the future tasks.
- The scrolling behavior will also be improved in future tasks. Right we only restrict the selection box position so that it never leaves the borders of the component group.
- I added a new function to `add` shapes to new layers in a non-exclusive way (we had only `add_exclusive`) before. I have no idea how we didn't use this feature before even though we mention it a lot in the docs.
- The demo scene restricts the position of the selection box for one-column component groups but does not for the wide component group.
2022-06-15 14:21:30 +00:00
Kaz Wesley
b756fc48d1
Symbol unregistration (#3507)
Remove a `Symbol`from the `SymbolRegistry` when its `SpriteSystem` is dropped.

This fixes the remaining buffer leak (after #3504) in https://www.pivotaltracker.com/story/show/181943457

# Important Notes
- The `SymbolRegistry` now assigns unique `SymbolId`s, so that we can tell if a `SymbolId` refers to a `Symbol` that has already been unregistered (this shouldn't happen, but it's not statically-obvious that it doesn't, so if it occurs we shouldn't misbehave).
- Also fix a bug in how `buffer_count` was tracked (we were decrementing more than incrementing!).
2022-06-15 03:54:59 +00:00
Ilya Bogdanov
c602404b1a
Multi Component Group Wrapper (#3473)
[ci no changelog needed]

This PR implements a new helper for the future Component Browser - `component_group::multi::Wrapper`. It propagates FRP events from multiple component groups and ensures that only a single component group is focused at all times.

See the updated component group demo scene (console logs shows propagated FRP events from all component groups):


https://user-images.githubusercontent.com/6566674/172359141-8ea6f1ba-e357-4c1b-852a-adb4d5207e03.mp4


- Fixed a `define_endpoints_2!` macro. FRP endpoints for `focus` events weren't connected properly.
- List View now uses an overlay shape to catch mouse events, it allows much easier implementation of `is_header_selected` in the component group.
2022-06-08 11:06:36 +00:00
Mateusz Czapliński
656d6e7660
Virtual Component Groups in the Hierarchical Action List (1/2) (#3488)
Parse the Engine's response containing Virtual Component Groups and store the results in a field of the Execution Context type.

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

# Important Notes
- This PR implements the subtask 1 of 2 in the ["Virtual Component Groups in the Hierarchical Action List" task](https://www.pivotaltracker.com/story/show/181865548).

[ci no changelog needed]
2022-06-03 17:18:20 +00:00
Adam Obuchowicz
66693ad642
Hierarchical Action List vel Component List. (#3501)
This PR introduces a new structure delivered by Searcher Controller: The Component List.

The Component list is hierarchical, and its structure reflects how the components are displayed in Component Browser - only "submodule" section at this point, other sections will be covered in next tasks.

This does not introduce anything visual; the structures are tested in unit tests.
2022-06-03 15:06:31 +00:00
Kaz Wesley
bd60a20bd3
Profiling workflows (#3475)
Define some workflows for batch-mode profiling.

Implemented:
- collapse nodes
- create node
- enter collapsed node
- new project
- open visualization

They can currently be built and run with a command like:
`./run.sh ide build --profiling-level=debug && dist/ide/linux-unpacked/enso --entry-point profile --workflow create_node --save-profile out.json`

And the data can be displayed with:
`dist/ide/linux-unpacked/enso --entry-point profiling_run_graph --load-profile out.json`

Demo of recording and viewing a profile with a command-line one-liner:

https://user-images.githubusercontent.com/1047859/169954795-2d9520ca-84f9-45d2-b83a-5063ebe6f718.mp4

See: https://www.pivotaltracker.com/story/show/182195399.

# Important Notes
- When defining workflows, two helpers are enough to allow us to tell when the action is really done: `Fixture::compile_new_shaders`, and `Fixture::backend_execution`. Often, it is appropriate to await both, but it depends on the task.
- The shader compiler is now driven by a `Controller`; while the `Compiler` is reset if context is lost, the `Controller`'s state survives context loss.
- A new `--load-profile` option supports specifying a profile by path when running `profiling_run_graph`.
- Drop the `with_same_start` profiler interface; we ended up preferring a child profiler convention, and this interface was not implemented compatibly with the stricter data model we've had since the introduction of `profiler::data`.
- Fix the noisy `rustfmt` output.
2022-06-01 18:01:16 +00:00
Adam Obuchowicz
d07246d84c
Fix depth-ordering update (#3486)
There are two dirty flags in layers: depth_order_dirty and element_depth_order_dirty - one marking changed in Layer, second marking change in one of sublayers. The depth_order_dirty has a proper callback for setting element_depth_order_dirty of its parent. However, the latter did not propagate up.
I fixed it by adding callback for element_depth_order_dirty which sets the depth_order_dirty of the parent.

# Important Notes
* The question to @wdanilo : is it possible, that I can propagate dirty directly to element_depth_order_dirty, without setting depth_order_dirty? As far as I understand the code, it would also work (and we would omit some unnecessary updates).
* I tried to leave some logs, but I don't feel how to do that: the tooling I used was very specific, only the concrete ids of symbols and layers were logged, and I don't know how to generalize it.
2022-05-30 10:32:43 +00:00
Adam Obuchowicz
eef0738f63
Component Group Entry with icons and text highlighting. (#3459)
This PR extends the Component Group Entry with icon and option to highlight the text. Here the convert has highlighted "con".

https://user-images.githubusercontent.com/3919101/169046537-4f8b823c-322e-40dc-8abb-24d1d7092341.mp4


### Important Notes

Although this PR includes effort for adjusting Component Group style to better reflect the design, it is not entirely finished: the selection still works badly and will be fixed in another PR.
2022-05-24 09:48:19 +02:00
Michał Wawrzyniec Urbańczyk
14a01c4635
New IDE build script (#3466) 2022-05-23 04:16:04 +02:00
Ilya Bogdanov
4ebf637fd4
Fully visible group name in partially scrolled Component Group View (#3447)
[ci no changelog needed]

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

This PR implements a fully visible component group header while scrolling the group (using the ScrollArea).
The header moves in sync with scrolling movements (using new `set_header_pos` FRP input), so it looks like the component group is scrolled. ScrollArea masks the "scrolled" entries above the header. This design allows a fully visible header even though our renderer doesn't support nested layers masking yet.

The screencast:

https://user-images.githubusercontent.com/6566674/168320360-2c2017b2-0ef5-42ce-9c79-82b9641c1d73.mp4


The most recent one, with the updated demo scene from develop:


https://user-images.githubusercontent.com/6566674/168555268-8552c4b0-f887-4388-89a1-e65ddf668be6.mp4

# Important Notes
- I fixed the API of the list view so now it supports non-hardcoded scene layers (previously it did not). I also believe it was implemented incorrectly.
- I've found a [pretty weird bug](https://www.pivotaltracker.com/story/show/182193824): the component group inside the ScrollArea is invisible unless I add some arbitrary shape to the scroll area content. I use a `transparent_circle` for this purpose in the demo scene. The bug is probably related to masking the sublayers, though I wasn't able to reproduce it properly on a simpler example.
- The selection box is removed from the demo scene as agreed with @farmaazon . The correct implementation has proven to be much harder than I expected, and we will implement another approach in a separate PR.
- I also modified the `shadow::Parameters` so that it uses `Var`s instead of plain values.
2022-05-17 13:52:08 +00:00
Michael Mauderer
fd3c316636
Fix default text color not being applied correctly. (#3456) 2022-05-17 09:57:40 +01:00
Michael Mauderer
0b34346c19
Improve profiling for UI interactions v2. (#3451)
* Extends the instrumentation of the code base and upgrades some FRPs to the newer API macro.
* Extends the run-graph demo scene to specify a profile via URL without recompilation.
* Fixes labels in the flame graph demo scene.
* Fixes an issue with loading profiles that contains escaped characters.

# Important Notes
* no longer contains the upgrade of the `text::View` to `define_endpoints_2`. This should be fixed as part of the text rendering rewrite.

[ci no changelog needed]
2022-05-16 12:28:50 +00:00
Mateusz Czapliński
b7cf493f7d
Component Group View colors parametrization (#3434)
Parametrize the colors used in a Component Group view based on a single color passed to an FRP input.

Customizing the colors of a Component Group will be needed for the larger Component Group List panel. This customization will work as a visual hint for the User, helping them to distinguish different Component Groups in the panel. A single input color will be configured for every Component Group in the `package.yaml` file (see the Design Doc). Therefore, all shades of the color required by the Component Group view must be calculated from this single input color.

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

#### Visuals

The following screencast of the `component_group` debug scene shows how all required shades of color are calculated from a single input color. It also shows a new "dimmed" display mode of the Component Group. The debug scene does not support selecting entries in a "dimmed" Component Group, as this is not required by the Design Doc.


https://user-images.githubusercontent.com/273837/168074651-bf3d5ea5-99b0-4b69-9934-ad8565ffc54e.mov






The following is a screenshot of the Node Searcher, to demonstrate that it still works correctly:

<img width="623" alt="Screenshot 2022-05-09 at 17 13 01" src="https://user-images.githubusercontent.com/273837/167441109-e9a47b5a-45a2-4172-85ed-c593e43e02d6.png">

# Important Notes
- A new type `Params` was added in the `list_view::entry::Entry` trait. This was needed to allow passing FRP information to entries separately for every ListView instance.
- Note: `style_prefix` and `max_width_px` parameters of the `list_view::entry::Entry::new` function may get moved into the new `Params` type in the future. To save time, this was not attempted in this PR, as agreed with @farmaazon.

[ci no changelog needed]
2022-05-13 08:38:43 +00:00
Kaz Wesley
d4d725ade6
Fix blink when adding node (#3448)
Fix blink when adding node
2022-05-12 16:17:29 -07:00
Michael Mauderer
d24f0f7ebb
Revert "Improve profiling for UI interactions. (#3437)" (#3449)
This reverts commit e6133444ce.
2022-05-13 00:18:57 +02:00
Michael Mauderer
e6133444ce
Improve profiling for UI interactions. (#3437)
* Extends the instrumentation of the code base and upgrades some FRPs to the newer API macro.
* Extends the run-graph demo scene to specify a profile via URL without recompilation.
* Fixes labels in the flame graph demo scene.
* Fixes an issue with loading profiles that contains escaped characters.

# Important Notes
[ci no changelog needed]
2022-05-12 15:05:01 +00:00
Ilya Bogdanov
1c8aa26f90
Wide Componet Group List (#3409)
[ci no changelog needed]

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

This PR brings a new UI component: Wide Component Group. This is a three-column headerless container similar to Component Group. See the updated `component-group` demo scene:


https://user-images.githubusercontent.com/6566674/166933866-e5bee142-5176-4a02-bc18-a5bfd96ccbe2.mp4
2022-05-12 09:30:00 +00:00
Kaz Wesley
0e904b2256
Profiling batch mode (#3428)
Implement a command that launches the application, runs a series of steps (a "workflow"), writes a profile to a file, and exits.

See: [#181775808](https://www.pivotaltracker.com/story/show/181775808)

# Important Notes
- The command to capture run and profile is used like: `./run profile --workflow=new_project --save-profile=out.json`. Defining some more workflows (collapse nodes, create node and edit value) comes next; they are implemented with the same infrastructure as the integration-tests.
- The `--save-profile` option can also be used when profiling interactively; when the option is provided, capturing a profile with the hotkey will write a file instead of dumping the data to the devtools console.
- If the IDE panics, the error message is now printed to the console that invoked the process, as well as the devtools console. (If a batch workflow fails, this allows us to see why.)
- New functionality (writing profile files, quitting on command, logging to console) relies on Electron APIs. These APIs are implemented in `index.js`, bridged to the render process in `preload.js`, and wrapped for use in Rust in a `debug_api` crate.
2022-05-10 19:34:40 +00:00
Kaz Wesley
71adb7e0a4
Drop render-profile; obsoleted by profiling-run-graph. (#3438) 2022-05-09 13:29:14 -07:00
Mateusz Czapliński
ffe6700901
Parametrize font in List View via styles (#3427)
Make it possible to parametrize the font in different instances of `ListView` via styles. This makes it possible for the Component Group view to use a `ListView` with `list_view::entry::Label` underneath with a different visual style than the default `ListView` used in other places in the IDE.

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

#### Visuals

This feature allows the Component Group visual component to use a proportional font for its entries, as seen in the `component_group` debug scene:

<img width="180" alt="Screenshot 2022-05-02 at 14 50 46" src="https://user-images.githubusercontent.com/273837/166236411-1d139114-b099-4a10-8d44-48713d155d1e.png">


The other instances of ListView still use a monospaced font as before:

<img width="152" alt="Screenshot 2022-04-29 at 14 45 57" src="https://user-images.githubusercontent.com/273837/165950535-6cffd0df-d84e-4f74-8d48-3114aea9fc68.png">

<img width="629" alt="Screenshot 2022-04-29 at 14 46 35" src="https://user-images.githubusercontent.com/273837/165950578-0439d078-0224-4138-b38f-4bb799b004aa.png">

The `text_area` debug scene works correctly:

<img width="340" alt="Screenshot 2022-04-29 at 14 46 12" src="https://user-images.githubusercontent.com/273837/165950564-fbbde201-c5ad-448e-af3d-8a7494757932.png">

# Important Notes
- Parsing `String` values into `style::Data` should now be done through the `FromStr` trait, instead of the `TryFrom<String>` trait as previously. (Note: the `String::parse` function in the Rust standard library uses the `FromStr` trait underneath.)

[ci no changelog needed]
2022-05-04 10:44:57 +00:00
Kaz Wesley
ce78f9825d
New profiling format (#3413)
* New JSON profile format.

* Use string-table optimization for labels in JSON format.

* Use TimeOffset header to render beanpoles

* Log RPC messages sent to the backend.

* Display RPC requests on graph

* Simplify metadata-logging interface.
2022-05-03 10:54:48 -07:00
Michael Mauderer
8f99014477
Implement multi-process message visualisation. (#3423)
Implements a visualization that is integrated with our GUI profiling visualization for the multiprocess data implemented in #3395

https://user-images.githubusercontent.com/1428930/165915395-c850c7b2-1cc5-4eb0-8f21-37565d113b1e.mp4

The visualization shows a horizontal line for Engine, Language Server and GUI and renders arrows for each message passed between them. Information about the message is revealed on hover.

# Important Notes
* this PR refactors the tooltip mechanism. Note that this has not been in active use anywhere else, as tooltips for node received a custom implementation and the tooltip that was previously implemented was used nowhere else yet.

[ci no changelog needed]
2022-05-03 09:40:27 +00:00
Adam Obuchowicz
8041fe0e49
Selectable Header in Component Group View. (#3418)
* The List View component was refactored: it allows for hiding the internal selection widget, and exposes information where the widget should be placed. This allows us to create selection widget in component list panel, so it can be animated between component groups and sections.
* Fixed some warnings when checking WASM code.
* Adjusted the style of Component Group View a little, so it better reflects the design doc. Still not ideal, because the list_view has some weird design regarding padding, but I don't want to stuck in some bigger refactoring.

I will add a video in a few minutes.

# Important Notes
https://user-images.githubusercontent.com/3919101/165507826-60329f9e-7de3-4eb2-9271-292e45568cb2.mov
2022-04-30 14:48:52 +00:00
Ilya Bogdanov
bb6a5bac02
Clipping in the Scroll Area (reverting a revert) (#3420)
[ci no changelog needed]

This is fixed copy of already reviewed #3384

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

This PR implements content clipping for the ScrollArea component.

List of changes:
- Implemented `InstanceWithAttachedLayer` abstraction that allows creating additional sublayers for our components. In the future, this abstraction can be used for text rendering as well (right now text rendering requires additional hardcoded layers).
- Fixed `complex-shape-system` demo scene by removing `node_searcher_mask` layer.
- Fixed `SublayersModel::remove` - it was not clearing the `layer_placement` hashmap.
- Implemented disabling the wheel scrolling in `Navigator`, and refactored it to reduce the number of functions arguments by introducing a `NavigatorSettings` struct.

Video (`scroll_area` demo):


https://user-images.githubusercontent.com/6566674/164506455-e177a7a7-9f1c-4f50-888f-112423cebbe4.mp4

# Important Notes
- `InstanceWithAttachedLayer` is implemented in such a way that it allows an extension in the future - namely to use it to simplify text rendering. The implementation might be simplified though.
2022-04-27 17:11:49 +00:00
Ilya Bogdanov
88ec8c4774
Revert "Clipping in the ScrollArea (#3384)" (#3419)
This reverts commit 6ba40a7a56.
2022-04-27 15:24:15 +02:00
Ilya Bogdanov
6ba40a7a56
Clipping in the ScrollArea (#3384)
[ci no changelog needed]

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

This PR implements content clipping for the ScrollArea component.

List of changes:
- Implemented `InstanceWithAttachedLayer` abstraction that allows creating additional sublayers for our components. In the future, this abstraction can be used for text rendering as well (right now text rendering requires additional hardcoded layers).
- Fixed `complex-shape-system` demo scene by fixing `node_searcher_mask` layer.
- Fixed `SublayersModel::remove` - it was not clearing the `layer_placement` hashmap.
- Implemented disabling the wheel scrolling in `Navigator`, and refactored it to reduce the number of functions arguments by introducing a `NavigatorSettings` struct.

Video (`scroll_area` demo):


https://user-images.githubusercontent.com/6566674/164506455-e177a7a7-9f1c-4f50-888f-112423cebbe4.mp4

# Important Notes
- `InstanceWithAttachedLayer` is implemented in such a way that it allows an extension in the future - namely to use it to simplify text rendering. The implementation might be simplified though.
2022-04-27 11:35:30 +00:00
Kaz Wesley
d59710c3cd
Multi-process profiles. (#3395)
See: [#181837344](https://www.pivotaltracker.com/story/show/181837344).

I've separated this PR from some deeper changes I'm making to the profile format, because the changeset was getting too complex. The new APIs and tools in this PR are fully-implemented, except the profile format is too simplistic--it doesn't currently support headers that are needed to determine the relative timings of events from different processes.

- Adds basic support for profile files containing data collected by multiple processes.
- Implements `api_events_to_profile`, a tool for converting backend message logs (#3392) to the `profiler` format so they can be merged with frontend profiles (currently they can be merged with `cat`, but the next PR will introduce a merge tool).
- Introduces `message_beanpoles`, a simple tool that diagrams timing relationships between frontend and backend messages.

### Important Notes
- All TODOs introduced here will be addressed in the next PR that defines the new format.
- Introduced a new crate, `enso_profiler_enso_data`, to be used by profile consumers that need to refer to Enso application datatypes to interpret metadata.
- Introduced a `ProfileBuilder` abstraction for writing the JSON profile format; partially decouples the runtime event log structures from the format definition.
- Introducing the conversion performed for `ProfilerBuilder` uncovered that the `.._with_same_start!` low-level `profiler` APIs don't currently work; they return `Started<_>` profilers, but that is inconsistent with the stricter data model that I introduced when I implemented `profiler_data`; they need to return profilers in a created, unstarted state. Low-level async profilers have not been a priority, but once #3382 merges we'll have a way to render their data, which will be really useful because async profilers capture *why* we're doing things. I'll bring up scheduling this in the next performance meeting.
2022-04-21 16:44:03 +02:00
Ilya Bogdanov
ea33387836
Update electron-builder to v23.0.6 (#3410)
[ci no changelog needed]

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

It fixes the build issue on Mac OS 12.3.1 that is caused by removed `/usr/bin/python` executable.

Also applied `enso-formatter` to the sources.

# Important Notes
We're basically updating for one major `electron-builder` release - from `v22` to `v23`. I didn't spot anything in the changelog that could affect us. See features + breaking changes excerpt:

```
Features:

- feat(msi): add fileAssociation support for MSI target (https://github.com/electron-userland/electron-builder/pull/6530)
- feat(mac): ElectronAsarIntegrity in electron@15 - See: https://github.com/electron/electron/pull/30667 (https://github.com/electron-userland/electron-builder/issues/6506 https://github.com/electron-userland/electron-builder/issues/6507)
- feat(snap): add lzo to Snap compression options (also as new default) (https://github.com/electron-userland/electron-builder/pull/6201) Upgraded app-builder-bin dependency required newer version of Go
- feat(msi): support assisted installer for MSI target (https://github.com/electron-userland/electron-builder/pull/6550)

Breaking changes:

- Removing Bintray support since it was sunset. Ref: https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/
- Fail-fast for windows signature verification failures. Adding -LiteralPath to update file path to disregard injected wildcards
- Force strip path separators for backslashes on Windows during update process
- Authentication for local mac squirrel update server
- Disabled advertised shortcuts, since MSIs with advertised Start Menu shortcuts that have a
Shortcut Property fails to install when deployed machine-wide via GPO but works fine in all
other contexts. Admins using advertisement must apply an MST to re-enable it. See https://github.com/electron-userland/electron-builder/issues/6508.
- Removing optional NSIS icon ID from config and generating it automatically to synchronize IDs with Advertised Shortcuts and future features
```
2022-04-21 11:36:32 +00:00
Michael Mauderer
e8342b04c3
Integrate Ensogl stats with profiling framework (#3388)
Add logging of EnsoGL performance stats to the profiling framework. Also extends the visualization in the debug scene to show an overview of the performance stats. We now render a timeline of blocks that indicate by their colour the rough FPS range we are in:

https://user-images.githubusercontent.com/1428930/162433094-57fbb61a-b502-43bb-8815-b7fc992d3862.mp4

# Important Notes
[ci no changelog needed]

Needs to be merged after https://github.com/enso-org/enso/pull/3382 as it requires some changes about metadata logging from there. That is why this PR is currently still in draft mode and based on that branch.
2022-04-21 09:38:26 +00:00
Michael Mauderer
24e0f33d8e
Backend Communication Profiling (#3382) 2022-04-19 13:30:29 +02:00
Wojciech Daniło
7d1af95745
Fixing regression - mouse buttons were not distinguished properly. (#3401) 2022-04-15 16:08:30 +02:00
Wojciech Daniło
d5d5d3aac5
Render on demand. (#3397) 2022-04-14 22:28:38 +02:00
Wojciech Daniło
fbe28db1d7
Revert "Revert "Fixed rate animation loop fixes"" (#3399) 2022-04-14 19:58:53 +02:00
Mateusz Czapliński
e75df61b2c
Component Group View with static header and without icons (#3373)
Add an initial version of the visual component for displaying the Component Group View. The component contains a header (for displaying the Group Name) and a list of labels (for displaying the component names).

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


#### Visuals

A screenshot from a debug scene demonstrating the component:

<img width="251" alt="Screenshot 2022-04-13 at 20 07 56" src="https://user-images.githubusercontent.com/273837/163243304-21c3ad78-4813-4368-b3bb-844d979da699.png">



Screenshots from other debug scenes (`list_view` and `text_area`), demonstrating that the other components still display correctly:

<img width="202" alt="Screenshot 2022-04-13 at 20 08 56" src="https://user-images.githubusercontent.com/273837/163243428-de9dc1c7-5a9f-45e0-9325-db60cece9768.png">


<img width="403" alt="Screenshot 2022-04-13 at 20 08 48" src="https://user-images.githubusercontent.com/273837/163243432-895061d9-5bd9-4349-8679-eb63b0f6724d.png">


A screenshot of the Node Searcher's list, showing that long entries in a ListView are now truncated, and an ellipsis character is added in place of removed characters:


<img width="651" alt="Screenshot 2022-04-13 at 20 10 16" src="https://user-images.githubusercontent.com/273837/163243664-5b671969-7aa0-4bef-8fd2-825602d85848.png">

# Important Notes
- Adding support for the text truncation feature in `ListView` required some changes in the`list_view::Entry`-related APIs.
- An embedded font was added (DejaVuSans-Bold) for use in the Component Group View debug scene, and 5 unused embedded fonts were removed.
2022-04-14 10:37:40 +00:00
Wojciech Daniło
0ab46bc6f8
Revert "Fixed rate animation loop fixes (#3396)" (#3398) 2022-04-13 19:56:35 +02:00
Wojciech Daniło
7a9ca10bb1
Fixed rate animation loop fixes (#3396) 2022-04-13 19:05:58 +02:00
Adam Obuchowicz
8ca4e2b003
SDF-based mechanism for making letters bold (#3385)
Fixes [181641027](https://www.pivotaltracker.com/story/show/181641027). There are new methods of text::Area for making some letters bolder, without moving them nor any other letters in the line.

Tested on DejaVuSans text:
![image](https://user-images.githubusercontent.com/3919101/162199723-524f7560-535f-4c98-bcb4-6b760ad8cb04.png)
![image](https://user-images.githubusercontent.com/3919101/162199806-e6582c56-3071-4653-8ad2-114df86cd6b7.png)
![image](https://user-images.githubusercontent.com/3919101/162199880-1836e902-8663-4696-bcb7-2b15c3c243c6.png)

On MacOS:
<img width="824" alt="Screenshot 2022-04-07 at 14 54 40" src="https://user-images.githubusercontent.com/3919101/162203730-ffda3096-7aab-443f-a45a-bfa18784ba36.png">
<img width="379" alt="Screenshot 2022-04-07 at 14 54 52" src="https://user-images.githubusercontent.com/3919101/162203751-f5ca2e26-fdb6-4521-9821-999111b80ac0.png">
<img width="160" alt="Screenshot 2022-04-07 at 14 54 58" src="https://user-images.githubusercontent.com/3919101/162203769-3c367f81-67bb-48aa-994c-42eeb131017e.png">
2022-04-12 17:39:08 +00:00
Wojciech Daniło
6b7622dd45
Multi-frame shader compilation (#3378) 2022-04-12 17:56:38 +02:00
Kaz Wesley
b32fedacd9
Profiling: intervals tool and devtools-file generator (#3359)
* Profiling: intervals tool

* devtools profile generator

* docs

* ignore open intervals, because devtools does

* intervals tool: show interval counts

* Re-add a doc comment. Was accidentally deleted.

* Implement review.

* DURATION_FLOOR_MS

* Rename methods that apply a profile's contents to self

* Description of chrome format

* Link to profile.json format documentation is design doc

* Implement profiling-level switch described in design doc

* lint
2022-04-11 06:08:09 -07:00