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

Fix: when default visualization is displayed, its entry is not present in the chooser list. #6209

Merged
merged 5 commits into from
Apr 12, 2023

Conversation

farmaazon
Copy link
Contributor

Pull Request Description

The visualization was blank because we set a new visualization instance with same data for attaching, so VisualizationManager skipped attaching (and thus the data for previous instance were not shared with the new one).

And the entry was visible, because we informed chooser about selected vis before the visualization list arrived.

Fixes #5992 may also fix some other issues with blank visualizations.

Important Notes

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • All code has been tested:
    • Unit tests have been written where possible.
    • If GUI codebase was changed, the GUI was tested when built using ./run ide build.

@farmaazon farmaazon added the CI: No changelog needed Do not require a changelog entry for this PR. label Apr 5, 2023
@farmaazon farmaazon self-assigned this Apr 5, 2023
@farmaazon farmaazon requested a review from mwu-tow as a code owner April 5, 2023 14:43
@sylwiabr
Copy link
Member

@vitvakatu @MichaelMauderer can one of you QA this?

@vitvakatu
Copy link
Contributor

I will check it

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.

QA: passed. Also, I wasn't able to reproduce #5991 on this branch, but it needs to be checked separately. cc @MichaelMauderer

selected_definition <- action_bar.visualisation_selection.map(f!([registry](path)
path.as_ref().and_then(|path| registry.definition_from_path(path))
));
on_selected <- selected_definition.map(|d|d.as_ref().map(|_|())).unwrap();
Copy link
Member

Choose a reason for hiding this comment

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

.map(|_| ()) -> .constant(())

path.as_ref().and_then(|path| registry.definition_from_path(path))
));
on_selected <- selected_definition.map(|d|d.as_ref().map(|_|())).unwrap();
eval_ on_selected ( action_bar.hide_icons.emit(()) );
Copy link
Member

Choose a reason for hiding this comment

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

action_bar.hide_icons <+ on_selected

// === Visualisation Chooser Bindings ===

frp::extend! { network
selected_definition <- action_bar.visualisation_selection.map(f!([registry](path)
Copy link
Member

Choose a reason for hiding this comment

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

double space

@@ -538,7 +552,7 @@ impl Container {
// === Switching Visualizations ===

frp::extend! { network
new_vis_definition <- any(frp.set_visualization,vis_after_cycling,default_visualisation);
new_vis_definition <- any(frp.set_visualization, selected_definition, vis_after_cycling, default_visualisation).on_change();
Copy link
Member

Choose a reason for hiding this comment

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

100 chars

@farmaazon farmaazon added the CI: Ready to merge This PR is eligible for automatic merge label Apr 12, 2023
@mergify mergify bot merged commit b72ab4a into develop Apr 12, 2023
@mergify mergify bot deleted the wip/farmaazon/fix-default-vis-entry-5992 branch April 12, 2023 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR. CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Visualization chooser let's me choose Table vis (default one) which causes the vis going blank
4 participants