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

close widgets when sending the blocks to trash #2155

Merged
merged 2 commits into from
Mar 21, 2020

Conversation

Ishakikani9117
Copy link
Contributor

fixes #2145

@Ishakikani9117
Copy link
Contributor Author

@walterbender please check out this PR

@walterbender
Copy link
Member

We really only want to close the widget associated with the block we are deleting.

@walterbender
Copy link
Member

Have you looked at the names? do they match? (The title string may not be the same as the internal block name)

@Ishakikani9117
Copy link
Contributor Author

@walterbender I have added method that is working as we want it to.

@@ -7051,6 +7050,9 @@ function Blocks(activity) {
// console.debug('putting ' + this.blockList[blk].name + ' in the trash');
this.blockList[blk].trash = true;
this.blockList[blk].hide();
var title = this.blockList[blk].protoblock
Copy link
Member

Choose a reason for hiding this comment

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

Does this static label always match the widget window title? Did you test?

Copy link
Contributor Author

@Ishakikani9117 Ishakikani9117 Mar 21, 2020

Choose a reason for hiding this comment

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

@walterbender yes, it does. I have already tested this.

Copy link
Contributor

Choose a reason for hiding this comment

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

@Ishakikani9117 Please check it for rhythm maker.
If we send rhythm maker to trash , then widget window does not open for other rhythm maker block. Can you test this?

Copy link
Contributor

Choose a reason for hiding this comment

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

@walterbender Also check for timbre , temperament widget. If once I move them to trash , the window not open for their other block .
One more issue :
Is this intentional if I have two open widget window and I move one of their block to trash but both widget window get closed .

Copy link
Member

Choose a reason for hiding this comment

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

It is a bug in how the window is hidden. style.display is never reset when the new widget tries to open. The bug was introduced by an earlier patch.

Copy link
Contributor Author

@Ishakikani9117 Ishakikani9117 Mar 21, 2020

Choose a reason for hiding this comment

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

@walterbender Also check for timbre , temperament widget. If once I move them to trash , the window not open for their other block .
One more issue :
Is this intentional if I have two open widget window and I move one of their block to trash but both widget window get closed .

@b18050 I tried your solution, the phrase maker and custom mode widget are not being closed even we sent it to trash. and for other blocks widget disappears when you sent blocks to trash ,but after 2 seconds or so,widget
shows up automatically.

Copy link
Contributor

Choose a reason for hiding this comment

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

@walterbender Is it fixed now?

It is a bug in how the window is hidden. style.display is never reset when the new widget tries to open. The bug was introduced by an earlier patch.

Copy link
Member

Choose a reason for hiding this comment

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

Pushed a fix. Please test. (Should fix the same regression introduced by the new project button too.)

Copy link
Contributor

Choose a reason for hiding this comment

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

@walterbender The widget window is not closing when block is send to trash.

Copy link
Contributor

Choose a reason for hiding this comment

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

@walterbender same issue as @Ishakikani9117 was telling . The widget window shows up automatically after 2 seconds or so. Probably , this is due to overwriting session data in activity.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue regarding widgets
3 participants