mirror of
https://github.com/google/blockly.git
synced 2026-06-03 01:40:08 +02:00
fix: Block labels should not use custom input labels (nested inputs) (#9916)
* fix: Block labels should not use custom input labels (nested inputs) * Join inputs with comma
This commit is contained in:
@@ -308,7 +308,7 @@ export function getInputLabels(
|
||||
|
||||
return inputsToLabel.map((input) => {
|
||||
const customLabel = useCustomLabels ? input.getAriaLabelText() : null;
|
||||
return customLabel ?? input.getLabel(verbosity);
|
||||
return customLabel ?? input.getLabel(verbosity, useCustomLabels);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -405,7 +405,7 @@ export class Input {
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
getLabel(verbosity = Verbosity.STANDARD): string {
|
||||
getLabel(verbosity = Verbosity.STANDARD, useCustomLabels = true): string {
|
||||
if (!this.isVisible()) return '';
|
||||
|
||||
const labels = computeFieldRowLabel(this, false, verbosity);
|
||||
@@ -414,7 +414,11 @@ export class Input {
|
||||
const childBlock = this.connection.targetBlock();
|
||||
if (childBlock && !childBlock.isInsertionMarker()) {
|
||||
labels.push(
|
||||
getInputLabels(childBlock as BlockSvg, verbosity).join(' '),
|
||||
getInputLabels(
|
||||
childBlock as BlockSvg,
|
||||
verbosity,
|
||||
useCustomLabels,
|
||||
).join(', '),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user