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

Save the position of the users tweet columns between switching pages and page reloads #26

Closed
7 tasks done
keithamoss opened this issue Dec 18, 2018 · 0 comments
Closed
7 tasks done
Milestone

Comments

@keithamoss
Copy link
Owner

keithamoss commented Dec 18, 2018

When the user reloads the page (for whatever reason - technical issues, memory issues) we want them to come back to the same position they were at in each column.

Internally within each column we already track the tweet that's at the top of the column as the user scrolls, and then maintain that position when new tweets are added to the top.

This would involve extending that and:

  • Dispatching actions that send HTTP/WS updates back the user's profile
  • Using those props to determine the tweets to send back onconnect so the user has right slice of the tweet store for each column
  • Feeding those props back to the columns on componentDidMount to set them up on load

A few considerations:

  • How should we handle really old tweets? (e.g. Hundreds or thousands back in history). Talk to H about desired behaviour.
  • How should we handle the tweet disppearing (e.g. Changing to the "Don't show completed tweets" setting)
  • Should saving position also save the new tweet marker? (i.e. the top tweet they can see and the top tweet they have loaded)

Ideas/Thoughts

  • Will cdU's scrollToTweet end up in a race condition, or getting in the way of, cDM's logic that updates settings? That might be the cause of some of the weird behaviour.
  • Can we stop the initial onload call to update settings from cDM?
  • Sanity check the inputs to onPositionUpdate to prevent invalid input
  • Make the column placeholder states nicer
  • Fix the offset by one issue that may be due to mismeasuring heights
  • Test with a user with no settings
  • Test with columns with no tweets

Relates to #43

@keithamoss keithamoss added this to the Prod Release 0.1 milestone Dec 18, 2018
@keithamoss keithamoss changed the title Save the position of the users tweet columns between reloads Save the position of the users tweet columns between switching pages and page reloads Dec 19, 2018
@keithamoss keithamoss modified the milestones: Prod Release 0.1, Alpha Testing Dec 19, 2018
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

1 participant