Deployment and lifecycle management for Nix
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: use static Tailwind classes for responsive hide_on breakpoints

Replace dynamic string interpolation in table component's hide_on and
action_hide_on with a helper that returns complete static class strings.
Tailwind's purge scanner cannot detect dynamically constructed classes
like "hidden #{breakpoint}:table-cell", causing them to be stripped from
the CSS output.

sow-127

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+12 -4
+12 -4
apps/sower/lib/sower_web/components/sower_components.ex
··· 38 38 assign(assigns, row_id: assigns.row_id || fn {id, _item} -> id end) 39 39 end 40 40 41 + assigns = assign(assigns, :action_hide_classes, hide_on_classes(assigns.action_hide_on)) 42 + 41 43 ~H""" 42 44 <div class="px-4 sm:overflow-visible sm:px-0"> 43 45 <table class={["w-full", @show_header && "mt-11"]}> ··· 47 49 :for={col <- @col} 48 50 class={[ 49 51 "p-0 pr-6 pb-4 font-normal", 50 - col[:hide_on] && "hidden #{col[:hide_on]}:table-cell" 52 + hide_on_classes(col[:hide_on]) 51 53 ]} 52 54 > 53 55 <%= if col[:field] && @meta && @path do %> ··· 58 60 </th> 59 61 <th 60 62 :if={@action != []} 61 - class={["relative p-0 pb-4", @action_hide_on && "hidden #{@action_hide_on}:table-cell"]} 63 + class={["relative p-0 pb-4", @action_hide_classes]} 62 64 > 63 65 <span class="sr-only">{gettext("Actions")}</span> 64 66 </th> ··· 83 85 class={[ 84 86 "relative p-0", 85 87 @row_click && "hover:cursor-pointer", 86 - col[:hide_on] && "hidden #{col[:hide_on]}:table-cell" 88 + hide_on_classes(col[:hide_on]) 87 89 ]} 88 90 > 89 91 <div class="block py-4 pr-6"> ··· 95 97 </td> 96 98 <td 97 99 :if={@action != []} 98 - class={["relative w-14 p-0", @action_hide_on && "hidden #{@action_hide_on}:table-cell"]} 100 + class={["relative w-14 p-0", @action_hide_classes]} 99 101 > 100 102 <div class="relative whitespace-nowrap py-4 text-right text-sm font-medium"> 101 103 <span class="absolute -inset-y-px -right-4 left-0 group-hover:bg-zinc-50 dark:group-hover:bg-zinc-800" /> ··· 402 404 </svg> 403 405 """ 404 406 end 407 + 408 + defp hide_on_classes(nil), do: nil 409 + defp hide_on_classes(:sm), do: "hidden sm:table-cell" 410 + defp hide_on_classes(:md), do: "hidden md:table-cell" 411 + defp hide_on_classes(:lg), do: "hidden lg:table-cell" 412 + defp hide_on_classes(:xl), do: "hidden xl:table-cell" 405 413 406 414 defp result_label(:success), do: "Success" 407 415 defp result_label(nil), do: "No result"