fix: Remove clickable images from block summary. (#9480)

This commit is contained in:
Ben Henning
2025-11-20 17:41:49 -08:00
committed by GitHub
parent 7a3af80461
commit 0aa176e6e9

View File

@@ -33,6 +33,7 @@ import {BlockDragStrategy} from './dragging/block_drag_strategy.js';
import type {BlockMove} from './events/events_block_move.js';
import {EventType} from './events/type.js';
import * as eventUtils from './events/utils.js';
import {FieldImage} from './field_image.js';
import {FieldLabel} from './field_label.js';
import {getFocusManager} from './focus_manager.js';
import {IconType} from './icons/icon_types.js';
@@ -2059,15 +2060,22 @@ function buildBlockSummary(block: BlockSvg): BlockSummary {
): string {
return block.inputList
.flatMap((input) => {
const fields = input.fieldRow.map((field) => {
if (!field.isVisible()) return [];
// If the block is a full block field, we only want to know if it's an
// editable field if we're not directly on it.
if (field.EDITABLE && !field.isFullBlockField() && !isNestedInput) {
inputCount++;
}
return [field.getText() ?? field.getValue()];
});
const fields = input.fieldRow
.filter((field) => {
if (!field.isVisible()) return false;
if (field instanceof FieldImage && field.isClickable()) {
return false;
}
return true;
})
.map((field) => {
// If the block is a full block field, we only want to know if it's an
// editable field if we're not directly on it.
if (field.EDITABLE && !field.isFullBlockField() && !isNestedInput) {
inputCount++;
}
return [field.getText() ?? field.getValue()];
});
if (
input.isVisible() &&
input.connection &&