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

Allow sharing assigns while navigating between live sessions #3357

Open
SteffenDE opened this issue Jul 19, 2024 · 0 comments · May be fixed by #3482
Open

Allow sharing assigns while navigating between live sessions #3357

SteffenDE opened this issue Jul 19, 2024 · 0 comments · May be fixed by #3482
Milestone

Comments

@SteffenDE
Copy link
Collaborator

No description provided.

@SteffenDE SteffenDE added this to the v1.1 milestone Sep 11, 2024
SteffenDE added a commit to phoenixframework/phoenix that referenced this issue Oct 27, 2024
This commit introduces a new `:handover_on_rejoin` channel option that
can be used to do a custom handover when rejoining channels.

Relates to phoenixframework/phoenix_live_view#3357.
SteffenDE added a commit that referenced this issue Oct 27, 2024
This commit relies on a yet to be finalized feature in Phoenix Channels
to perform a custom handover between channel rejoins.

It changes the LV code to not leave the old channel before rejoining and
also instructs Phoenix to not kill the old process before starting the
new channel process. After the new channel is joined, the old one is
killed. Any `assign_new` calls in the LV mount will try to fetch assigns
from the old LV.

This is a backwards compatible optimization, so if a version of Phoenix
is used that does not support handover, it just falls back to calling the
function supplied to assign_new as usual.

Closes #3357.
@SteffenDE SteffenDE linked a pull request Oct 27, 2024 that will close this issue
SteffenDE added a commit that referenced this issue Oct 27, 2024
This commit relies on a yet to be finalized feature in Phoenix Channels
to perform a custom handover between channel rejoins.

It changes the LV code to not leave the old channel before rejoining and
also instructs Phoenix to not kill the old process before starting the
new channel process. After the new channel is joined, the old one is
killed. Any `assign_new` calls in the LV mount will try to fetch assigns
from the old LV.

This is a backwards compatible optimization, so if a version of Phoenix
is used that does not support handover, it just falls back to calling the
function supplied to assign_new as usual.

Closes #3357.
SteffenDE added a commit that referenced this issue Oct 27, 2024
This commit relies on a yet to be finalized feature in Phoenix Channels
to perform a custom handover between channel rejoins.

It changes the LV code to not leave the old channel before rejoining and
also instructs Phoenix to not kill the old process before starting the
new channel process. After the new channel is joined, the old one is
killed. Any `assign_new` calls in the LV mount will try to fetch assigns
from the old LV.

This is a backwards compatible optimization, so if a version of Phoenix
is used that does not support handover, it just falls back to calling the
function supplied to assign_new as usual.

Closes #3357.
SteffenDE added a commit that referenced this issue Oct 27, 2024
This commit relies on a yet to be finalized feature in Phoenix Channels
to perform a custom handover between channel rejoins.

It changes the LV code to not leave the old channel before rejoining and
also instructs Phoenix to not kill the old process before starting the
new channel process. After the new channel is joined, the old one is
killed. Any `assign_new` calls in the LV mount will try to fetch assigns
from the old LV.

This is a backwards compatible optimization, so if a version of Phoenix
is used that does not support handover, it just falls back to calling the
function supplied to assign_new as usual.

Closes #3357.
SteffenDE added a commit that referenced this issue Oct 27, 2024
This commit relies on a yet to be finalized feature in Phoenix Channels
to perform a custom handover between channel rejoins.

It changes the LV code to not leave the old channel before rejoining and
also instructs Phoenix to not kill the old process before starting the
new channel process. After the new channel is joined, the old one is
killed. Any `assign_new` calls in the LV mount will try to fetch assigns
from the old LV.

This is a backwards compatible optimization, so if a version of Phoenix
is used that does not support handover, it just falls back to calling the
function supplied to assign_new as usual.

Closes #3357.
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 a pull request may close this issue.

1 participant