scratchfoundation / scratch-www

Standalone web client for Scratch
https://scratch.mit.edu
BSD 3-Clause "New" or "Revised" License
1.58k stars 835 forks source link

"Remix" - button and "see project page" -button not working in embed-editor #949

Closed torandersson closed 7 years ago

torandersson commented 7 years ago

Loading a project in the embed-editor I can't remix or save the project.

cwillisf commented 7 years ago

@rschamp I took a quick look at this and I think it's probably all in JS land. I can look at that side late today or maybe tomorrow, but I need to get ready for a thing I'm going to tonight.

For reference: clicking the remix button first checks if you're logged in. If you are, it calls JSremixProject with no arguments. If you're not logged in, it calls JSlogin('remix', username).

rschamp commented 7 years ago

Thanks @cwillisf! Just for the record, there appears to be one other issue which may or may not also be caused by JS land — the top right button seems to have two things appearing at the same time?

image

cwillisf commented 7 years ago

It looks like the problem is that JSremixProject is not defined on the embed-editor page. The JS that Flash generates looks like this, so you don't end up seeing the exception in the browser console:

try { __flash__toXML(JSremixProject()) ; } catch (e) { "<undefined/>"; }

JSremixProject is defined in scratch_app.js so I guess that file isn't being included on the embed-editor page. Simply adding scratch_app.js feels like a risky approach... I assume that would duplicate some functionality that's currently found in embed_editor.js. Suggestions?

The text overlap thing should be an easy fix in the SWF. It's the user menu overlapping with the "Go to scratch.mit.edu" button... it looks like both are currently hard-coded to go into the corner.

cwillisf commented 7 years ago

I filed the menu/button overlap as LLK/scratch-flash-online#286

rschamp commented 7 years ago

Moved to LLK/scratchr2#4156

rschamp commented 7 years ago

@torandersson Sorry, the embed editor is not currently supported for this use case.

torandersson commented 7 years ago

No sad!! What is the usecase?

rschamp commented 7 years ago

@torandersson Currently the embedded editor is only used on the site for microworlds pages, e.g. https://scratch.mit.edu/microworlds/art. These pages use a different layout with a limited feature set; the other features of the editor aren't implemented for the embedded editor. Out of curiosity, how did you find this feature?

torandersson commented 7 years ago

I work as a volunteer, and we had a paper wasting problem, every time we introduced scratch we need to print out loads of paper for the kids to use during the lesson. As a swede this hurts my heart, so we strated iframing in the old scratch environment but since pasword/username phising is a problem you removed that feature. So we contacted the scratch team, and got the link. https://www.kodboken.se/scratch/18183 this feature is now removed but we wanted to use it like this.