Need speech bubble on top of front layer sprite

I have many projects where a sprite glides in front of another sprite. In Snap, e.g., if the lower layer sprite has a speech bubble, the bubble is hidden behind the front layer sprite. This doesn't happen instead in Scratch, where speech bubbles are always on top of other sprites, e.g.

Is this something that could be taken into consideration in Snap? Or there are reasons in Snap to allow speech bubbles to be hidden by other sprites?

If this is a desired behavior, can someone point me to the methods to look at in order to allow my own personal copy of Snap to easily run projects imported from Scratch where speech bubbles are always on top of all sprites, without having to keep switching sprite's layers?

I'm sorry, Stefano, but I cannot confirm your claimed behavior in Scratch. From what I can see the layering of Snap's speech bubbles behaves exactly the same as in Scratch, i.e. it depends on the sprite's layer and only changes when the sprite's layer changes.

[edit: ] Oh wait! In current Scratch it's even worse, the speech balloon's layer does not change when the sprite's layer changes. Geez, that's clearly a bug in Scratch, don't you think?

in scratch, when a speech bubble appears, it goes to the top layer, so when a sprite says "hello" and there's another sprite in the front layer and it's on top of the spot where the speech bubble appears, the speech bubble is on top of the sprite even though the sprite that the speech bubble belongs to is in the back layer. If the other sprite goes to the front layer, the speech bubble is under that sprite, but when the parent sprite (the owner of the bubble) is moved, the bubble doesn't move. So speech bubbles go to the front layer when they appear. Here's another thing, the bubble layer only changes if the bubble is unloaded, then it resets, so when a new say block is run, it really changes the bubble text instead of creating a new bubble. That is so confusing.

lol, it's possible to do this
the front sprite owns the speech bubble

This is certainly bad. But in Scratch a sprite cannot hide a speech bubble (do you have a counterexample?). In Snap instead sprites can hide speech bubbles (as shown in the two sample projects cited above that I have now correctly shared)

if you look at my post you can see that it is possible to hide a speech bubble in scratch.

In Scratch you can hide a speech bubble if the sprite simply moves behind another one with a speech bubble.

Yes, sure, in Scratch speech bubbles can hide other speech bubbles. But sprites cannot hide speech bubbles. This is different in Snap as you can see in the example project I prepared.

If this is a wanted behavior (even if I don't see the point of hiding a speech bubble behind a sprite) this is fine with me. In this case, can you point me to the correct methods I should change in order to get the exact Scratch behavior?

Do you a sample project showing this behavior?

yeah, I just forgot to give you the link

This doesn't happen in Scratch 1.4. The bubbles always stay on top. In any case, this happens in Scratch 3 if you change the layer after the bubble has shown up. In Snap instead this can happens as soon as the bubble shows up, even if you don't change the sprite layer in the meantime.

And this is what I need: that the bubble stays on top of all sprites if you don't change the layer of a sprite.

In Snap! speech balloons stay ontop of the sprite they belong to, at the sprite's layer. That's an easy to understand, consistent rule. You can change the sprite's layer, and that also affects its speech balloon. Again, easy, consistent and predictable, giving you all the tools you need to control them via their sprites. Technically speech balloons are parts of their sprite, implemented as submorphs. I guess you could theoretically implement another architecture, treating balloons as separate morphs. But you'd run into a lot of complications if you did that, and you'd need to change very many things. I wouldn't encourage it. Also notice that Scratch's bugginess in this regard is an indicator that another architecture might not work any better at all.

I understand that the rule is technically ideal. But speech ballons are there as you are supposed to be able to read them. Hiding a ballon behind another element (except when it is really difficult doing something else if you keep dinamically changing the sprite's layers) it is not something that I would suppose someone could want as a standard behavior.

So, I guess I have to dig into this mechanism to try to square the circle.

Unfortunately I cannot understand the flow of Smalltalk code, but the treatment of speech ballons in BYOB is exactly what I need and what I think anyone would want. Ballons in BYOB are always on top.