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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
groups attribute is not properly processed #7258
Comments
@ganicke looks like a docs issue. |
@pelikhan - It seems that the first member of the namespace with its /**
* Organize your blocks in groups
*/
//% color="#AA278D"
//% groups="['Veggies', 'Fruits']"
namespace food {
//% block
//% group="Fruits"
export function apple() {
}
//% block
//% group="Veggies"
export function potato() {
}
//% block
//% group="Fruits"
export function banana() {
}
//% block
//% group="Veggies"
export function bean() {
}
} |
@ganicke I think the /**
* Organize your blocks in groups
*/
//% color="#AA278D"
//% groups='["Veggies", "Fruits"]'
namespace food {
//% block
//% group="Fruits"
export function apple() {
}
//% block
//% group="Veggies"
export function potato() {
}
//% block
//% group="Fruits"
export function banana() {
}
//% block
//% group="Veggies"
export function bean() {
}
} |
This is just nuts and are we sure if those are a fruit or veggie? |
Describe the bug
According to https://makecode.com/defining-blocks#category,
, and it has a sample syntax of the
groups
attribute://% groups=['LED matrix', 'Control flow', 'others']
Unfortunately, that does work.
On https://makecode.com/playground#basic-groups, another syntax is shown:
//% groups="['Fruits', 'Veggies']"
Sadly, that does not work either.
The only syntax that appears to work is as follows:
//% groups='["Fruits", "Veggies"]'
I think either the above samples should amended, or the parser should support all of them.
To Reproduce
//% groups="['Fruits', 'Veggies']"
with//% groups=['Fruits', 'Veggies']
//% groups=['Fruits', 'Veggies']
with//% groups=["Fruits", "Veggies"]
//% groups=["Fruits", "Veggies"]
with//% groups='["Fruits", "Veggies"]'
Actual behavior
After Step 2, 4 and 6:
After Step 8:
The text was updated successfully, but these errors were encountered: