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

Add display manager #84

Merged
merged 8 commits into from
Aug 19, 2024
Merged

Add display manager #84

merged 8 commits into from
Aug 19, 2024

Conversation

rtshkmr
Copy link
Member

@rtshkmr rtshkmr commented Aug 13, 2024

closes #89

TODO

Still have no idea how the VyasaWeb.SourceLive.Chapter.Index is supposed
to be rendered as @inner_content within the new
display_manager.html.heex
@rtshkmr rtshkmr self-assigned this Aug 13, 2024
@rtshkmr rtshkmr changed the base branch from master to feature/hanuman August 13, 2024 14:59
This prevents the socket from being killed at every navigation, so the
overlay's states is still managed without any issue.

Actually, currently, there's a issue with definitions on the router-side

problem: if I do a push_navigate to the path matching =/explore/:source_title/:chap_no= from =/explore/:source_title/=,
it will trigger a socket error:
=phx-F-vfg0fv3-NR4yFB error: unauthorized live_redirect. Falling back to page request -=

Hunch: it's because of the router defining two different live_session scopes (anon vs sangh) so it's
not allowing a =push_navigate()= and hence it's reverting to a full page reload.

Do you know a quick fix to this?

    live_session :gen_anon_session,
      on_mount: [{VyasaWeb.Session, :anon}] do
      live "/explore/", SourceLive.Index, :index
      live "/explore/:source_title/", SourceLive.Show, :show
      #live "/explore/:source_title/:chap_no", SourceLive.Chapter.Index, :index
      live "/explore/:source_title/:chap_no", SourceLive.Chapter.Index, :index
      live "/explore/:source_title/:chap_no/:verse_no", SourceLive.Chapter.ShowVerse, :show
    end

    live_session :gen_sangh_session,
      on_mount: [{VyasaWeb.Session, :sangh}] do
        live "/explore/:source_title/:chap_no", SourceLive.Chapter.Index, :index
      end
@rtshkmr rtshkmr force-pushed the feat/add-display-manager branch from 18f60dd to 2f4a6be Compare August 15, 2024 13:11
@rtshkmr rtshkmr changed the title WIP: add display manager Add display manager Aug 16, 2024
@rtshkmr rtshkmr marked this pull request as ready for review August 16, 2024 10:12
@rtshkmr
Copy link
Member Author

rtshkmr commented Aug 16, 2024

#86 fixes most of the issues that this branch has

@rtshkmr rtshkmr merged commit b6aa231 into feature/hanuman Aug 19, 2024
@rtshkmr rtshkmr deleted the feat/add-display-manager branch August 19, 2024 14:57
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