visual warning when max_label_length exceeded

This commit is contained in:
Gavin McDonald
2025-05-11 15:01:19 -04:00
parent 8a42947995
commit 9cc3621144
5 changed files with 19 additions and 8 deletions

View File

@@ -13,7 +13,7 @@ defmodule LabelmakerWeb.Tools do
|> Enum.map(fn
{:label, label} ->
if String.length(label) > Constants.max_label_length(),
do: {:label, String.slice(label, 0, Constants.max_label_length())},
do: {:label, String.slice(label, 0, Constants.max_label_length() + 1)},
else: {:label, label}
{:preview_height, _} ->