Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Component Group View with static header and without icons #3373

Merged
merged 165 commits into from
Apr 14, 2022

Conversation

akavel
Copy link
Contributor

@akavel akavel commented Mar 30, 2022

Pull Request Description

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:

Screenshot 2022-04-13 at 20 07 56

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

Screenshot 2022-04-13 at 20 08 56

Screenshot 2022-04-13 at 20 08 48

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:

Screenshot 2022-04-13 at 20 10 16

Important Notes

  • Adding support for the text truncation feature in ListView required some changes in thelist_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.

Checklist

Please include the following checklist in your PR:

  • The documentation has been updated if necessary.
  • All code conforms to the Scala, Java, and Rust style guides.
  • All code has been tested:
    • Unit tests have been written where possible.
    • If GUI codebase was changed: Enso GUI was tested when built using BOTH ./run dist and ./run watch.

@akavel akavel requested a review from wdanilo April 13, 2022 21:02
Copy link
Member

@wdanilo wdanilo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mateusz, this is really nice code and nicely done PR!

header_text_size <- all(&header_text_size, &init)._0();
model.header.set_default_text_size <+ header_text_size.map(|v| text::Size(*v));
_set_header <- input.set_header.map2(&size_and_header_geometry, f!(
(t, (size, hdr_geom)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is t? It is really poorly named variable


/// An entry point.
#[entry_point]
#[allow(dead_code)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what needs this?

@akavel
Copy link
Contributor Author

akavel commented Apr 14, 2022

(Process note: the code-review is now Approved, therefore the PR is waiting for an Acceptance/QA Review by @vitvakatu on Task https://www.pivotaltracker.com/story/show/181724889 before merge.)

Copy link
Contributor

@vitvakatu vitvakatu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed and tested manually, QA Acceptance set to pass. Automated tests are not possible here.

@akavel akavel added the CI: Ready to merge This PR is eligible for automatic merge label Apr 14, 2022
@mergify mergify bot merged commit e75df61 into develop Apr 14, 2022
@mergify mergify bot deleted the wip/akavel/cgv-static-181724889 branch April 14, 2022 10:37
hubertp pushed a commit that referenced this pull request Apr 19, 2022
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants