-
Notifications
You must be signed in to change notification settings - Fork 323
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
Virtual Component Groups filtered by completion IDs #3570
Conversation
/// IDs passed as arguments to the [`extend`] method and present in | ||
/// [`model::SuggestionDatabase`]. | ||
ids_passed_to_extend: HashSet<component::Id>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add info why we collect such IDs.
/// Build the list, sorting all group lists and groups' contents appropriately. Filter the | ||
/// [`component::List::favorites`] (only components with IDs passed to [`extend`] are | ||
/// retained), do not sort them. | ||
/// | ||
/// If a component group in favorites is empty after the filtering, the empty group is | ||
/// retained. This allows layoing out the favorites in [Component | ||
/// Browser](crate::controller::Searcher) in the same columns regardless of filtering. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The information that only those favorites will be kept which have IDs among those passed to extend shall be added to the set_favorites
method.
And I miss a description why the builder behaves this way. There should be a "usage scenario" in the docs of the builder::List
struct: that we create a list, set favorites structure, extend with IDs matching return/self type and get list with properly filtered groups.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QA Acceptance passed
Pull Request Description
Filter the Virtual Component Groups (a.k.a. "Favorites Data Science Tools") in the
component::List
(a.k.a. Hierarchical Action List) to only contain components with IDs listed in the Engine's response to asearch/completion
request.This completes the "Virtual Component Groups filtered by input type" task (linked below) because the Engine's response to a
search/completion
request contains IDs of components filtered by input node type andthis
type.https://www.pivotaltracker.com/story/show/182661634
Visuals
See below for a video showing the list of Favorites filtered by the type of the input node. Please note that the video also displays a few known issues that are present in the existing code and not introduced by this PR:
Screen.Recording.2022-07-14.at.16.01.32.mov
A screenshot showing the default, unfiltered list of Favorites when no input node is selected:
Important Notes
Checklist
Please include the following checklist in your PR:
Scala,
Java,
and
Rust
style guides.
./run ide dist
and./run ide watch
.[ci no changelog needed]