fix: wrap field labels in join request view
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
6327ea00eb
commit
15e9a52bc9
2 changed files with 8 additions and 8 deletions
|
|
@ -222,9 +222,9 @@ defmodule MvWeb.JoinRequestLive.Show do
|
|||
|
||||
defp field_row(assigns) do
|
||||
~H"""
|
||||
<div class="flex gap-2">
|
||||
<span class="text-base-content/60 min-w-32 shrink-0">{@label}:</span>
|
||||
<span>
|
||||
<dl class="grid gap-1 md:grid-cols-[14rem_minmax(0,1fr)] md:gap-2">
|
||||
<dt class="m-0 text-base-content/60 whitespace-normal break-words">{@label}:</dt>
|
||||
<dd class="m-0 min-w-0">
|
||||
<%= if @value && @value != "" do %>
|
||||
{@value}
|
||||
<% else %>
|
||||
|
|
@ -232,8 +232,8 @@ defmodule MvWeb.JoinRequestLive.Show do
|
|||
{@empty_text || gettext("Not specified")}
|
||||
</span>
|
||||
<% end %>
|
||||
</span>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
"""
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -63,9 +63,9 @@ defmodule MvWeb.JoinRequestLive.ShowTest do
|
|||
|
||||
{:ok, view, _html} = live(conn, "/join_requests/#{join_request.id}")
|
||||
|
||||
assert has_element?(view, "span", "#{custom_field.name}:")
|
||||
assert has_element?(view, "span", "Alice Example")
|
||||
refute has_element?(view, "span", "#{custom_field.id}:")
|
||||
assert has_element?(view, "dt", "#{custom_field.name}:")
|
||||
assert has_element?(view, "dd", "Alice Example")
|
||||
refute has_element?(view, "dt", "#{custom_field.id}:")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue