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

Store indicator component mapping as part of Visualizer's store subscription #4608

Merged
merged 5 commits into from
Dec 22, 2023

Conversation

Wumpf
Copy link
Member

@Wumpf Wumpf commented Dec 21, 2023

What

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG

@Wumpf Wumpf added 📉 performance Optimization, memory use, etc 🚜 refactor Change the code, not the functionality 🟦 blueprint The data that defines our UI exclude from changelog PRs with this won't show up in CHANGELOG.md labels Dec 21, 2023
@Wumpf Wumpf requested a review from jleibs December 21, 2023 16:16
Copy link
Member

@jleibs jleibs left a comment

Choose a reason for hiding this comment

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

Makes sense. Definitely seems worth computing with the subscriber.

let entites_with_matching_indicator = ctx
.entities_with_matching_indicator_per_visualizer
.get(&id)
.unwrap_or(&empty_entity_set);
Copy link
Member

Choose a reason for hiding this comment

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

If this is an empty set, do we still need to run: visualizer.heuristic_filter, or can we just return false directly?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm practically yes. But technically heuristic_filter decides whehter to use entites_with_matching_indicator in the first place 🤔
I'm a bit undecided. leaving it for now

@@ -35,6 +37,10 @@ pub struct ViewerContext<'a> {
/// Mapping from class and system to entities for the store
pub entities_per_system_per_class: &'a EntitiesPerSystemPerClass,
Copy link
Member

Choose a reason for hiding this comment

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

Nit: this needs a more specific name.

Copy link
Member Author

Choose a reason for hiding this comment

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

which is why it is renamed in the next pr 😄

Copy link
Member

@jleibs jleibs left a comment

Choose a reason for hiding this comment

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

Makes sense. Definitely seems worth computing with the subscriber.

@Wumpf Wumpf merged commit e70e1dd into main Dec 22, 2023
40 of 41 checks passed
@Wumpf Wumpf deleted the andreas/indicator-component-store-subscription branch December 22, 2023 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🟦 blueprint The data that defines our UI exclude from changelog PRs with this won't show up in CHANGELOG.md 📉 performance Optimization, memory use, etc 🚜 refactor Change the code, not the functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants