Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deprecations #60

Merged
merged 4 commits into from
Sep 17, 2024
Merged

Fix deprecations #60

merged 4 commits into from
Sep 17, 2024

Conversation

tiagoefmoraes
Copy link
Member

@tiagoefmoraes tiagoefmoraes commented Sep 17, 2024

use <.link patch=...> instead of <LivePatch>

Because the links are to the same LiveView we use patch

     warning: Surface.Components.LivePatch.render/1 is deprecated. Use liveview's built-in `<.link>` instead
     │
 102 │                     <LivePatch to={path_to(__MODULE__, @component_name, :docs)}>
     │                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     │
     └─ lib/surface/catalogue/live/page_live.ex:102: Surface.Catalogue.PageLive.render/1
     └─ lib/surface/catalogue/live/page_live.ex:108: Surface.Catalogue.PageLive.render/1
     └─ lib/surface/catalogue/live/page_live.ex:114: Surface.Catalogue.PageLive.render/1

     warning: Surface.Components.LivePatch.render/1 is deprecated. Use liveview's built-in `<.link>` instead
     │
  32 │         <LivePatch to="/catalogue/" class={"has-text-weight-bold": !@selected_component}>
     │         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     │
     └─ lib/surface/catalogue/components/component_tree.ex:32: Surface.Catalogue.Components.ComponentTree.render_node/1
     └─ lib/surface/catalogue/components/component_tree.ex:45: Surface.Catalogue.Components.ComponentTree.render_node/1

use Surface.Catalogue.Examples instead of Surface.Catalogue.Example

warning: `Surface.Catalogue.Example` is deprecated. Use `Surface.Catalogue.Examples` instead
  priv/catalogue/button/example01.ex:6: SurfaceCatalogue.SampleComponents.Button.Example01 (module)

@tiagoefmoraes tiagoefmoraes self-assigned this Sep 17, 2024
@tiagoefmoraes tiagoefmoraes marked this pull request as ready for review September 17, 2024 23:10
@tiagoefmoraes tiagoefmoraes merged commit 7b58864 into main Sep 17, 2024
7 checks passed
@tiagoefmoraes tiagoefmoraes deleted the fix_deprecations branch September 17, 2024 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant