diff --git a/lib/torch/component.ex b/lib/torch/component.ex index 7e8cecaf..7c01ca34 100644 --- a/lib/torch/component.ex +++ b/lib/torch/component.ex @@ -2,6 +2,7 @@ defmodule Torch.Component do @moduledoc """ Provides Phoenix.Components for use in Torch views and layouts """ + @moduledoc since: "5.0.0" use Phoenix.Component diff --git a/lib/torch/helpers.ex b/lib/torch/helpers.ex index a1ff2593..39cd8907 100644 --- a/lib/torch/helpers.ex +++ b/lib/torch/helpers.ex @@ -132,6 +132,7 @@ defmodule Torch.Helpers do iex> body_classes(%Plug.Conn{private: %{phoenix_action: :custom_action}}) "torch-custom-action" """ + @doc since: "5.0.0" @spec body_classes(Plug.Conn.t()) :: String.t() def body_classes(conn) do conn diff --git a/lib/torch/views/flash_view.ex b/lib/torch/views/flash_view.ex index 1aa2dfe9..966654b9 100644 --- a/lib/torch/views/flash_view.ex +++ b/lib/torch/views/flash_view.ex @@ -2,6 +2,7 @@ defmodule Torch.FlashView do @moduledoc """ Contains functions for dealing with flash messages. """ + @moduledoc deprecated: "This module will be fully removed in Torch 6.0" use Phoenix.Component diff --git a/lib/torch/views/page_view.ex b/lib/torch/views/page_view.ex index 805c0323..479aeba6 100644 --- a/lib/torch/views/page_view.ex +++ b/lib/torch/views/page_view.ex @@ -1,4 +1,5 @@ defmodule Torch.PageView do + @moduledoc deprecated: "This module will be fully removed in Torch 6.0" @doc """ DEPRECATED: Use Torch.Helpers.body_classes/1 instead @@ -12,6 +13,7 @@ defmodule Torch.PageView do iex> body_classes(%Plug.Conn{private: %{phoenix_action: :custom_action}}) "torch-custom-action" """ + @spec body_classes(Plug.Conn.t()) :: String.t() @deprecated "Use Torch.Helpers.body_classes/1 instead" def body_classes(conn), do: Torch.Helpers.body_classes(conn) diff --git a/lib/torch/views/pagination_view.ex b/lib/torch/views/pagination_view.ex index a6a4061c..fb21eb54 100644 --- a/lib/torch/views/pagination_view.ex +++ b/lib/torch/views/pagination_view.ex @@ -24,6 +24,7 @@ defmodule Torch.PaginationView do @doc """ Render Torch pagination links based on current page, sort, and filters """ + @doc since: "5.0.0" attr(:page_number, :integer, required: true) attr(:page_size, :integer, required: true) @@ -80,6 +81,8 @@ defmodule Torch.PaginationView do ...> page_link(a) |> Phoenix.HTML.Safe.to_iodata() |> IO.iodata_to_binary() "14" """ + @doc since: "5.0.0" + attr(:query_string, :string, default: "") attr(:conn_params, :any, required: true) attr(:page_number, :integer, required: true) @@ -128,6 +131,8 @@ defmodule Torch.PaginationView do "" """ # NOTE: query_string param can contain sort info also (e.g. sort_field=name&sort_direction=asc) + @doc since: "5.0.0" + attr(:query_string, :string, default: "") attr(:conn_params, :any, required: true) attr(:page_number, :integer, required: true) @@ -188,6 +193,8 @@ defmodule Torch.PaginationView do ...> next_link(a) |> Phoenix.HTML.Safe.to_iodata() |> IO.iodata_to_binary() "" """ + @doc since: "5.0.0" + attr(:query_string, :string, default: "") attr(:conn_params, :any, required: true) attr(:page_number, :integer, required: true)