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

Request chat history on demand while on cellular connection #7288

Closed
rasom opened this issue Jan 17, 2019 · 21 comments · Fixed by #7433
Closed

Request chat history on demand while on cellular connection #7288

rasom opened this issue Jan 17, 2019 · 21 comments · Fixed by #7433
Assignees

Comments

@rasom
Copy link
Contributor

rasom commented Jan 17, 2019

Pivotal link

https://www.pivotaltracker.com/story/show/163186553

Problem

Currently, chats' history is requested from the mailservers regardless of what kind of internet connection is used on the device. For cellular connection, it might cause unacceptable traffic consumption.

Implementation

When network connection type changes to cellular a dialog with the next options can be shown to the user:

  1. stop chats' syncing, continue on demand/when switch back to a different type of connection
  2. continue syncing
  3. always stop syncing when such event occurs
  4. always continue syncing when such even occurs

On 1. and 2. a chosen action is applied and the same dialog is shown on next switching to the cellular network.

If the user chooses 3. or 4. a chosen action is applied and on the next occurrence the dialog "stop syncing while on cellular"/"continue syncing while on cellular" with two options can be shown:

  • ok
  • go to settings

In order to not annoy the user with all these dialogs, it should be shown once per session (or once per some period of time). If we have some connection specific badge it might be shown to the user only once at all. But we still have to make settings easily accessible from almost any screen then (as well as that force-requesting button).

Acceptance Criteria

  • when a device switches to cellular network the user can stop syncing
  • when a device switches to wifi network syncing is resumed
  • when syncing is stopped the user can demand history by tapping some button
  • network connection settings are accessible in profile settings

Notes

From UI/UX side we need:

  1. "force-requesting" button
  2. connection state badges
@rasom rasom changed the title Request chat history on demand while on mobile connection Request chat history on demand while on cellular connection Jan 17, 2019
@rasom rasom self-assigned this Jan 17, 2019
@rasom
Copy link
Contributor Author

rasom commented Jan 17, 2019

hey @andmironov, can you take a look, please?

@andmironov
Copy link

andmironov commented Jan 17, 2019

Started doing some explorations, here's iteration #1 (not final, needs to be discussed)
Since sync will not work by itself anymore, it has to be explicit when syncing is off, to avoid confusion

sync

Also, there should be on-demand syncing inside chats when syncing is off (i guess) cc @errorists

@errorists
Copy link
Contributor

@andmironov is that icon a permanent fixture in the navigation bar? If so, I strongly dislike this solution, we're not Dropbox, people shouldn't have to stare at a syncing icon inside a chat app :) I think including that would also undermine the perceived reliability of the network, this stuff should work without me having to think about it and only tell me if it doesn't.
What happened with the idea that Roman suggested earlier, prompting with a dialogue on wifi -> cellular network change, we could always include a checkbox 'Remember my choice, don't ask again' to make them less intrusive? Once users decide to disable background syncing, then we could show a manual sync button, as for the UI I'd maybe start with a visually subtle snackbar since there's a PR that fixes their behaviour.

@rasom
Copy link
Contributor Author

rasom commented Jan 18, 2019

@andmironov, just one note: this issue is about syncing of messages history, not about syncing of blockchain state (which we will have soon as well). Those two processes are going to be separate.

@andmironov
Copy link

andmironov commented Jan 21, 2019

Here's an iteration 2, based on the initial @rasom 's concept. cc @mandrigin

iteration2

btw, implementing this requires implementing the bottom sheet component. Example of how it works can be found here https://framer.cloud/AvjzY by tapping on the little arrow icon next to "Emily".

This component is super important and is used across all the app

@rasom
Copy link
Contributor Author

rasom commented Jan 22, 2019

@andmironov, i'm ok with these screens, the only question is about that grey badge with offline status. As i remember quite a lot of people are annoyed by this badge atm and also it takes too much real estate on some screens (on chats list screen it blocks access to the first chat in the list, on chat screen it blocks the whole "add contact" badge, probably something else).
Do we really want to use it?

@errorists
Copy link
Contributor

@rasom I'll just chime in saying, the grey status bar was updated and the issues you've listed will be fixed as part of this PR #7141

@rasom
Copy link
Contributor Author

rasom commented Jan 22, 2019

@errorists, got it, thanks

@rasom
Copy link
Contributor Author

rasom commented Feb 1, 2019

@errorists @andmironov i can't find this color in "Status Color", should i still use it?

screen shot 2019-02-01 at 07 27 26

@rasom
Copy link
Contributor Author

rasom commented Feb 1, 2019

That's how it looks on iphone X simulator currently, gray-transparent-40 is used for separator

screen shot 2019-02-01 at 08 53 10

@andmironov
Copy link

andmironov commented Feb 1, 2019

Nice catch! Please use light grey (#EEF2F5 RGB: 238, 242, 245) instead! mockup updated
(not critical or important)

@hesterbruikman
Copy link
Contributor

So happy to see this drawer in existence! Looks great.

Any more work required? I notice:

  • The text below Stop syncing can use an update. "Until connected to wi-fi?" >Wi-Fi
  • Not sure if we can already refer to settings or update after the Settings menu has been updated

@rasom can you please describe the behavior of when the drawer would come up as currently implemented? Looks like it comes up on the login screen instead of in the chat view. Any reason for this?

@rasom
Copy link
Contributor Author

rasom commented Feb 7, 2019

@hesterbruikman please check this PR #7433 , the drawer will appear when you disable wifi

@hesterbruikman
Copy link
Contributor

Thanks @rasom

I see the drawer also come up when Wi-Fi is disabled. I think this is cool, until 'Remember my choice is checked'.

Didn't get a background on the drawer unfortunately (on Android). On iOS nothing seemed to happen, at all. Wondering if this is because of the build not working, because I don't have a SIM card or some other reason.

@hesterbruikman
Copy link
Contributor

screenshot_20190207-105728

@rasom
Copy link
Contributor Author

rasom commented Feb 7, 2019

@hesterbruikman
Copy link
Contributor

Could be an issue unique to my ancient Android (6), in that case. Tried again with the build you shared, same result.

@rasom
Copy link
Contributor Author

rasom commented Feb 7, 2019

@hesterbruikman ok I see, thanks, don't have such device to test

@rasom
Copy link
Contributor Author

rasom commented Feb 7, 2019

well, I'm wrong, I have 6.0.1

@rasom
Copy link
Contributor Author

rasom commented Feb 7, 2019

@hesterbruikman what device do you have?

@hesterbruikman
Copy link
Contributor

hmmmmm interesting, I have Android 6.0.1 as well, but on a Fairphone. Shouldn't make a difference, but apparently it does:S

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

Successfully merging a pull request may close this issue.

4 participants