Skip to content

Fix toolbox refreshing for new variables after switching tabs #2146

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

Conversation

paulkaplan
Copy link
Contributor

Resolves

What Github issue does this resolve (please include link)?

Fixes #2120

Proposed Changes

Describe what this Pull Request does

re-enable toolbox refreshing, the way we do after doing a real toolbox refresh, after the blocks tab is re-shown after being hidden.

The full workspace refresh which is done the line before causes refreshing to be disabled. See the comments on line 148-150 for more info.

Reason for Changes

Explain why these changes should be made

Toolbox refreshing was not happening when it needed to after switching tabs.

Test Coverage

Please show how you have added tests to cover your changes

Repro the test case in the lined issue.

Browser Coverage

Check the OS/browser combinations tested (At least 2)

not browser related.


/cc @gnarf, @rschamp

Copy link
Contributor

@rschamp rschamp left a comment

Choose a reason for hiding this comment

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

Thanks!!

@paulkaplan paulkaplan merged commit 623b382 into scratchfoundation:develop May 24, 2018
@paulkaplan paulkaplan deleted the fix-toolbox-refresh-after-tabbing branch May 24, 2018 20:03
@@ -125,6 +125,8 @@ class Blocks extends React.Component {
if (this.props.isVisible) { // Scripts tab
this.workspace.setVisible(true);
this.props.vm.refreshWorkspace();
// Re-enable toolbox refreshes without causing one. See #updateToolbox for more info.
this.workspace.toolboxRefreshEnabled_ = true;

This comment was marked as abuse.

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

Successfully merging this pull request may close these issues.

New variables and lists do not appear in the blocks palette if made after the paint editor is used.
4 participants