Implement view for logged-out, no-site, and no-data status - #20399
Merged
staskus merged 5 commits intoMar 24, 2023
Conversation
tzef
marked this pull request as draft
March 24, 2023 05:41
This was referenced Mar 24, 2023
tzef
force-pushed
the
feature/beemotrial/lockscreen-widgets-unconfigure-ui
branch
from
March 24, 2023 10:29
fc6a2c2 to
4ccba33
Compare
tzef
marked this pull request as ready for review
March 24, 2023 10:31
Contributor
Author
|
Hi @staskus , this is the next PR for review, thanks 🙏 |
staskus
self-requested a review
March 24, 2023 10:46
staskus
merged commit Mar 24, 2023
dd7a162
into
wordpress-mobile:feature/19411-add-lock-screen-stats-widgets
This was referenced Mar 27, 2023
Generated by 🚫 dangerJS |
This was referenced Mar 28, 2023
4 tasks
staskus
added a commit
that referenced
this pull request
Sep 4, 2023
* Add new feature flag for lock screen widgets in Jetpack (#20309) * Add new feature flag for widget in lock screen * Add new widget kind to widget configuration * Add empty lock screen widget * Add JETPACK_STATS_WIDGETS compilation condition To prevent lock screen widgets from displaying on WordPress target * Move LockScreenStatsWidgetsView to views folder group * Revert compilation condition, change to isJetpack of AppCondiguration * Implement lock screen widgets UI (#20312) * Extract statsUrl from private to extension for reusable with lock screen widget * Implement single stat view for today views widget Add view provider for handling building view for site selected status Add ViewModelMapper for converting viewModel from home widget data * Update LockScreenStatsWidgetsView body to get the view from view provider * Add mapper test to verify the viewModel converting from widget data correctly Add mapper and viewModel to WordPress target because app extension is not able to run unitTest * Fix getStatsURL typo * Add localizable string for "Views Today" title (#20353) * Add views in today localizable string for footer label * Remove dateRange and footer, only title is enough for existing feature * Fix home screen widget for WordPress target disappeared. (#20371) The root cause is the WidgetBundleBuilder body doesn't allow control flow statements, move it to supportedFamilies with feature flag to keep all control logic in the same place * Extract content logic to config from lock screen widget (#20317) * Update title of view provider from hardcoded to pass from config * Add lock screen stats widget config and implementation to include required information * Pass config to LockScreenStatsWidget Replaced the hardcoded data with config properties * Add associated type view for other status and TODO comments * Extract app configuration and feature flag check into config * Create a standalone TimeLineProvider and TimelineEntry for the lock screen (#20368) * Add widget data and timeline entry for lock screen to separate concerns * Add lock screen time line provider for lock screen stats widget entry Update stats widgets service result type to consist of home widget and lock screen widget for reusable * Update to use LockScreenSiteListProvider in LockScreenStatsWidget Update associated type widget data to conform `LockScreenStatsWidgetData` more Update model mapper and view provider to based on lock screen widget data Remove unnecessary `disabled` status from `LockScreenStatsWidgetsView` Remove unnecessary `widgetKind` parameter from `LockScreenStatsWidget` Remove unused statsURL converter from the view model mapper Add home widget data conform lock screen widget data extension to WordPress target for unitTest * Extract widget load data to loader for sharing with lock screen time line provider * Update widget reader to extract the cache read from getSnapshot * Extract noData, noSite, loggedOut, disabled status checking logic to data reader with status callback * Add unitTest for widget data reader Extract cache reading to `HomeWidgetDataFileReader` for mocking the testing object Extract app configuration is jetpack to parameter for mocking the config * Remove multiple space lines * Update multiple callback to Result and enum Error * Implement view for logged-out, no-site, and no-data status (#20399) * Add unconfigured view for lockscreen widget * Add unconfigured view model to view provider and model mapper * Add unconfigured view model unit test * Add background to unconfigured view align with success status widget appearance * Remove todo comments * Add reload timelines for lock screen widget (#20405) * Implement event tracking for the new lock screen widget (#20422) * Add event key to configuration and pass to trackers in lockscreen widget Expand tracks for lockscreen stats entry Add rectangular widgets count and widgets update of the new widget * Add lockscreen_widget source to deeplink tracked Update statsUrl to widgetUrl for separating the url from homescreen widgets * Update unitTests * Remove separate widget url, move widget source from widget data extension Add widget source type, assign the type in widgetURL in the view * Add widget url source test to verify the converting with DeepLinkSource * Disable the feature flag (#20427) --------- Co-authored-by: Beemo Lee <tzef8220@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the PR for implementing the remaining status UI.
(Confirm the data display on UI correctly in this phase)
Description
Follow the existing unconfigured view style in the home screen widget to build the configured view for the lock screen widget.

Note: I set the fixed-size font to align with the success status widget.
Testing Instructions
You have to add the widget after the account switching due to the refresh notification not implemented yet (will be in next PR)
Logged Out
No Site
No Data
I don't know how to test it in normal steps without programmatically change the config
Regression Notes
Potential unintended areas of impact
N/A, no touch existing features
What I did to test those areas of impact (or what existing automated tests I relied on)
N/A
What automated tests I added (or what prevented me from doing so)
unconfigured view model mapping test in
WidgetsViewModelMapperTestsPR submission checklist:
RELEASE-NOTES.txtif necessary.