Skip to content

Commit 0aa176e

Browse files
authored
fix: Remove clickable images from block summary. (#9480)
1 parent 7a3af80 commit 0aa176e

1 file changed

Lines changed: 17 additions & 9 deletions

File tree

core/block_svg.ts

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import {BlockDragStrategy} from './dragging/block_drag_strategy.js';
3333
import type {BlockMove} from './events/events_block_move.js';
3434
import {EventType} from './events/type.js';
3535
import * as eventUtils from './events/utils.js';
36+
import {FieldImage} from './field_image.js';
3637
import {FieldLabel} from './field_label.js';
3738
import {getFocusManager} from './focus_manager.js';
3839
import {IconType} from './icons/icon_types.js';
@@ -2059,15 +2060,22 @@ function buildBlockSummary(block: BlockSvg): BlockSummary {
20592060
): string {
20602061
return block.inputList
20612062
.flatMap((input) => {
2062-
const fields = input.fieldRow.map((field) => {
2063-
if (!field.isVisible()) return [];
2064-
// If the block is a full block field, we only want to know if it's an
2065-
// editable field if we're not directly on it.
2066-
if (field.EDITABLE && !field.isFullBlockField() && !isNestedInput) {
2067-
inputCount++;
2068-
}
2069-
return [field.getText() ?? field.getValue()];
2070-
});
2063+
const fields = input.fieldRow
2064+
.filter((field) => {
2065+
if (!field.isVisible()) return false;
2066+
if (field instanceof FieldImage && field.isClickable()) {
2067+
return false;
2068+
}
2069+
return true;
2070+
})
2071+
.map((field) => {
2072+
// If the block is a full block field, we only want to know if it's an
2073+
// editable field if we're not directly on it.
2074+
if (field.EDITABLE && !field.isFullBlockField() && !isNestedInput) {
2075+
inputCount++;
2076+
}
2077+
return [field.getText() ?? field.getValue()];
2078+
});
20712079
if (
20722080
input.isVisible() &&
20732081
input.connection &&

0 commit comments

Comments
 (0)