-
Notifications
You must be signed in to change notification settings - Fork 9
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
chore: Improve public settings screen UX #453
chore: Improve public settings screen UX #453
Conversation
Sample app builds 📱Below you will find the list of the latest versions of the sample apps. It's recommended to always download the latest builds of the sample apps to accurately test the pull request.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## update-settings-page-ux #453 +/- ##
==========================================================
Coverage ? 51.21%
Complexity ? 287
==========================================================
Files ? 95
Lines ? 2269
Branches ? 353
==========================================================
Hits ? 1162
Misses ? 1007
Partials ? 100 ☔ View full report in Codecov by Sentry. |
ViewUtils.prepareForAutomatedTests(binding.settingsCdpApiKeyLabel, R.string.acd_cdp_api_key_input); | ||
ViewUtils.prepareForAutomatedTests(binding.settingsSiteIdKeyLabel, R.string.acd_site_id_input); | ||
ViewUtils.prepareForAutomatedTests(binding.settingsSaveButton, R.string.acd_save_settings_button); | ||
ViewUtils.prepareForAutomatedTests(binding.settingsRestoreDefaultsButton, R.string.acd_restore_default_settings_button); |
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.
@Shahroz16 @mrehan27 I couldn't find those UI tests, do I need to update something for the new fields?
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.
The tests are available in a separate Appium repository. We haven't maintained them in a while though, but having unique and consistent values across all sample apps should be sufficient for now.
} | ||
|
||
private void setupObservers() { | ||
|
||
binding.deviceTokenTextInput.setText(CustomerIO.instance().getRegisteredDeviceToken()); |
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.
Moved to internal settings screen
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.
The device token location should move to the main screen under the email.
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.
@scotttwittrockcio maybe we can add it there for convenience but also keep it in the internal settings?
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.
I don't think it's needed in both places. It's a really useful piece of information when testing push messages. It helps me quickly validate the device id matches the one in fly, and the one I'm using to send a test push to.
settingsViewModel.getSDKConfigObservable().observe(this, config -> { | ||
binding.progressIndicator.hide(); | ||
updateIOWithConfig(config); | ||
parseLinkParams(); | ||
}); | ||
} | ||
|
||
private boolean isHostURLInvalid(String url) { |
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.
Moved to internal settings screen
📏 SDK Binary Size Comparison ReportNo changes detected in SDK binary size ✅ |
Build available to test |
97bf238
to
8f5d2ac
Compare
private final Boolean deviceAttributesTrackingEnabled; | ||
@Nullable | ||
private final Boolean debugModeEnabled; | ||
private final boolean screenTrackingEnabled; |
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.
The use of wrapper classes here was intentional to differentiate between default values and user-set values. Just wanted to confirm if the switch to primitive classes is deliberate and ensures that all cases are covered.
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.
It wasn't clear to me that it was intentional so I just wanted to keep it consistent with the new values. Do we still want to keep them as nullable values? Having two getters for each field returning nullable boolean and primitive boolean was too confusing.
Do we still want to differentiate between default values and user values? Not sure if we actually use that distinction anywhere though
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.
I agree that using object classes adds some management overhead, but primitive types will always resolve to either true
or false
which can't fully capture the essence of SDK default values. Although it only becomes relevant if SDK's default value changes. I can't think of any other major use cases where it would matter, so as long as saving and restoring values features are working fine, I think using primitives is fine and won't really make a difference in most cases.
...va_layout/src/main/java/io/customer/android/sample/java_layout/sdk/CustomerIORepository.java
Show resolved
Hide resolved
...va_layout/src/main/java/io/customer/android/sample/java_layout/sdk/CustomerIORepository.java
Outdated
Show resolved
Hide resolved
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.
Everything looks good, except for what Scott suggested in his comment. Looks like device token is missing from public settings screen. Is there a separate PR for that change?
@mrehan27 Yes, I will have follow up PRs for changes to login page and other parts |
c89791b
into
update-settings-page-ux
This PR is one of series of PRs that update the UX of the settings page for the Java_Layout sample app.
PR stack:
Notes:
update-settings-page-ux
and then merge them as onechore
to the main branchchore
not to trigger an SDK release when this is mergedThe general idea of the improvements is to have our settings screen map as close as possible to the configuration of our SDK when it's being initialized. You can see how closely the fields in this public settings screen map to the config:
The UI was tested on multiple devices
Video of how it works
public-settings-page.webm