microsoft / pxt

Microsoft MakeCode (PXT - Programming eXperience Toolkit)
https://makecode.com
MIT License
2.1k stars 588 forks source link

Fix Hint Popup Location in Tutorials #10243

Closed thsparks closed 1 month ago

thsparks commented 1 month ago

Fixes https://github.com/microsoft/pxt-minecraft/issues/2556

Previously, the top location of this popup was simply "unset". Sometimes it'd happen to be in the correct location (I think because of how other elements are laid out in the DOM), but often times it wouldn't line up correctly. Rather than relying on that somewhat ill-defined behavior, this just sets the top directly so it's underneath the tutorial window.

I spent half a day trying to get this more in the css and less in the typescript, but I wasn't making progress so I decided to leave it be for now. I have other bugs to work on :)

Upload Target: https://minecraft.makecode.com/app/b43f1cf83819e95134eb935cf604acf0318dbb44-669fb69e00

FYI you may notice this issue while playing around with the upload target (I did...). I'll be working on a fix for that separately: https://github.com/microsoft/pxt-minecraft/issues/2612