App icon indicating copy to clipboard operation
App copied to clipboard

[HOLD] Add offline feedback on settings pages - Reported by: @Santhosh-Sellavel

Open isagoico opened this issue 5 years ago • 35 comments

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Navigate to the settings page
  2. Kill the internet connection
  3. Navigate to any of the settings page and try changing content (Changing the password, changing the priority mode)

Expected Result:

There should be some kind of feedback to let the user know that the app is offline.

Actual Result:

There's no feedback that the app is offline. This is more noticeable on mobile apps where the only offline feedback can be seen when the user is on LHN/settings (via the offline dot on user avatar) and under the compose box in a conversation. This is happening in:

  1. Change Password
  2. Preferences
  3. Payments
  4. Profile

Workaround:

None needed. Going back online fixed the issue.

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Version Number: 1.1.9-1

Reproducible in staging?: Yes Reproducible in production?: Yes

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

https://user-images.githubusercontent.com/44479856/138804783-a1054adb-3b65-4fff-9d0c-127b84cc845d.mp4

https://user-images.githubusercontent.com/44479856/138804533-9e55c876-4573-423f-b43d-97933793cc83.mp4

Expensify/Expensify Issue URL:

Issue reported by: @Santhosh-Sellavel Slack conversation:

View all open jobs on GitHub

isagoico avatar Oct 26 '21 03:10 isagoico

Triggered auto assignment to @bondydaa (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

MelvinBot avatar Oct 26 '21 03:10 MelvinBot

Hmm I'm actually unsure of how we'd want to handle "offline mode" for things like changing password. We do want an offline first approach with new dot but certain calls might actually want to be ignored like changing your password, since you might then change it on web if you're phone is offline for some reason.

I'm not actually sure here so going to post in engineering-chat.

bondydaa avatar Oct 26 '21 15:10 bondydaa

got some insight here https://expensify.slack.com/archives/C03TQ48KC/p1635262815146900?thread_ts=1635262185.146600&cid=C03TQ48KC and agreement that for certain things we probably want to break our "offline first approach"

I'm not super up to date all what new dot offers but at the very least for Change Password it should be prevented in offline mode and show a message like "You cannot change your password while offline. Please try again while online".

bondydaa avatar Oct 28 '21 00:10 bondydaa

this is probably fine for a contributor though maybe we want more guidance from someone more well versed with our overall offline first approach? I'll let the contrib management team decide.

bondydaa avatar Oct 28 '21 00:10 bondydaa

Triggered auto assignment to @dylanexpensify (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

MelvinBot avatar Oct 28 '21 00:10 MelvinBot

On it

dylanexpensify avatar Oct 28 '21 11:10 dylanexpensify

  1. In src/pages/settings/PasswordPage.js we add method “withOnyx” to check current internet connection with prop “network”
  2. When user try to change Password , this code in handleChangePassword() function checks Internet connection and depend of this makes different actions:
if(this.props.network.isOffline){
            Growl.show(translateLocal('profilePage.growlMessageOnError'), CONST.GROWL.ERROR, 3000);
        } else {
            changePassword(this.state.currentPassword, this.state.newPassword)
            .then((response) => {
                if (response.jsonCode === 200) {
                    Navigation.navigate(ROUTES.SETTINGS);
                }
            });
        }
  1. In src/components/AvatarWithImagePicker.js we add method “withOnyx” to check current internet connection with prop “network”
  2. When user try to change Avatar, onPress function checks internet connection and if user is offline shows Growl popUp:
onPress={() => {
         if(this.props.network.isOffline){
                   Growl.show(translateLocal('profilePage.growlMessageOnError'), CONST.GROWL.ERROR, 3000);
         } else {
                   this.setState({isMenuVisible: true})
                }
         }
}

https://user-images.githubusercontent.com/71173662/139403527-1c01da24-d486-42ba-9edc-438457d902d5.MP4

https://user-images.githubusercontent.com/71173662/139403571-aeb466fe-2eb0-4979-92ef-96a43b9c5570.MP4

developvsn avatar Oct 29 '21 08:10 developvsn

discussion occurring re: offline strategy

dylanexpensify avatar Oct 29 '21 10:10 dylanexpensify

not overdue

dylanexpensify avatar Nov 01 '21 08:11 dylanexpensify

@dylanexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

MelvinBot avatar Nov 04 '21 19:11 MelvinBot

not overdue

dylanexpensify avatar Nov 05 '21 09:11 dylanexpensify

@dylanexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

MelvinBot avatar Nov 08 '21 19:11 MelvinBot

not overdue

dylanexpensify avatar Nov 09 '21 13:11 dylanexpensify

not overdue

dylanexpensify avatar Nov 11 '21 21:11 dylanexpensify

@dylanexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

MelvinBot avatar Nov 15 '21 19:11 MelvinBot

bringing up for convo

dylanexpensify avatar Nov 16 '21 08:11 dylanexpensify

@dylanexpensify Hey ! can you give an update on our proposal? The situation is kind of unclear here. Maybe we need to fix/change something in proposal?

developvsn avatar Nov 17 '21 16:11 developvsn

@developvsn According to the Contributor guide, as you are a new contributor, you are not allowed to work on multiple tasks at once. I saw that you are already working on two tasks simultaneously so I would suggest working on the requested changes for those. This also indicates that you have not gone through the contributor guidelines. Please read those and they will answer most of your questions regarding the process. With respect to these, there are code-style guides that will help you in PR reviews.

parasharrajat avatar Nov 17 '21 17:11 parasharrajat

Bringing up for discussion today in channel

dylanexpensify avatar Nov 29 '21 09:11 dylanexpensify

Still discussing internally, not overdue

dylanexpensify avatar Dec 08 '21 08:12 dylanexpensify