From c6184a8c8d9419e8da9e3c0f17ba0287b1d9623b Mon Sep 17 00:00:00 2001 From: Krishna Penukonda Date: Tue, 14 Jul 2026 06:02:40 +0000 Subject: [PATCH] fix: prevent layout shift between active/inactive sidebar items Active sidebar page entries used larger vertical padding for selected/current items, causing their computed height to differ from inactive entries. Keep padding consistent and only toggle visual active-state classes. --- lib/unfinal_web/live/editor_live.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/unfinal_web/live/editor_live.ex b/lib/unfinal_web/live/editor_live.ex index 794220d..20ce1e2 100644 --- a/lib/unfinal_web/live/editor_live.ex +++ b/lib/unfinal_web/live/editor_live.ex @@ -311,7 +311,7 @@ defmodule UnfinalWeb.EditorLive do class={[ "block rounded-lg px-3 py-1.5 hover:bg-white/50 hover:text-stone-950", @root_page_path == @path && - "bg-white/70 py-2 font-medium text-stone-950 shadow-sm shadow-stone-200/50" + "bg-white/70 font-medium text-stone-950 shadow-sm shadow-stone-200/50" ]} href={@root_page_path} > @@ -351,7 +351,7 @@ defmodule UnfinalWeb.EditorLive do :if={@path != @root_page_path and @path not in @page_paths} class="group relative rounded-lg bg-white/70 font-medium text-stone-950 shadow-sm shadow-stone-200/50" > - + {display_page_path(@path)}