Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.

Loading indication for sync #232

Merged
merged 8 commits into from
Dec 17, 2018
Merged

Conversation

ioana-farcas
Copy link
Contributor

@ioana-farcas ioana-farcas commented Nov 23, 2018

Fixes #48

Testing and Review Notes

@mozilla-lockbox/ux
I can not tell if the bottom bar with the spinner has a shadow in zeplin...so I did not add one. Please let me know if it is needed.

Screenshots or Videos

loading

To Do

  • add “WIP” to the PR title if pushing up but not complete nor ready for review
  • double check the original issue to confirm it is fully satisfied
  • add testing notes and screenshots in PR description to help guide reviewers
  • add unit tests
    • optional: consider adding instrumentation (integration/UI) tests
  • consider running this branch in a debug simulator and check for memory leak notifications or any warnings
  • request the "UX" team perform a design review (if/when applicable)
  • make sure CI builds are passing (e.g.: fix lint and other errors)
  • check on the accessibility of any added UI

@ioana-farcas ioana-farcas requested a review from a team as a code owner November 23, 2018 21:42
@ghost ghost assigned ioana-farcas Nov 23, 2018
@ghost ghost added the in progress label Nov 23, 2018
@ioana-farcas ioana-farcas force-pushed the 48-loading-indication_sync branch 2 times, most recently from 69cff93 to c0f132f Compare November 27, 2018 17:08
@ioana-farcas ioana-farcas changed the title [WIP] Loading indication for sync Loading indication for sync Nov 27, 2018
@ioana-farcas ioana-farcas requested a review from a team November 27, 2018 18:41
Copy link
Contributor

@nickbrandt nickbrandt left a comment

Choose a reason for hiding this comment

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

@ioana-farcas this looks great! There is a shadow on the snackbar, though it's difficult to select the layer in Zeplin, so I attached an image below showing the values. Just a couple other things I noticed while testing:

  • Can we update the screen background to: #EDEDF0
  • The first time I sign in after downloading the build (making sure to delete any old versions first), it seems to get hung up during syncing and never displays my entries. I can navigate to Settings or Account and back and it still just continues to sync. If I force quit out of Lockbox, re-open, then sign in again - it syncs and then loads my entries as expected.
    Note: I don't have this issue on the simulator, only on my Pixel device

    Sounds like this is an issue with Sync and not tied to this PR 👍
  • Question: Are we syncing the entry list every time the user navigates back to the Entry List? I noticed that after my entries do show, and I navigate to either Settings, Account, or an Entry Detail, and then navigate back to the Entry List, it shows that it is syncing again. I was thinking that we only sync on signing in, and then on a time interval after that, but perhaps I'm mistaken on this. Sounds like this is being addressed in another issue 👍

screen shot 2018-11-27 at 1 07 39 pm

screen shot 2018-11-27 at 1 31 47 pm

Sync stalling video capture
sync

@devinreams
Copy link
Contributor

Some refactor required per @ioana-farcas and @jhugman...

@devinreams devinreams changed the title Loading indication for sync [WIP] Loading indication for sync Nov 28, 2018
@ioana-farcas ioana-farcas force-pushed the 48-loading-indication_sync branch 5 times, most recently from df17439 to a253d84 Compare December 12, 2018 15:33
devinreams added a commit that referenced this pull request Dec 12, 2018
related to but doesn't fully fix #262
will waiting on toast being built at #232
devinreams added a commit that referenced this pull request Dec 13, 2018
related to but doesn't complete #262
will wait on view and styles built at #232 for reuse
@ioana-farcas ioana-farcas force-pushed the 48-loading-indication_sync branch 2 times, most recently from b5a9bda to 1d8901e Compare December 17, 2018 11:09
@ioana-farcas ioana-farcas changed the title [WIP] Loading indication for sync Loading indication for sync Dec 17, 2018
@ioana-farcas ioana-farcas requested a review from a team December 17, 2018 16:21
Copy link
Contributor

@changecourse changecourse left a comment

Choose a reason for hiding this comment

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

I'm encountering some strange behavior on this release build 1679...

When I sign in with my personal account on a newly installed build, it works, but displays a 404 webpage for a brief moment between a successful authentication (via FxA) and the sync toaster loading up my entries. I have a random hunch that this might be the FxA "Account Confirmed" dialog that isn't being able to be fetched prior to transitioning to the entry list, though that's just a shot in the dark.

When I sign in with test data, I am unable to trigger the sync toaster... but when I disconnect from the test account and try to then log in with my personal account instead, I'm actually presented with the test account entries instead of my personal entries. (@sashei didn't we experience something similar on iOS at some point?)

FWIW, the sync indicator looks good, as does this background of the empty state... it's just now these two, potentially larger, external issues I'm experiencing.

@sashei
Copy link
Contributor

sashei commented Dec 17, 2018

@changecourse a few things:

@changecourse
Copy link
Contributor

@sashei thanks for the clarifications! As long as we're tracking both of those, we're good then :)

UI-wise, we're good.

@devinreams
Copy link
Contributor

I have experienced similar issues switching from using test data to real data, I have to do a hard uninstall-reinstall cycle every time, so I don't think this is related to this PR necessarily. I haven't filed an issue for that but can do that today if others are having issues!!

Ah interesting, I haven't seen that myself but since I was here already, went ahead and filed that issue as a P2: #277

Copy link
Contributor

@sashei sashei left a comment

Choose a reason for hiding this comment

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

Looks great, thanks so much for your hard work on this PR @ioana-farcas :)) ♻️ 🎉 💯

@@ -48,7 +48,7 @@ open class DataStore(
private val listSubject: BehaviorRelay<List<ServerPassword>> = BehaviorRelay.createDefault(emptyList())

val state: Observable<State> get() = stateSubject
val syncState: Observable<SyncState> = PublishSubject.create()
open val syncState: Observable<SyncState> = ReplaySubject.create()
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

showAndRemove(view!!.entriesView, view!!.loadingView)
}
view!!.filterButton.isClickable = !isLoading
Copy link
Contributor

Choose a reason for hiding this comment

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

This could be a follow-up improvement, but it would be nice for these isClickable and isEnabled settings to each be their own Consumers on the View rather than side effects of showing / hiding the loading spinner. IIRC from iOS, we have other situations (no saved entries comes to mind) where we want to disable the filter / sort buttons. However, I'm happy to let this PR merge as-is and do that work in later tickets :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sashei You're right. I will merge this and add the modifications in another PR. Thanks for the review!

Copy link
Contributor

Choose a reason for hiding this comment

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

Filed a follow-up issue here: #279

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Loading Indication for Sync
5 participants