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

Refactor link nav #3570

Merged
merged 6 commits into from
Dec 13, 2024
Merged

Refactor link nav #3570

merged 6 commits into from
Dec 13, 2024

Conversation

chrismccord
Copy link
Member

No description provided.

@@ -20,11 +20,13 @@ defmodule Phoenix.LiveView.Session do
def authorize_root_redirect(%Session{} = session, %Route{} = route) do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: should we just inline this function inside channel.ex, where it is called? It would allow us to be more consistent and have all of the mounting conditions in one place. Your call.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to be a nag on when public API is now being removed post 1.0. Please don't.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those functions are not public API. They are all in modules which are moduledoc false. They don’t appear anywhere in hexdocs.

Co-authored-by: Steffen Deusch <steffen@deusch.me>
@chrismccord chrismccord merged commit 09d798c into main Dec 13, 2024
14 checks passed
@chrismccord
Copy link
Member Author

❤️❤️❤️🐥🔥

@@ -52,11 +51,11 @@ defmodule Phoenix.LiveView.Route do
@doc """
Returns the internal or external matched LiveView route info for the given uri.
"""
def live_link_info(endpoint, router, uri) when is_binary(uri) do
live_link_info(endpoint, router, URI.parse(uri))
def live_link_info_without_checks(endpoint, router, uri) when is_binary(uri) do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a public API change that broke backwards compatibility in LiveView Native. Can you please be more mindful when making public API changes. This came after LiveView 1.0 and should have been locked down.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The route module is @moduledoc false and always has been as far as I know:

- this function is not public API.

Copy link
Contributor

@bcardarella bcardarella Dec 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

live_link_info_without_checks is used in the LiveViewTest module. Because I've been rejected on moving LiveView over to multi-format support I've had to reproduce the entire LiveViewTest suite and supporting modules in LVN. When these underlying functions change I have to chase those down. Or consumers upgrade LiveView and LVN isn't updated yet and something breaks

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I replied to the comment that this function is public. It isn’t.

I know you discussed about abstracting LVT but I was not part of that discussion. My suggestion is to submit a proposal, potentially with a proof of concept PR publicly, so at least it is all on record. I can’t comment otherwise on what I have not been a part of.

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.

4 participants