From 5d95c2526f883216c581dde4808f241438939d55 Mon Sep 17 00:00:00 2001 From: Leonardo de Oliveira Ramos Date: Mon, 8 Jul 2024 17:37:07 -0300 Subject: [PATCH 1/3] feat: improving readability for projects menu --- lib/lightning_web/live/components/menu.ex | 138 ++++++++++++---------- 1 file changed, 73 insertions(+), 65 deletions(-) diff --git a/lib/lightning_web/live/components/menu.ex b/lib/lightning_web/live/components/menu.ex index 9366f37f8d..5516210f97 100644 --- a/lib/lightning_web/live/components/menu.ex +++ b/lib/lightning_web/live/components/menu.ex @@ -57,74 +57,82 @@ defmodule LightningWeb.Components.Menu do def projects_dropdown(assigns) do ~H""" -
-
+ <% else %> +
+ - -
+ + + + + + + <% end %> """ end From 82b6022de0c1c4a94f5d7dacf41e0bdaf379cb0d Mon Sep 17 00:00:00 2001 From: Leonardo de Oliveira Ramos Date: Mon, 8 Jul 2024 17:37:32 -0300 Subject: [PATCH 2/3] feat: improving saving button flickering --- lib/lightning_web/live/components/form.ex | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/lightning_web/live/components/form.ex b/lib/lightning_web/live/components/form.ex index 63c1389c3b..9a52f354fc 100644 --- a/lib/lightning_web/live/components/form.ex +++ b/lib/lightning_web/live/components/form.ex @@ -14,6 +14,7 @@ defmodule LightningWeb.Components.Form do py-2 px-4 border + min-w-\[7rem\] border-transparent shadow-sm text-sm From 2be8d67d72df896de9d930da47af223e47c045e1 Mon Sep 17 00:00:00 2001 From: Leonardo de Oliveira Ramos Date: Mon, 8 Jul 2024 17:39:32 -0300 Subject: [PATCH 3/3] chore: making buttons text uniform --- lib/lightning_web/live/auth_providers/form_component.ex | 2 +- lib/lightning_web/live/first_setup_live/superuser.html.heex | 5 ++++- lib/lightning_web/live/project_live/form_component.html.heex | 5 ++++- .../live/project_live/github_sync_component.html.heex | 2 +- lib/lightning_web/live/project_live/settings.html.heex | 4 ++-- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/lib/lightning_web/live/auth_providers/form_component.ex b/lib/lightning_web/live/auth_providers/form_component.ex index 5f5eb97d1f..53f81acdaf 100644 --- a/lib/lightning_web/live/auth_providers/form_component.ex +++ b/lib/lightning_web/live/auth_providers/form_component.ex @@ -184,7 +184,7 @@ defmodule LightningWeb.AuthProvidersLive.FormComponent do
<.submit_button - phx-disable-with="Saving" + phx-disable-with="Saving..." disabled={!@changeset.valid?} > Save diff --git a/lib/lightning_web/live/first_setup_live/superuser.html.heex b/lib/lightning_web/live/first_setup_live/superuser.html.heex index c6883ad22f..e63038c5dc 100644 --- a/lib/lightning_web/live/first_setup_live/superuser.html.heex +++ b/lib/lightning_web/live/first_setup_live/superuser.html.heex @@ -87,7 +87,10 @@
- <.submit_button phx-disable-with="Saving" disabled={!@changeset.valid?}> + <.submit_button + phx-disable-with="Saving..." + disabled={!@changeset.valid?} + > Save
diff --git a/lib/lightning_web/live/project_live/form_component.html.heex b/lib/lightning_web/live/project_live/form_component.html.heex index c4a96f8032..0ac273b70e 100644 --- a/lib/lightning_web/live/project_live/form_component.html.heex +++ b/lib/lightning_web/live/project_live/form_component.html.heex @@ -122,7 +122,10 @@
- <.submit_button phx-disable-with="Saving" disabled={!@changeset.valid?}> + <.submit_button + phx-disable-with="Saving..." + disabled={!@changeset.valid?} + > Save
diff --git a/lib/lightning_web/live/project_live/github_sync_component.html.heex b/lib/lightning_web/live/project_live/github_sync_component.html.heex index 9d6721e95d..a5895b6df9 100644 --- a/lib/lightning_web/live/project_live/github_sync_component.html.heex +++ b/lib/lightning_web/live/project_live/github_sync_component.html.heex @@ -186,7 +186,7 @@ "Contact an editor or admin to sync." } phx-click="initiate-sync" - phx-disable-with="Syncing.." + phx-disable-with="Syncing..." phx-target={@myself} class="bg-primary-600 hover:bg-primary-700 inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500" > diff --git a/lib/lightning_web/live/project_live/settings.html.heex b/lib/lightning_web/live/project_live/settings.html.heex index ed1b29f035..cb50f1fe3d 100644 --- a/lib/lightning_web/live/project_live/settings.html.heex +++ b/lib/lightning_web/live/project_live/settings.html.heex @@ -116,7 +116,7 @@ !(@project_changeset.valid? and can_edit_project(assigns) and can_edit_project(assigns)) } - phx-disable-with="Saving" + phx-disable-with="Saving..." > Save @@ -994,7 +994,7 @@ not @project_changeset.valid? or not @can_edit_data_retention } - phx-disable-with="Saving" + phx-disable-with="Saving..." > Save