From a330f546be81bc39c0a83faf3b02e1e0c4e65a8e Mon Sep 17 00:00:00 2001 From: Kieran Eglin Date: Thu, 8 Feb 2024 11:18:04 -0800 Subject: [PATCH] Bumped up the line length because I fear no man --- .formatter.exs | 2 +- .../components/core_components.ex | 35 +++++-------------- .../layouts/partials/sidebar.html.heex | 6 +--- .../media_sources/source_html/edit.html.heex | 6 +--- .../media_sources/source_html/index.html.heex | 10 ++---- .../source_html/source_form.html.heex | 14 ++------ .../controllers/page_html/home.html.heex | 30 +++------------- 7 files changed, 20 insertions(+), 83 deletions(-) diff --git a/.formatter.exs b/.formatter.exs index 602260a..6fc82a9 100644 --- a/.formatter.exs +++ b/.formatter.exs @@ -3,5 +3,5 @@ subdirectories: ["priv/*/migrations"], plugins: [Phoenix.LiveView.HTMLFormatter], inputs: ["*.{heex,ex,exs}", "{config,lib,test}/**/*.{heex,ex,exs}", "priv/*/seeds.exs"], - line_length: 100 + line_length: 120 ] diff --git a/lib/pinchflat_web/components/core_components.ex b/lib/pinchflat_web/components/core_components.ex index cc65540..5c7c073 100644 --- a/lib/pinchflat_web/components/core_components.ex +++ b/lib/pinchflat_web/components/core_components.ex @@ -168,8 +168,7 @@ defmodule PinchflatWeb.CoreComponents do phx-connected={hide("#server-error")} hidden > - Hang in there while we get back on track - <.icon name="hero-arrow-path" class="ml-1 h-3 w-3 animate-spin" /> + Hang in there while we get back on track <.icon name="hero-arrow-path" class="ml-1 h-3 w-3 animate-spin" /> """ @@ -245,8 +244,7 @@ defmodule PinchflatWeb.CoreComponents do values: ~w(checkbox color date datetime-local email file hidden month number password toggle range radio search select tel text textarea time url week) - attr :field, Phoenix.HTML.FormField, - doc: "a form field struct retrieved from the form, for example: @form[:email]" + attr :field, Phoenix.HTML.FormField, doc: "a form field struct retrieved from the form, for example: @form[:email]" attr :errors, :list, default: [] attr :checked, :boolean, doc: "the checked flag for checkbox inputs" @@ -254,8 +252,7 @@ defmodule PinchflatWeb.CoreComponents do attr :options, :list, doc: "the options to pass to Phoenix.HTML.Form.options_for_select/2" attr :multiple, :boolean, default: false, doc: "the multiple flag for select inputs" - attr :rest, :global, - include: ~w(accept autocomplete capture cols disabled form list max maxlength min minlength + attr :rest, :global, include: ~w(accept autocomplete capture cols disabled form list max maxlength min minlength multiple pattern placeholder readonly required rows size step) slot :inner_block @@ -279,15 +276,7 @@ defmodule PinchflatWeb.CoreComponents do
<.help :if={@help}><%= @help %> @@ -318,8 +307,7 @@ defmodule PinchflatWeb.CoreComponents do {@rest} />
-
-
+
- + <%= render_slot(action, @row_item.(row)) %>
@@ -607,10 +592,7 @@ defmodule PinchflatWeb.CoreComponents do def back(assigns) do ~H"""
- <.link - navigate={@navigate} - class="text-sm font-semibold leading-6 text-zinc-900 hover:text-zinc-700" - > + <.link navigate={@navigate} class="text-sm font-semibold leading-6 text-zinc-900 hover:text-zinc-700"> <.icon name="hero-arrow-left-solid" class="h-3 w-3" /> <%= render_slot(@inner_block) %> @@ -651,8 +633,7 @@ defmodule PinchflatWeb.CoreComponents do JS.show(js, to: selector, transition: - {"transition-all transform ease-out duration-300", - "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95", + {"transition-all transform ease-out duration-300", "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95", "opacity-100 translate-y-0 sm:scale-100"} ) end diff --git a/lib/pinchflat_web/components/layouts/partials/sidebar.html.heex b/lib/pinchflat_web/components/layouts/partials/sidebar.html.heex index 8f27e76..5b7fe3c 100644 --- a/lib/pinchflat_web/components/layouts/partials/sidebar.html.heex +++ b/lib/pinchflat_web/components/layouts/partials/sidebar.html.heex @@ -17,11 +17,7 @@
    <.sidebar_item icon="hero-tv" text="Sources" navigate={~p"/sources"} /> - <.sidebar_item - icon="hero-adjustments-vertical" - text="Media Profiles" - navigate={~p"/media_profiles"} - /> + <.sidebar_item icon="hero-adjustments-vertical" text="Media Profiles" navigate={~p"/media_profiles"} />
diff --git a/lib/pinchflat_web/controllers/media_sources/source_html/edit.html.heex b/lib/pinchflat_web/controllers/media_sources/source_html/edit.html.heex index 9286ec3..78ca9f3 100644 --- a/lib/pinchflat_web/controllers/media_sources/source_html/edit.html.heex +++ b/lib/pinchflat_web/controllers/media_sources/source_html/edit.html.heex @@ -8,11 +8,7 @@
- <.source_form - changeset={@changeset} - media_profiles={@media_profiles} - action={~p"/sources/#{@source}"} - /> + <.source_form changeset={@changeset} media_profiles={@media_profiles} action={~p"/sources/#{@source}"} />
diff --git a/lib/pinchflat_web/controllers/media_sources/source_html/index.html.heex b/lib/pinchflat_web/controllers/media_sources/source_html/index.html.heex index 8b74117..796dc4b 100644 --- a/lib/pinchflat_web/controllers/media_sources/source_html/index.html.heex +++ b/lib/pinchflat_web/controllers/media_sources/source_html/index.html.heex @@ -29,16 +29,10 @@ <:col :let={source} label="" class="flex place-content-evenly"> - <.link - navigate={~p"/sources/#{source.id}"} - class="hover:text-secondary duration-200 ease-in-out mx-0.5" - > + <.link navigate={~p"/sources/#{source.id}"} class="hover:text-secondary duration-200 ease-in-out mx-0.5"> <.icon name="hero-eye" /> - <.link - navigate={~p"/sources/#{source.id}/edit"} - class="hover:text-secondary duration-200 ease-in-out mx-0.5" - > + <.link navigate={~p"/sources/#{source.id}/edit"} class="hover:text-secondary duration-200 ease-in-out mx-0.5"> <.icon name="hero-pencil-square" /> diff --git a/lib/pinchflat_web/controllers/media_sources/source_html/source_form.html.heex b/lib/pinchflat_web/controllers/media_sources/source_html/source_form.html.heex index 4cc1499..4244d5d 100644 --- a/lib/pinchflat_web/controllers/media_sources/source_html/source_form.html.heex +++ b/lib/pinchflat_web/controllers/media_sources/source_html/source_form.html.heex @@ -3,12 +3,7 @@ Oops, something went wrong! Please check the errors below. - <.input - field={f[:original_url]} - type="text" - label="Source URL" - help="URL of a channel or playlist (required)" - /> + <.input field={f[:original_url]} type="text" label="Source URL" help="URL of a channel or playlist (required)" /> <.input field={f[:friendly_name]} type="text" label="Friendly Name" /> @@ -19,12 +14,7 @@ label="Media Profile" /> - <.input - field={f[:collection_type]} - options={friendly_collection_types()} - type="select" - label="Source Type" - /> + <.input field={f[:collection_type]} options={friendly_collection_types()} type="select" label="Source Type" /> <.input field={f[:index_frequency_minutes]} diff --git a/lib/pinchflat_web/controllers/page_html/home.html.heex b/lib/pinchflat_web/controllers/page_html/home.html.heex index e9fc48d..5aa726d 100644 --- a/lib/pinchflat_web/controllers/page_html/home.html.heex +++ b/lib/pinchflat_web/controllers/page_html/home.html.heex @@ -136,11 +136,7 @@ href="https://twitter.com/elixirphoenix" class="group -mx-2 -my-0.5 inline-flex items-center gap-3 rounded-lg px-2 py-0.5 hover:bg-zinc-50 hover:text-zinc-900" > -