Skip to content

Commit

Permalink
fix(frontend): avoid displaying long description text for block (#8688)
Browse files Browse the repository at this point in the history
Co-authored-by: Toran Bruce Richards <[email protected]>
  • Loading branch information
majdyz and Torantulino authored Nov 18, 2024
1 parent 6fa4b8c commit 402789d
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,10 @@ export const BlocksControl: React.FC<BlocksControlProps> = ({
{beautifyString(block.name).replace(/ Block$/, "")}
</span>
<span className="block break-words text-xs font-normal text-gray-500">
{block.description}
{/* Cap description at 100 characters max */}
{block.description?.length > 100
? block.description.slice(0, 100) + "..."
: block.description}
</span>
</div>
<div
Expand Down

0 comments on commit 402789d

Please sign in to comment.