Feature Request: Dropdown / Enum Options for Custom Block Arguments #2652
Closed
luanveras3
started this conversation in
Ideas
Replies: 1 comment
-
|
Moved to #2657. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Pybricks team,
I’d like to suggest a feature that could significantly improve usability when working with custom blocks in the block-based interface.
Currently, when creating a custom block that accepts arguments, those arguments are free-form inputs. While this is flexible, it can sometimes make usage less intuitive, especially for students or during rapid development.
Feature request:
It would be very helpful to allow defining a predefined list of possible values (similar to a dropdown or enum) for custom block arguments.
Example use case:
I have a custom block like:
DRIVE_STRAIGHT(distance, speed)
But in other cases, I might want something like:
FOLLOW_LINE(mode)
Where mode could be:
LEFT
RIGHT
CENTER
Instead of typing these manually, it would be much more user-friendly if the argument could be selected from a dropdown menu.
Benefits:
Reduces input errors (typos, inconsistent values)
Improves readability of programs
Makes it easier for students and beginners
Brings custom blocks closer to the usability of native blocks
This would make custom blocks far more powerful and structured, especially for educational environments and team-based robotics projects.
Is this something that could be considered for future development?
Thanks again for your great work!
Beta Was this translation helpful? Give feedback.
All reactions