From 5eb7ccd837db480155ee2f816016ac545845c994 Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Tue, 17 Mar 2026 14:10:31 +0000 Subject: [PATCH] Fix overlapping buttons in chat --- lib/music_library_web/components/chat.ex | 29 ++++++++++++++++++++---- priv/gettext/default.pot | 1 + priv/gettext/en/LC_MESSAGES/default.po | 1 + 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/lib/music_library_web/components/chat.ex b/lib/music_library_web/components/chat.ex index 6aa4662c..d1e758fc 100644 --- a/lib/music_library_web/components/chat.ex +++ b/lib/music_library_web/components/chat.ex @@ -67,6 +67,7 @@ defmodule MusicLibraryWeb.Components.Chat do id={@sheet_id} placement="right" class="w-md sm:min-w-lg lg:min-w-2xl flex flex-col h-full" + hide_close_button > <%= if @view == :list do %> {render_list_view(assigns)} @@ -102,10 +103,20 @@ defmodule MusicLibraryWeb.Components.Chat do

{gettext("Chat history")}

- <.button size="sm" variant="soft" phx-click="new_chat" phx-target={@myself}> - <.icon name="hero-plus" class="icon" data-slot="icon" /> - {gettext("New chat")} - +
+ <.button size="sm" variant="soft" phx-click="new_chat" phx-target={@myself}> + <.icon name="hero-plus" class="icon" data-slot="icon" /> + {gettext("New chat")} + + <.button + size="icon-sm" + variant="ghost" + phx-click={Fluxon.close_dialog(@sheet_id)} + aria-label={gettext("Close")} + > + <.icon name="hero-x-mark" class="icon" /> + +
@@ -157,7 +168,7 @@ defmodule MusicLibraryWeb.Components.Chat do defp render_active_view(assigns) do ~H"""
-

+

{gettext("Chat about %{title}", title: @title)}

<.button @@ -180,6 +191,14 @@ defmodule MusicLibraryWeb.Components.Chat do > <.icon name="hero-plus" class="icon" /> + <.button + size="icon-sm" + variant="ghost" + phx-click={Fluxon.close_dialog(@sheet_id)} + aria-label={gettext("Close")} + > + <.icon name="hero-x-mark" class="icon" /> +