Skip to content

Conversation

@rschamp
Copy link
Contributor

@rschamp rschamp commented Dec 7, 2016

  • Unify the data reported for each target in targetsUpdate and SPRITE_INFO_REPORT. Previously the client needed to merge SPRITE_INFO_REPORT data with targetsUpdate data on the initial project load to have the full state of each target. This way the client can simply use what is in the initial targetsUpdate.
  • Emit sprite info report whenever any sprite changes, so that the sprite list can display current sprite data for all sprites, not just the currently edited sprite.
  • Include current costume data in sprite info, so the GUI can display the current costume/backdrop in the sprite list.

For scratchfoundation/scratch-gui#14
Required by scratchfoundation/scratch-gui#25

Ray Schamp added 3 commits November 30, 2016 13:19
Also emit the report on all costume changes
This allows costume data to reach listeners even when the sprite isn't the editing target.

Filter out non-editing target reports in the playground to match previous behavior.
We need more than just the name for the initial render, so send everything consistent with sprite info reports.
@tmickel
Copy link
Contributor

tmickel commented Dec 7, 2016

Hmm, why did you keep around the on-initialize targetsUpdate? were we going to replace that entirely with the more chatty sprite-info-report events?

overall lgtm though, I like the toJSON!

@rschamp
Copy link
Contributor Author

rschamp commented Dec 7, 2016

@tmickel I think eventually I will do that, and have a pass making all the events a bit more granular. I wanted to keep things relatively simple on this side since there's a lot going on in the GUI to go with this change.

@tmickel
Copy link
Contributor

tmickel commented Dec 7, 2016

cool cool :)

Copy link
Contributor

@cwillisf cwillisf left a comment

Choose a reason for hiding this comment

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

👍

@rschamp rschamp merged commit a55a422 into scratchfoundation:develop Dec 9, 2016
@rschamp rschamp deleted the feature/sprite-info branch December 9, 2016 14:43
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.

3 participants