fix: improve fallback behavior for custom input labels#9942
Merged
Conversation
gonfunko
approved these changes
May 27, 2026
Comment on lines
+393
to
+394
| typeof value === 'object' && | ||
| value !== null && |
Contributor
There was a problem hiding this comment.
Probably invert these two checks?
Contributor
Author
There was a problem hiding this comment.
that seems fine too, but just curious why?
Contributor
Author
There was a problem hiding this comment.
normally value is going to be a string, so having this check first will fail the fastest (desired behavior for the common case) though i'm not sure it really matters either way
| break; | ||
| case 'field_image': | ||
| // Result: new Blockly.FieldImage('http://...', 80, 60, '*') | ||
| // Result: new Blockly.FieldImage('http://...', 80, 60, {alt: '*', flipRtl: false}) |
Contributor
There was a problem hiding this comment.
Can this also be fixed to use the correct format moving forward? No worries if you're planning to do that in another PR or just file a bug for it
Contributor
Author
There was a problem hiding this comment.
this is the legacy block factory which we'll delete soon so not going to fix it here but can file a bug to fix it in samples
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The basics
The details
Resolves
Fixes issue with fallback labels for custom inputs appearing for statement inputs that already have a better label.
Also fixes an issue with blocks that contain field images generated from the block factory not setting their alt text appropriately.
Proposed Changes
Reason for Changes
trying to improve the makecode if block situation
Test Coverage
Documentation
Additional Information