New feature, default values for properties and functions

At this moment, we are unable to attach examples to the parameters from extensions.

I think there was a proposal about this topic.

1 Like

As mentioned, there is no way for extensions to do this. The default blocks feature was implemented in App Inventor well before extensions were added, and it would be good for us to revisit this part of the system to make it more generalizable for both our built-in components and useful for extension developers as well. If someone is interested in refactoring the system to make components declare their default blocks rather than hard coding it please let me know.

3 Likes

I think I can add this functionality.

3 Likes

That'd be awesome. I can't wait to get it into FAST-CLI.

We can add standard values ​​as shadow blocks. Currently, types such as text, number, boolean, and color are supported.

image

1 Like

We previously ruled out using shadow blocks because Blockly stores the shadow block in addition to the real block, which increases the size of the project files without really adding value.

2 Likes

Okay, then I'll do it on regular blocks.

1 Like

Should all designer properties with default values ​​automatically have a default value block included? Or should everything be left to manual modification?

If the setter doesn't have assets or helper blocks annotated, it might be useful to take the default value from its designer property if has.

To add the ability to set colors as defaultValue, we need a different color picker that supports an alpha channel. I've added the same picker to Blockly as the one in Designer. Is this acceptable? I'd have to add this PR first.

1 Like