Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emoji break swap from JS back to blocks #2774

Open
kiki-lee opened this issue Jan 6, 2021 · 5 comments 路 May be fixed by microsoft/pxt#7861
Open

Emoji break swap from JS back to blocks #2774

kiki-lee opened this issue Jan 6, 2021 · 5 comments 路 May be fixed by microsoft/pxt#7861
Assignees
Labels
bug Something isn't working decompile p2

Comments

@kiki-lee
Copy link
Contributor

kiki-lee commented Jan 6, 2021

Describe the bug
I duplicated an arcade program by copying the JS into a new doc. When I went to switch it to blocks, it gave me an error. After some trial/error, I found that the culprit was this little guy: 馃懟

To Reproduce
Steps to reproduce the behavior:

  1. Start a new project
  2. Flip to JS
  3. Paste this code:

let mySprite = sprites.create(img. . . . . . . . . . b 5 b . . . . . . . . . . . . b 5 b . . . . . . . . . . b b b b b b . . . . . . . . . b b 5 5 5 5 5 b . . . . . . . b b 5 d 1 f 5 5 d f . . . . . . b 5 5 1 f f 5 d 4 c . . . . . . b 5 5 d f b d d 4 4 . . . b b b d 5 5 5 5 5 4 4 4 4 4 b b d d d b b d 5 5 4 4 4 4 4 b . b b d 5 5 5 b 5 5 5 5 5 5 b . . c d c 5 5 5 5 d 5 5 5 5 5 5 b . c b d c d 5 5 b 5 5 5 5 5 5 b . . c d d c c b d 5 5 5 5 5 d b . . . c b d d d d d 5 5 5 b b . . . . . c c c c c c c c b b . . . . . . . . . . . . . . . . . . . , SpriteKind.Player)
mySprite.say("馃懟", 100)

  1. Attempt to flip back to blocks
  2. Replace the ghost with a space
  3. Successfully flip back to blocks

Expected behavior
Accepted emoji should behave just like text.

Desktop (please complete the following information):

  • Windows 10
  • Newest Edge
@kiki-lee kiki-lee changed the title Emoji's break swap from JS back to blocks Emoji break swap from JS back to blocks Jan 6, 2021
@abchatra
Copy link
Contributor

abchatra commented Jan 6, 2021

We don't have support for emjois AFAIK. @jwunderl ?

@abchatra abchatra closed this as completed Jan 6, 2021
@abchatra abchatra reopened this Jan 6, 2021
@kiki-lee
Copy link
Contributor Author

Then we should probably strip them out when we try to convert or not let them be pasted in in the first place?

@jwunderl @riknoll @shakao

@jwunderl
Copy link
Member

jwunderl commented Feb 11, 2021

Oh, I missed this issue. I think microsoft/pxt#7861 would actually fix this (as a side effect) as it was probably breaking due to incorrectly escaping the emoji and that was something I had to fix to get the swapping working.

edit: yup, it fixes it: https://arcade.makecode.com/app/0610dda95754bed7e6df6ce7485f7d128dd0f4ea-1375337f35#pub:_02ucyLgqDU5C I'll try and finish that pr up soon, there's just a small improvement / fix I need to make to debugger that I want to make before opening up from being a draft

@shakao
Copy link
Contributor

shakao commented Feb 11, 2021

we unfortunately don't have font support though, so the emoji will successfully decompile but show up as a blank space. i think everyone's on board with adding them to the font (cc @riknoll) but it just a pretty manual process and we haven't gotten around to it yet!

@kiki-lee
Copy link
Contributor Author

we unfortunately don't have font support though, so the emoji will successfully decompile but show up as a blank space. i think everyone's on board with adding them to the font (cc @riknoll) but it just a pretty manual process and we haven't gotten around to it yet!

I think that's fine. As long as it doesn't leave people befuddled as to why their block won't switch back.

@jwunderl jwunderl linked a pull request Feb 18, 2021 that will close this issue
@riknoll riknoll added bug Something isn't working next-release p2 labels Jul 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working decompile p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants