Skip to content

Commit

Permalink
Update soft deprecated messages
Browse files Browse the repository at this point in the history
  • Loading branch information
msaraiva committed Feb 19, 2024
1 parent 980fbb5 commit 2ed2ec7
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 11 deletions.
14 changes: 9 additions & 5 deletions lib/surface/components/context.ex
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
defmodule Surface.Components.Context do
@moduledoc """
> #### Soft deprecation warning {: .warning}
>
> Using this module as a component with `<Context>` has been deprecated. Support for
> scope-aware context will be removed in `v0.13` due to the lack of built-in support for
> the feature in Liveview itself, which leads to inefficient diff-tracking when using it.
>
> Global context related functions like `Context.put/3` and `Context.get/3`, as well as the `:from_context`
> option, will be kept and recommended as their usage don't affect diff-tracking negatively.
A built-in module and component that allows users to set and retrieve values
to/from the context.
> **Soft deprecation alert:** Scope-aware context will be deprecaded in the near future and fully removed
> in `v0.13`. The reason is the lack of built-in support for that feature in Liveview itself, which
> leads to inefficient diff-tracking when using it. Global context related functions like `Context.put`
> and `Context.get`, as well as the `:from_context` option, will be kept as their use don't affect diff-tracking negatively.
"""

use Surface.Component
Expand Down
11 changes: 8 additions & 3 deletions lib/surface/components/live_patch.ex
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
defmodule Surface.Components.LivePatch do
@moduledoc """
Defines a link that will **patch** the current LiveView.
> #### Soft deprecation warning {: .warning}
>
> This component has been deprecated in favor of liveview's built-in `<.link>`
> and will be removed in `v0.13`. See https://hexdocs.pm/phoenix_live_view/live-navigation.html for
> more info usage.
> **Soft deprecation alert:** This component has been deprecated in favor of liveview's built-in `<.link>`
> and will be removed in `v0.13`. See https://hexdocs.pm/phoenix_live_view/live-navigation.html for more info.
Defines a link that will **patch** the current LiveView.
Provides similar capabilities to Phoenix's built-in `live_patch/2`
function.
Expand All @@ -15,6 +18,8 @@ defmodule Surface.Components.LivePatch do
`<LiveRedirect>` instead.
"""

@moduledoc deprecated: "Use liveview's built-in `<.link>` instead"

use Surface.Component

@doc "The required path to link to"
Expand Down
11 changes: 8 additions & 3 deletions lib/surface/components/live_redirect.ex
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
defmodule Surface.Components.LiveRedirect do
@moduledoc """
Defines a link that will **redirect** to a new LiveView.
> #### Soft deprecation warning {: .warning}
>
> This component has been deprecated in favor of liveview's built-in `<.link>`
> and will be removed in `v0.13`. See https://hexdocs.pm/phoenix_live_view/live-navigation.html for
> more info usage.
> **Soft deprecation alert:** This component has been deprecated in favor of liveview's built-in `<.link>`
> and will be removed in `v0.13`. See https://hexdocs.pm/phoenix_live_view/live-navigation.html for more info.
Defines a link that will **redirect** to a new LiveView.
Provides similar capabilities to Phoenix's built-in `live_redirect/2`
function.
Expand All @@ -15,6 +18,8 @@ defmodule Surface.Components.LiveRedirect do
it, use `<LivePatch>` instead.
"""

@moduledoc deprecated: "Use liveview's built-in `<.link>` instead"

use Surface.Component

@doc "The required path to link to"
Expand Down

0 comments on commit 2ed2ec7

Please sign in to comment.