From 0f58341f6d38c01f33923c210d04e1187ca21dac Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Tue, 26 Aug 2025 17:15:24 +0300 Subject: [PATCH] Uniform size and positioning of all modals --- .claude/settings.local.json | 3 ++- lib/music_library_web/live/artist_live/show.html.heex | 5 ++++- .../live/collection_live/index.html.heex | 9 ++++++--- .../live/collection_live/show.html.heex | 2 ++ .../live/online_store_template_live/index.html.heex | 3 ++- .../live/scrobble_rules_live/index.html.heex | 3 ++- lib/music_library_web/live/wishlist_live/index.html.heex | 6 ++++-- lib/music_library_web/live/wishlist_live/show.html.heex | 3 ++- 8 files changed, 24 insertions(+), 10 deletions(-) diff --git a/.claude/settings.local.json b/.claude/settings.local.json index a9b1bd6d..0e6b647a 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -20,7 +20,8 @@ "Bash(mix phx.routes:*)", "Bash(mix assets.deploy:*)", "mcp__tidewave__get_logs", - "mcp__tidewave__project_eval" + "mcp__tidewave__project_eval", + "Bash(mix format:*)" ] }, "enableAllProjectMcpServers": false diff --git a/lib/music_library_web/live/artist_live/show.html.heex b/lib/music_library_web/live/artist_live/show.html.heex index 771f51d5..cab997bf 100644 --- a/lib/music_library_web/live/artist_live/show.html.heex +++ b/lib/music_library_web/live/artist_live/show.html.heex @@ -219,8 +219,9 @@ <.modal :if={@live_action == :import} - class="md:min-w-2xl max-w-sm md:max-w-3xl" id="record-modal" + class="md:min-w-2xl max-w-sm md:max-w-3xl mt-8" + placement="top" open on_close={JS.patch(~p"/artists/#{@artist.musicbrainz_id}")} > @@ -238,6 +239,8 @@ <.modal :if={@live_action == :edit} id="artist-info-modal" + class="md:min-w-2xl max-w-sm md:max-w-3xl mt-8" + placement="top" open on_close={JS.patch(~p"/artists/#{@artist.musicbrainz_id}")} > diff --git a/lib/music_library_web/live/collection_live/index.html.heex b/lib/music_library_web/live/collection_live/index.html.heex index 308e4de1..ef78e08d 100644 --- a/lib/music_library_web/live/collection_live/index.html.heex +++ b/lib/music_library_web/live/collection_live/index.html.heex @@ -62,8 +62,9 @@ <.modal :if={@live_action == :edit} - class="md:min-w-2xl" id="record-modal" + class="md:min-w-2xl max-w-sm md:max-w-3xl mt-8" + placement="top" open on_close={JS.patch(back_path(@record_list_params))} > @@ -79,8 +80,9 @@ <.modal :if={@live_action == :import} - class="md:min-w-2xl max-w-sm md:max-w-3xl" id="record-modal" + class="md:min-w-2xl max-w-sm md:max-w-3xl mt-8" + placement="top" open on_close={JS.patch(back_path(@record_list_params))} > @@ -98,8 +100,9 @@ <.modal :if={@live_action == :barcode_scan} - class="min-w-sm md:min-w-2xl max-w-3xl" id="barcode-scanner-modal" + class="md:min-w-2xl max-w-sm md:max-w-3xl mt-8" + placement="top" open on_close={JS.patch(back_path(@record_list_params))} > diff --git a/lib/music_library_web/live/collection_live/show.html.heex b/lib/music_library_web/live/collection_live/show.html.heex index 5ce49080..fdccd891 100644 --- a/lib/music_library_web/live/collection_live/show.html.heex +++ b/lib/music_library_web/live/collection_live/show.html.heex @@ -324,6 +324,8 @@ <.modal :if={@live_action == :edit} id="record-modal" + class="md:min-w-2xl max-w-sm md:max-w-3xl mt-8" + placement="top" open on_close={JS.patch(~p"/collection/#{@record}")} > diff --git a/lib/music_library_web/live/online_store_template_live/index.html.heex b/lib/music_library_web/live/online_store_template_live/index.html.heex index c790549b..a6ff3b53 100644 --- a/lib/music_library_web/live/online_store_template_live/index.html.heex +++ b/lib/music_library_web/live/online_store_template_live/index.html.heex @@ -93,8 +93,9 @@ <.modal :if={@live_action in [:new, :edit]} - class="min-w-sm md:min-w-2xl max-w-3xl" id="template-modal" + class="md:min-w-2xl max-w-sm md:max-w-3xl mt-8" + placement="top" open on_close={JS.patch(~p"/online-store-templates")} > diff --git a/lib/music_library_web/live/scrobble_rules_live/index.html.heex b/lib/music_library_web/live/scrobble_rules_live/index.html.heex index 1841fefd..bc33495a 100644 --- a/lib/music_library_web/live/scrobble_rules_live/index.html.heex +++ b/lib/music_library_web/live/scrobble_rules_live/index.html.heex @@ -101,8 +101,9 @@ <.modal :if={@live_action in [:new, :edit]} - class="min-w-sm md:min-w-2xl max-w-3xl" id="scrobble_rule-modal" + class="md:min-w-2xl max-w-sm md:max-w-3xl mt-8" + placement="top" open on_close={JS.patch(~p"/scrobble-rules")} > diff --git a/lib/music_library_web/live/wishlist_live/index.html.heex b/lib/music_library_web/live/wishlist_live/index.html.heex index 341b2508..4a1e35fb 100644 --- a/lib/music_library_web/live/wishlist_live/index.html.heex +++ b/lib/music_library_web/live/wishlist_live/index.html.heex @@ -50,8 +50,9 @@ <.modal :if={@live_action == :edit} - class="md:min-w-2xl" id="record-modal" + class="md:min-w-2xl max-w-sm md:max-w-3xl mt-8" + placement="top" open on_close={JS.patch(back_path(@record_list_params))} > @@ -67,8 +68,9 @@ <.modal :if={@live_action == :import} - class="md:min-w-2xl max-w-sm md:max-w-3xl" id="record-modal" + class="md:min-w-2xl max-w-sm md:max-w-3xl mt-8" + placement="top" open on_close={JS.patch(back_path(@record_list_params))} > diff --git a/lib/music_library_web/live/wishlist_live/show.html.heex b/lib/music_library_web/live/wishlist_live/show.html.heex index fab6664f..a3317440 100644 --- a/lib/music_library_web/live/wishlist_live/show.html.heex +++ b/lib/music_library_web/live/wishlist_live/show.html.heex @@ -304,8 +304,9 @@ <.modal :if={@live_action == :edit} - class="md:min-w-2xl" id="record-modal" + class="md:min-w-2xl max-w-sm md:max-w-3xl mt-8" + placement="top" open on_close={JS.patch(~p"/wishlist/#{@record}")} >