app/views/lookbook/components/_sidebar.html.erb in lookbook-0.7.1 vs app/views/lookbook/components/_sidebar.html.erb in lookbook-0.7.2.beta.0

- old
+ new

@@ -1,9 +1,9 @@ <div x-data="sidebar" @page:morphed.window="setActiveNavItem" - class="h-full bg-gray-100 overflow-hidden flex flex-col" + class="h-full bg-gray-100 overflow-hidden flex flex-col relative" x-show="$store.sidebar.open" x-cloak> <div class="bg-white h-10 border-b border-gray-300 flex flex-none items-center relative pl-4 pr-4"> <%= component "branding" %> @@ -12,12 +12,12 @@ </button> </div> <% if feature_enabled?(:pages) && Lookbook.pages.any? %> <div - class="grid overflow-hidden" - :style="`grid-template-rows: ${$store.sidebar.panelSplits[0] || 1}fr 1px ${$store.sidebar.panelSplits[1] || 1}fr; height: calc(100vh - 40px)`" + class="grid overflow-hidden flex-grow" + :style="`grid-template-rows: ${$store.sidebar.panelSplits[0] || 1}fr 1px ${$store.sidebar.panelSplits[1] || 1}fr;`" x-ref="sidebarPanels"> <div class="flex flex-col overflow-hidden"> <div class="flex items-center flex-none border-b border-gray-300 h-10 bg-white relative px-4"> <h2 class="whitespace-nowrap relative">Previews</h2> </div> @@ -47,9 +47,23 @@ <div x-ref="filter" class="px-2 py-2 relative" x-cloak> <%= component "filter" %> </div> <div class="flex-grow overflow-y-auto unsectioned"> <%= component "nav", items: Lookbook.previews.as_tree, filterable: true %> + </div> + <% end %> + + <% if Lookbook::Preview.errors.any? %> + <div class="flex-none" x-ref="preview-errors" id="preview-errors"> + <div class="flex items-center border-b border-t border-gray-300 h-10 bg-white px-4"> + <h2 class="flex items-center flex-none"> + <%= icon "alert-triangle", size: 4, class: "text-red-700" %> + <span class="ml-2">Preview load errors</span> + </h2> + </div> + <div class="h-full max-h-[300px] overflow-hidden"> + <%= component "errors", errors: Lookbook::Preview.errors %> + </div> </div> <% end %> </div> \ No newline at end of file