Truncation of collapsed block text

58 views
Skip to first unread message

Q Okski

unread,
Dec 7, 2022, 7:28:47 AM12/7/22
to Blockly
Hello,

Is there a way of extending the display text of collapsed blocks to show more of the content rather that truncating the text and ending the block with jagged edge?  

I am thinking that the COLLAPSE_CHARS constant in the internal_constants.ts needs to be changed, but is there a way to do that using the same pattern shown in the Custom Renderers codelab?

Also does the length of the collapsed row need to be increased using a custom renderer so the untruncated text has enough space to be displayed? 

Thank you for any help

Maribeth Bottorff

unread,
Dec 7, 2022, 7:14:43 PM12/7/22
to Blockly
At this time there is no way to configure the length of the truncated text. This is a reasonable feature request and there has been previous discussion about this but it's not possible right now. If you'd like to file a feature request you can do so here: https://github.com/google/blockly/issues/new/choose

We'd also likely accept a PR for this. IMO this constant would be moved to a value on the renderer so that it could be configured just like the other rendering values.

Maribeth

Reply all
Reply to author
Forward
0 new messages