microsoft / microsoft/pxt-microbit
The dynamic enumeration block display does not represent the value: ENUM_GET
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 804
- Forks
- 721
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 2
Description
Creating enumerations with blocks: ENUM_GET
Creating enumerations with blocks
https://makecode.com/defining-blocks#creating-enumerations-with-blocks
Playground example : Create Enums from Blocks
Describe the bug
Unchecked(Unselected) member on enums dropdown list.
- When add block
- When convert JavaSctipt to Blocks
To Reproduce
Steps to reproduce the behavior:
Add block
- Open playground example : Create Enums from Blocks
- Click on
RUN - Drop the
Show number (Color)block fromLanguageextension - Unchecked
Redon enums dropdown list
Convert
- Switch to JavaScript
- Edit code,
language.showColor(Colors.Red)tolanguage.showColor(Colors.Blue) - Switch to Blocks,
Redis displayed, notBlue
Expected behavior
The specified value is checked.
Screenshots
Red is displayed on block, but unchecked Red on dropdown list.
Coding Colors.Blue on JavaScript, but Red is displayed on block.
Convert to Blocks:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked “Create Enums from Blocks” playground example and reproduce the issue by adding the Language extension’s Show number (Color) block, then by converting Colors.Blue from JavaScript to Blocks. Trace the dynamic enumeration dropdown’s displayed and checked values; done when the selected enum value is displayed and checked correctly in both workflows.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100