Collection of small UI Improvements closes #511 #527

Merged
moritz merged 7 commits from issue/mitgliederverwaltung-511 into main 2026-06-15 15:44:58 +02:00
Showing only changes of commit be57dcfce8 - Show all commits

View file

@ -1160,17 +1160,21 @@ defmodule MvWeb.CoreComponents do
end end
# Combines column class with optional sticky header classes (desktop only; theme-friendly bg). # Combines column class with optional sticky header classes (desktop only; theme-friendly bg).
# hover:z-20/focus-within:z-20 lift the active header cell above sibling sticky cells (shared z-10)
# so its hover tooltip bubble is not clipped by an adjacent opaque bg-base-100 header background.
defp table_th_class(col, sticky_header) do defp table_th_class(col, sticky_header) do
base = Map.get(col, :class) base = Map.get(col, :class)
sticky = if sticky_header, do: "lg:sticky lg:top-0 bg-base-100 z-10", else: nil sticky = if sticky_header, do: sticky_th_classes(), else: nil
[base, sticky] |> Enum.filter(& &1) |> Enum.join(" ") [base, sticky] |> Enum.filter(& &1) |> Enum.join(" ")
end end
defp table_th_sticky_class(true), defp table_th_sticky_class(true), do: sticky_th_classes()
do: "lg:sticky lg:top-0 bg-base-100 z-10"
defp table_th_sticky_class(_), do: nil defp table_th_sticky_class(_), do: nil
defp sticky_th_classes,
do: "lg:sticky lg:top-0 bg-base-100 z-10 hover:z-20 focus-within:z-20"
@doc """ @doc """
Renders a reorderable table (sortable list) with drag handle and keyboard support. Renders a reorderable table (sortable list) with drag handle and keyboard support.