-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Lock Screen Widgets: Enable feature #21535
Conversation
|
App Name | ![]() |
|
Configuration | Release-Alpha | |
Build Number | pr21535-7a3e9c9 | |
Version | 23.2 | |
Bundle ID | org.wordpress.alpha | |
Commit | 7a3e9c9 | |
App Center Build | WPiOS - One-Offs #7107 |
|
App Name | ![]() |
|
Configuration | Release-Alpha | |
Build Number | pr21535-7a3e9c9 | |
Version | 23.2 | |
Bundle ID | com.jetpack.alpha | |
Commit | 7a3e9c9 | |
App Center Build | jetpack-installable-builds #6151 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @staskus! The PR itself looks great. I did some testing to get a sense of whether this feels ready to ship and ran into some issues that I'm not sure how to diagnose.
Testing debug builds from Xcode
Widget asking me to add a site
- Fresh install on iOS simulator after resetting the sim
- Log into a testing WP.com account
- Add widgets
- Widgets say "Create or add a site to see today's stats" despite being logged into a WP.com account
Reproduced on iPhone simulator (iOS 16.4) and iPhone physical device (iOS 17 beta). Switching the site in the widget's site list didn't work either to resolve this.
Untitled.mp4
Unable to add widget
- Fresh install on iOS device running iOS 17 beta
- Log into a testing WP.com account
- Tapped widget preview to add widget but it does nothing
- Also note the widget previews are either blank or show a ghost loading state
- Dragged widget preview over to widget area (widget or lock screen itself appears to crash, see below screen recording)
- Re-opening the widget list, Jetpack is no longer in the list of apps
- I restarted the device and I was able to add widgets
💡 Takeaway: iOS might "delist" apps from the list of available widgets and restarting the device seems to resolve this
RPReplay_Final1694558080.MP4
Widget showing zero stats
- Fresh install on iOS device running iOS 17 beta
- Log into a testing WP.com account
- Note that there was a "leftover" widget on the lock screen despite this being a fresh install (seems like an iOS bug unrelated to our widgets)
- Tapped widget preview to add the All-Time Views widget
- The widget was showing zero
- I tapped the widget, added the All-Time card, and noted there were 14 views
- Widget now shows 14 views
Testing release builds via App Center
I felt like a lot of this could be related to debug builds so I downloaded the build from App Center (I vaguely remember Home screen widget issues on debug builds that weren't present on production builds). Oddly, no widgets appeared until I restarted the device (this again could be an iOS 17 beta issue).
Here things worked better but this issue of it showing zero for stats persisted. Here's a screen recording (same steps to reproduce as above "Widget showing zero stats"):
RPReplay_Final1694562402.MP4
What are your thoughts on this? I'm unsure if it's:
- An iOS 17 beta issue (I don't have a non-beta device handy right now)
- Reproducible by others (keen to hear if you can reproduce)
- A temporary issue likely to go away after the user opens the app
- An actual bug in the widget code (I haven't tried to debug this as I spent time testing to narrow things down to get steps to reproduce)
Generated by 🚫 dangerJS |
…themselves After removing iOS13 today widget-related code, we also removed a commonly reused credential storing functionality. Re-adding it to StatsWidgetsStore
I was able to reproduce it and diagnose the issue. It is a regression from #21521.
I still haven't been able to reproduce it. I remember similar issues previously with an account that didn't have a default site set but nothing beyond that. Could you try to see if it's reproducible with some other account?
I never encountered such a thing. I will try to look for some explanations online. |
It's great to hear you could reproduce and find a fix ❤️ Regarding the other issues, they were not reproducible on Release builds, so perhaps they are non-issues. I think this can be merged if the zero stats issue is fixed, I'll review it today and hopefully, we can get this merged for Monday's beta 🤞 |
When using WidgetBundle and dealing with account state changes Apple recommends using reloadAllTimelines() https://developer.apple.com/documentation/widgetkit/keeping-a-widget-up-to-date
@guarani One thing to note is that calling I captured a sequence here:
Reload.Timelines.Delay.720p.movI made little improvements based on Apple recommendations:
Since we're using WidgetBundle, I'm using |
- In rare cases with no default site, simply show the first site in the data - Restructured WidgetDataReader to only use a single method for snapshot and timeline for consistent data loading logic
I couldn't reproduce more issues myself but I just went through the code to see any other cases or code paths that could cause issues.
|
Sorry I didn't review this yesterday! Thanks for the changes you made since yesterday, I'll review this today. If it helps, I can merge this after reviewing to get this in the beta. |
@guarani thanks! I'm still trying to figure out if my changes are causing UI test failures or are they flaky. They haven't passed since I merged trunk. Update:
Of course. If any issues come up, then we'll delay for 23.4. I will then only make a PR on Monday to merge 81ce636 to 23.3. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all the work you put into this! I re-tested and it's working well!
I used a Debug build built from Xcode to add widgets, switch sites, and log into different accounts and the widgets worked well.
I'll merge this later today unless you do first 🙇 |
Enabling lock screen widgets by removing widget-related feature flags
To test:
All the functionality was already tested in other PRs. Confirm that lock widgets can be added after launching the app.
More testing steps: pc8eDl-14z-p2#comment-861
Regression Notes
Potential unintended areas of impact
What I did to test those areas of impact (or what existing automated tests I relied on)
What automated tests I added (or what prevented me from doing so)
PR submission checklist:
RELEASE-NOTES.txt
if necessary.