Improve UX of join requests and fix minor bugs #492

Merged
simon merged 12 commits from bugfix/480-fix-minor-bugs into main 2026-05-06 14:34:44 +02:00
2 changed files with 8 additions and 8 deletions
Showing only changes of commit 15e9a52bc9 - Show all commits

View file

@ -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

View file

@ -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