Rotonde / beaker

Rotonde client with user account combined(deprecated)
MIT License
205 stars 37 forks source link

Add debouncing to feed sorting and refreshing #29

Closed lsjroberts closed 7 years ago

lsjroberts commented 7 years ago

This fixes the feed loading all skittishly and stuff flashing around on the initial load.

neauoire commented 7 years ago

Ah! I've been trying to do this -- It's my first time using sync stuff, and I have never seen JS that looks like yours before. Let's say I would like to only pull inactive portals once, how would I go about doing that? or display the last activity on a profile?

neauoire commented 7 years ago

I added you as collaborator btw, I love your writing style.

lsjroberts commented 7 years ago

display the last activity on a profile

ianh did this which I've copied into my local, I can push it up if you like it?

screen shot 2017-10-14 at 20 56 09

I would like to only pull inactive portals once

Are "inactive portals" offline ones that can't be accessed? Or am I misunderstanding?

neauoire commented 7 years ago

I misphrased what I had in mind, what I would like, is to be able to colonize the name of portals that has not posted in a while. You're doing some magic in feed that gets entries, I can't figure out how I could timestamp each portals with their latest entry time, so use it to grey out some of the inactive portals on the left side list of portals.

lsjroberts commented 7 years ago

Ah I see, yeah that should be totally feasible. I would suggest if you update here https://github.com/Rotonde/beaker/blob/master/scripts/feed.js#L89 to add an object with the url and pick the timestamp last item in the portal.feed array, you should then be able to use that here https://github.com/Rotonde/beaker/blob/master/scripts/feed.js#L51.

Perhaps even filter the list there into two arrays split on Date.now() minus some time.

I think that would work.

neauoire commented 7 years ago

I will give it a try :)