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

Users - Active or not? #42

Open
davidtew opened this issue Feb 13, 2022 · 1 comment
Open

Users - Active or not? #42

davidtew opened this issue Feb 13, 2022 · 1 comment

Comments

@davidtew
Copy link

Sat 12th Feb 2022 I logged in. I managed to get to the URL https://livebeats.fly.dev/anujmiddha although I can't remember how I got there, since there were no ACTIVE USERS listed for me to click on (see screen shot below).
I could hear the music intermittently ie on for a while, stopped for a bit, as if user anujmiddha was actually active (and listening, but switching between play & pause).
Furthermore, I noticed upon inspecting the screen shot that the ping ms is not visible on my avatar nor the other users.
(all tests on Mac 11.5.2 Firefox V96.0.3)
image

@joshchernoff
Copy link

joshchernoff commented Apr 30, 2022

Clicking on any navigation seems to trigger what ever remount or what ever that updates the nav with active users.
My assumption is that its not getting what ever message it needs upon the player starting/stopping.

Edit;
After looking into this you will notice that sidebar_active_users is just a function component

<nav class="px-2">
<%= if @current_user do %>
<.sidebar_nav_links current_user={@current_user} active_tab={@active_tab}/>
<% end %>
<.sidebar_active_users id="desktop-active-users" users={@active_users}/>
</nav>
is not a part of a stateful component nor a live view itself. In short the only way for it to update is via a some event like live_redirect. Thus the state of this view won't update on its own without remounting. This is also why when using the nav which causes a remount to happen updates the view.

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

No branches or pull requests

2 participants