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

Tapping widget does not deep link to Stats view until Stats view is manually loaded #18452

Closed
twstokes opened this issue Apr 26, 2022 · 13 comments · Fixed by #18837
Closed

Tapping widget does not deep link to Stats view until Stats view is manually loaded #18452

twstokes opened this issue Apr 26, 2022 · 13 comments · Fixed by #18837

Comments

@twstokes
Copy link
Contributor

twstokes commented Apr 26, 2022

Expected behavior

  • Tapping the widget always deep links to the Stats view in the app

Actual behavior

  • Tapping the widget loads the Stats view in the app only after visiting the Stats view while the app is running otherwise it loads the My Site view
RPReplay_Final1651170886.MP4
Time Info
0:00 - 0:08 Deep linking doesn't work
0:08 - 0:14 Accessing the Stats view
0:14 - 0:18 Deep link now works
0:18 - 0:21 App is exited
0:21 - end Deep linking doesn't work

Steps to reproduce the behavior

  1. Perform a fresh install of WPiOS
  2. Log in to the app
  3. Background the app and add the Today widget to the Home Screen
  4. Observe the "Unable to load site stats." text on the widget (see Stats widget not working until user visits Stats screen in app #17567)
  5. Tap the widget
  6. Observe that the My Site view appears in the app
  7. Tap Stats
  8. Close WPiOS
  9. Observe the widget now shows stats correctly
  10. Tap the widget
  11. Observe that the My Site view appears in the app
  12. Tap Stats
  13. Go back to the My Site view
  14. Background the app and go to the Home Screen (do not close WPiOS this time)
  15. Tap the widget
  16. Observe that the Stats view is loaded and deep linked correctly
Tested on iPhone 12, iOS 15.4.1, WPiOS 19.7.0.2
@twstokes
Copy link
Contributor Author

@guarani
Copy link
Contributor

guarani commented Apr 27, 2022

Thanks for adding this and the matching Android issue, @twstokes!

I'm curious, how did this come up? E.g. did you come across it, or was it reported somewhere by a user?

@twstokes
Copy link
Contributor Author

👋 @guarani! This was sparked from this internal convo from Happiness: p1650977038487969-slack-C011BKNU1V5

@guarani
Copy link
Contributor

guarani commented Apr 27, 2022

Thanks for sharing @twstokes!


👋 @sla8c, could you please check if this and the related Android issue are regressions (i.e. bugs), or indeed enhancement issues as they've been designated here?

There might be more info on internal P2s, but feel free to ask the team for help. Alternatively, older versions of the app from when stats was released could be tested to verify previous behavior.

🙇

@sla8c
Copy link
Contributor

sla8c commented Apr 28, 2022

Hi @twstokes @guarani I've tested iOS 19.5 and 19.4 and it's not a regression. On iOS + today widget there is a site selection option when editing the widget so it seems like that was always the intent? However I haven't looked for / found the GH issues / PRs / done P2s search yet.

On Android I tested version 19.2 and it's not a regression either. @guarani just one note the link above re: "related Android issue" is pointed to the iOS issue. I took a look in https://github.com/wordpress-mobile/WordPress-Android/ and I don't see an issue with "deep link widget"

@twstokes
Copy link
Contributor Author

twstokes commented Apr 28, 2022

👋 @sla8c - here's a direct link to the related Android issue. @guarani's link goes to the comment above that links to the same location. 👍 Thanks for doing the research on this!

@guarani
Copy link
Contributor

guarani commented Apr 28, 2022

Hi @sla8c, thanks for checking. Based on what you're saying, I tested iOS and Android and the behavior on iOS seems correct, it's only Android that has a bug:

  • Behavior on iOS: Tapping on a widget takes me to Stats of the site the widget is configured to show stats for. 👍
  • Behavior on Android: Tapping on a widget takes me to Stats of the currently selected site. ⚠️

iOS screen recording

The video below shows that each widget opens the Stats screen of site its configured to show stats for. The names of the sites on the widgets match the site names shown after opening stats.

RPReplay_Final1651160482.MP4

Android screen recording

The video below shows that each widget opens the Stats screen of the default site for the logged-in account. Note that unlike iOS, Android widgets don't seem to show the site name, so it's a bit harder to follow what's going on.

Screen_Recording_20220428-114634_WordPress.mp4

👋 @twstokes, could you please correct me if I'm missing something? So far, everything seems to work as expected on iOS, but I can reproduce the issue on Android.


just one note the link above re: "related Android issue" is pointed to the iOS issue. I took a look in https://github.com/wordpress-mobile/WordPress-Android/ and I don't see an issue with "deep link widget"

Sorry for the confusion, @sla8c! The link points to an earlier comment on this issue which in-turn links to the Android issue.

@twstokes
Copy link
Contributor Author

Thanks @guarani and @sla8c for looking into this. 🙇

Behavior on iOS: Tapping on a widget takes me to Stats of the site the widget is configured to show stats for.

This is not what I experienced when I added the ticket, so I think we're dealing with a bug related to #17567.

RPReplay_Final1651166882.MP4

Once I visited the Stats view for that site from WPiOS immediately after recording this video, tapping the widget took me to the Stats view.

Sorry for the confusion, I'll update this issue's description. 👍

@twstokes twstokes changed the title Tapping widget deep links to the Stats view for the corresponding site Tapping widget does not deep link to Stats view Apr 28, 2022
@twstokes
Copy link
Contributor Author

twstokes commented Apr 28, 2022

@guarani I updated this ticket to reflect my current understanding. Even though it appears related to #17567, I'm not sure why I didn't see the "Unable to load site stats" message in the first place.

I set the priority for this issue to low due to medium severity (has a workaround) and low impact (my estimate based on widgets usage, though I didn't find stats to back that up).

@twstokes twstokes changed the title Tapping widget does not deep link to Stats view Tapping widget does not deep link to Stats view until Stats view is manually loaded Apr 28, 2022
@guarani
Copy link
Contributor

guarani commented Apr 28, 2022

Thanks for the update, @twstokes! Looking at the video, there definitely seems to be an issue. Can you reproduce this issue consistently?

This issue and #17567 seem to have the same steps to reproduce, but different "actual behaviors" message. When I log into the app, and add the widget, I see the "Unable to load site stats". It sounds like when you do the same, the widget loads i.e. you're unable to reproduce #17567 – is that correct?

@twstokes
Copy link
Contributor Author

I've found a way to reproduce this consistently on my test device, so I'll update this issue again to match that.

RPReplay_Final1651170886.MP4
Time Info
0:00 - 0:08 Deep linking doesn't work
0:08 - 0:14 Accessing the Stats view
0:14 - 0:18 Deep link now works
0:18 - 0:21 App is exited
0:21 - end Deep linking doesn't work

@twstokes
Copy link
Contributor Author

@guarani complete steps have been added to this ticket to reproduce the issue as well as incorporate #17567.

@guarani
Copy link
Contributor

guarani commented Apr 29, 2022

I can now reproduce, thanks so much @twstokes!

(Given the potential overlap between this issue and #17567, I added a note to that issue saying that tapping on the widget when it's displaying "Unable to load site stats" does not open the stats screen.)

Regarding this issue, the key step I was missing when trying to reproduce this was to close the app (step 8 above).

I agree with the Low priority given to this issue, because there is a workaround and we've only had one user report that I'm aware of.

Let's leave this unassigned for now 👍

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

Successfully merging a pull request may close this issue.

3 participants