scratchfoundation / scratch-flash

Open source version of the Scratch 2.0 project editor. This is the basis for the online and offline versions of Scratch found on the website.
https://scratch.mit.edu
GNU General Public License v2.0
1.33k stars 513 forks source link

Comment alignment & connection not consistently displayed #1340

Closed jwzimmer-zz closed 5 years ago

jwzimmer-zz commented 7 years ago

Reported via freshdesk no. 87066:

The placement of comments in scripts is risky. It often hangs elsewhere from the desired location. I download Scatch 2 (v456.0.4) and I used to put comments in my scripts to help understanding. So I create a comment, type text of my comment (see screenshot Bug1), and when I want to attatch this comment to a specific instruction, it fails (see screenshot Bug2) Or It attachs to a bad instruction (see screenshot Bug3). As I show in picture Bug2, I wish to attatch a comment to block "ajouter 8 to y". I drag and drop the comment block just on this instruction but I got 2 bad answers : either the comment don't attatch to any bloc and remains where I drop it, or the comment attatch to a bloc far from the desired one. I met lot of comment attachment errors. I seems appear when procedures become complex (more than 10 nested blocks).

Metadata:

Screenshots provided by user

Bug1

screen shot 2017-08-16 at 10 51 13 am

Bug2

screen shot 2017-08-16 at 10 51 54 am

Bug3

screen shot 2017-08-16 at 10 52 19 am

Repro

I was able to repro part of this issue quickly (Offline Editor v456.0.4, Mac OS El Capitan), the part where the comment appears not to be connected to any stack, by dragging a block out, attaching a comment to it, then nesting that block within other blocks. However, I'm not sure of the exact steps required.

screen shot 2017-08-16 at 10 45 07 am screen shot 2017-08-16 at 10 44 18 am screen shot 2017-08-16 at 10 44 04 am screen shot 2017-08-16 at 10 43 53 am

Workaround from reporting user

I found a solution to attach a comment at the correct place. When it is attached at a bad place, 3 blocks below for instance, I try to attach it 3 blocks higher and the comment is attached at the correct place. It is a paliative but not satisfactory.