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

remove user refresh and replace with sync icon #732

Merged
merged 5 commits into from Jan 28, 2020
Merged

Conversation

sssoleileraaa
Copy link
Contributor

Description

Closes #687

We now animate the metadata sync and instead of showing an active state for the entire length of the metadata sync we always just show a 2 second animation. Here is recording of the animation (it's subtle) after I changed the background metadata syncs to happen every 6 seconds for demo purposes:

metadatsync

Test Plan

  1. Start the client in offline mode and check that icon is offline icon
  2. Log in and see the metadata sync animation
  3. After 2 seconds see that it is in the inactive state
  4. Log out see the icon switches back to offline mode

@sssoleileraaa
Copy link
Contributor Author

rebased on latest master, resolving a conflict with the new sync period being every minute instead of every 5 minutes

also removed user refresh button tests and added some for non-user-interactive sync icon

this is ready for review

@sssoleileraaa
Copy link
Contributor Author

did some clean up around removing user-refresh code and only emitting the syncing signal when authenticated since we don't sync unless we're authenticated (this was an unreported bug, just found it while working on this)

@emkll emkll moved this from Ready for Review to Under Review in SecureDrop Team Board Jan 28, 2020
@emkll emkll self-assigned this Jan 28, 2020
emkll
emkll previously approved these changes Jan 28, 2020
Copy link
Contributor

@emkll emkll left a comment

Choose a reason for hiding this comment

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

Thanks @creviera this looks great!

Performed a visual review of the diff, as well as a functional review:

@@ -37,7 +37,7 @@ class MetadataSyncJob(ApiJob):
'''

def __init__(self, data_dir: str, gpg: GpgHelper) -> None:
super().__init__()
super().__init__(remaining_attempts=15)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this value used elsewhere? if so we could use a static variable somewhere

@sssoleileraaa
Copy link
Contributor Author

@emkll i just responded to your review comment so this is ready for rereview thx

Copy link
Contributor

@emkll emkll left a comment

Choose a reason for hiding this comment

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

Test plan still passing, thanks @creviera

@emkll emkll merged commit b99d104 into master Jan 28, 2020
SecureDrop Team Board automation moved this from Under Review to Done Jan 28, 2020
@emkll emkll deleted the remove-refresh-sync branch January 28, 2020 20:54
@rmol rmol mentioned this pull request Jan 28, 2020
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Replace refresh icon with non-interactive sync activity indicator
2 participants