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 weblab inspector toggle state #14813

Merged
merged 1 commit into from May 3, 2017
Merged

Conversation

cpirich
Copy link
Contributor

@cpirich cpirich commented May 3, 2017

Bramble could disable the Inspector Mode when an element in the preview frame is clicked. When this happened, our UI was unaware and the inspector toggle UI became out of sync...

  • In brambleHost.js, bind to Bramble's inspectorChange event. Allow weblab to register an onInspectorChanged() callback, like it does for onProjectChanged().
  • In WebLab.js, supply an onInspectorChanged() callback that stores the new value in redux. Change the onToggleInspector() function to use the redux state as the source of truth (instead of an instance variable). Remove the explicit call to actions.changeInspectorOn() since that will now come via the callback - whether our UI triggers the change or Bramble's UI triggers the change.

@cpirich cpirich requested a review from islemaster May 3, 2017 15:26
Copy link
Contributor

@islemaster islemaster left a comment

Choose a reason for hiding this comment

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

LGTM!

@cpirich cpirich merged commit 6510c63 into staging May 3, 2017
@cpirich cpirich deleted the weblab_fix_inspector_toggle_state branch May 3, 2017 20:40
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.

None yet

2 participants