Xyphyn / photon

A replacement for lemmy-ui with more features, a better design, and more customizability.
https://phtn.app
GNU Affero General Public License v3.0
348 stars 39 forks source link

[Enhancement] Refresh when going "Home" #400

Open DarkArc opened 1 month ago

DarkArc commented 1 month ago

Is your feature request related to a problem? Please describe. Currently, to "refresh" the content of the feed, I have to actually refresh the page, or browse to a community, then browse back to home.

This may be a bug report as I thought a previous version of Photon did this already.

Describe the solution you'd like I'd like to just be able to press the "go home"/"photon icon" button in the top left and (if I'm already "home") have the content be reloaded as-if I'd refreshed the page.

Describe alternatives you've considered Having the button instead scroll you to the top of the page and giving a refresh button there "almost as if it's a post" might work. I think the common case though is refreshing the content, so this would just result in an extra click for the user.

Xyphyn commented 1 month ago

I want the cohesion model of the feeds not to be based on the order you opened things in, so I won't refresh on the click of the photon logo.

If you want, I can add a scroll to top button and a refresh button at the top.

DarkArc commented 1 month ago

I want the cohesion model of the feeds not to be based on the order you opened things in, so I won't refresh on the click of the photon logo.

I see, you can press that as a sort of "go back" button from a post and not lose your spot. I never thought to try that.

If you want, I can add a scroll to top button and a refresh button at the top.

I think this would be the best solution with your design goals. Maybe just an outright button right aligned in this area on the same row as the sort options?

image

DarkArc commented 1 month ago

I am going to add ... I think the decision here leads to some (perhaps undesirable affects).

For instance, consider account switching. I think it makes a lot of sense to be able to stay on the same post while switching accounts (I actually find that really handy).

However, when you're on the home feed, and you switch between accounts ... you have the feed of the previous user but any new data is fetched as-if by the new user. So it's kind of a franken feed. Then, if you run out of content (e.g., from an account that's not following anything) and switch back, you're just "out of content".

So, even if you don't add "clicking the same thing you're already on refresh it" behavior, some amount of contextual refreshing might be beneficial.

Xyphyn commented 1 month ago

The feed should refresh automatically if the user's instance changes

DarkArc commented 1 month ago

The feed should refresh automatically if the user's instance changes

In the case of switching instances ... the home feed is definitely broken (without content being reloaded in some way -- glad to hear that does trigger a refresh!). However, even switching users on the same instance can result in the above "feed stops loading properly" behavior (I actually encountered this from two users on the same instance, my main account and a bot account I check the inbox on).

KarkanAlzwayed commented 2 days ago

I want the cohesion model of the feeds not to be based on the order you opened things in, so I won't refresh on the click of the photon logo.

If you want, I can add a scroll to top button and a refresh button at the top.

Please add the "scroll to top" button. I was going to file a feature request for it, but searching for it landed me here. Every time I wanted to go to the top, I used the scroll bar. Also, how do I refresh my feed if the refresh the page doesn't work? Thanks