-
Notifications
You must be signed in to change notification settings - Fork 916
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
Update Settings design: Add feature flag & new Settings screen #5300
Update Settings design: Add feature flag & new Settings screen #5300
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
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 understand why have you copied the screen. What’s the benefit of doing it? We should start the new screen from scratch.
There’s a feature flag, have it disabled by default also for internal users. When you want to try the new screen, manually flip the switch and test it.
|
||
@SuppressLint("NoLifecycleObserver") | ||
@ContributesViewModel(ActivityScope::class) | ||
class NewSettingsViewModel @Inject constructor( |
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.
same here, this is inheriting all the bad practices we’ve been adding over the years. It’s going to take you much longer than if you start the screen from scratch with the new design.
...ions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/RealSubscriptions.kt
Outdated
Show resolved
Hide resolved
The idea is get the UI work done first, using the existing screen as the basis and then start working on the plugins, and at that point look to update the screen. I believe this de-risks the project if the plugins work takes longer or I hit a snag. You could argue we could ship this as soon as the UI work is done and then ship the plugins work later. The feature flag for this work is already disabled by default. |
Note we've also duplicated the xml layout and are now referring to it's binding in the Activity I used a new title of "New Settings" for the activity so it's easy to differentiate and notice if you're using the flagged version. I will remove this once we have the new UI for the items and it's more obvious it's the updated version
NotificationsActivity in the next commit
You can see in the viewmodel that I had some issues with the SurveyAvailableNotification 1. The SurveyAvailableNotification needs a notification in the database, otherwise we get a NoElement exception as we call "last()" on the list of surveys when getting them in the intent 2. The intent hits a repo that hits a DAO, that is not a suspend function, so we have to be off the main thread Next we'll add VPN notifications
This will be our bridge to either the Legacy or NewSettingsActivity
No longer needed
b89ca53
to
ef451b7
Compare
ef451b7
to
1a810d9
Compare
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 toggle should be disabled by default
settings/settings-api/src/main/java/com/duckduckgo/settings/api/NewSettingsFeature.kt
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.
works as expected, thanks @mikescamell !
Task/Issue URL: https://app.asana.com/0/488551667048375/1208785611228225/f
Description
Adds a feature flag and new screen for the new updated Settings screen designs.
For now it's the same layout as before, this is just laying the groundwork for the rest of the implementation.
So you can see that the flag is working, the new Settings screen has a temporary title of "New Settings" which will be removed when the UI changes enough that it's perceivable.
I also added the ability to trigger notifications from dev settings so it's easier to test the ClearData notification route to opening settings.
Steps to test this PR
Opening Settings from the Browser menu
Opening Settings from ADS shortcut
Clear Data Notification
VPN Disabled Notification
Clear Data Notification
New Tab Page
Tab Switcher
Privacy Pro
SpecialUrlDetector
to true and load a web pageUI changes
N/A