Skip to content

Implement reload-from-server#32

Merged
AngeloStavrow merged 31 commits intomainfrom
reload-from-server
Sep 8, 2020
Merged

Implement reload-from-server#32
AngeloStavrow merged 31 commits intomainfrom
reload-from-server

Conversation

@AngeloStavrow
Copy link
Collaborator

@AngeloStavrow AngeloStavrow commented Aug 26, 2020

Closes #19.

⚠️ This PR is dependent on work done in #28. ⚠️

This PR implements a naïve first pass at refreshing on-device content from the server, using the following interaction design:

  1. When logged in, enable a reload button on the post list.
  2. When the reload button is activated, warn the user that their unpublished changes will be lost if they continue.
  3. If the user confirms that they want to proceed, purge everything but their local drafts, and fetch all content back from the server.

This PR aims to be sufficient for the MVP, and therefore defines the server version of a post as the canonical copy. This assumption may not be suitable for all cases (e.g., users with very large number of posts that must be reloaded).

@AngeloStavrow AngeloStavrow added this to the 1.0.0-beta milestone Aug 27, 2020
@AngeloStavrow AngeloStavrow self-assigned this Aug 27, 2020
@AngeloStavrow AngeloStavrow marked this pull request as ready for review August 27, 2020 16:39
@AngeloStavrow AngeloStavrow requested a review from thebaer August 27, 2020 16:39
@AngeloStavrow AngeloStavrow marked this pull request as draft August 27, 2020 19:27
@AngeloStavrow AngeloStavrow marked this pull request as ready for review August 31, 2020 20:40
@AngeloStavrow
Copy link
Collaborator Author

Screenshots of what it looks like when a post's remote copy is newer than the local copy:

Screen Shot 2020-09-01 at 15 01 50

Screen Shot 2020-09-01 at 15 03 23

Screen Shot 2020-09-01 at 15 04 24

Copy link
Member

@thebaer thebaer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@AngeloStavrow AngeloStavrow merged commit 3751118 into main Sep 8, 2020
@AngeloStavrow AngeloStavrow deleted the reload-from-server branch September 8, 2020 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Add a way to pull in new/updated content from the server

2 participants