-
Notifications
You must be signed in to change notification settings - Fork 1.3k
For #21437 - Relocated Home-related settings to its dedicated sub screen #21722
For #21437 - Relocated Home-related settings to its dedicated sub screen #21722
Conversation
I'll hold off on merging until I get a green light from @betsymi and @topotropic. |
var startOnHomeAfterFourHours by booleanPreference( | ||
appContext.getPreferenceKey(R.string.pref_key_start_on_home_after_four_hours), | ||
appContext.getPreferenceKey(R.string.pref_key_opening_screen_homepage), | ||
default = true | ||
) | ||
|
||
/** | ||
* Indicates if the user has selected the option to always start on the home screen. | ||
*/ | ||
var startOnHomeAlways by booleanPreference( | ||
appContext.getPreferenceKey(R.string.pref_key_start_on_home_always), | ||
appContext.getPreferenceKey(R.string.pref_key_opening_screen_last_tab), | ||
default = false | ||
) | ||
|
||
/** | ||
* Indicates if the user has selected the option to never start on the home screen. | ||
*/ | ||
var startOnHomeNever by booleanPreference( | ||
appContext.getPreferenceKey(R.string.pref_key_start_on_home_never), | ||
appContext.getPreferenceKey(R.string.pref_key_opening_screen_after_four_hours_of_inactivity), | ||
default = false |
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.
As we are changing they keys, should we also change the variable names and the docs to reflect the new behavior? :)
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 admittedly changed them in the fragment but not here. I'll update them here too. (The behavior is the same 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.
Thanks for the clarification, if the behavior is the same, why we are changing the keys? This is going to cause that we loose the previous user choice? Is that intentional?
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 didn't even consider that implication. Thank you for catching that. I'll revert this.
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.
No problem :)
private fun assertStartOnHomeOptions() { | ||
// Scroll to ensure all the items are visible. | ||
scrollToElementByText("Never") | ||
startOnHomeHeading() | ||
.check(matches(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE))) | ||
afterFourHoursToggle() | ||
.check(matches(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE))) | ||
alwaysStartOnHomeToggle() | ||
.check(matches(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE))) | ||
} | ||
|
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.
After merging, let's notify the QA team on #mobile-test-alerts, that we are removing this test and they will need to update it to reflect the new UI :)
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.
LGTM
…icated sub screen (mozilla-mobile#21722) * For mozilla-mobile#21437 - Relocated Home-related settings to its dedicated sub screen * For mozilla-mobile#21437 - Updated show top sites toggle text * PR: Fixed lint warning. Reverted preference keys * PR: added ignore for UI test * PR: Added ignore for UI test
Pull Request checklist
To download an APK when reviewing a PR: