Skip to content
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

add default browser selection overflow menu item #5391

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

LukasPaczos
Copy link
Contributor

Task/Issue URL: https://app.asana.com/0/72649045549333/1208944504536342/f

Description

Adds an overflow menu item that advertises setting DuckDuckGo as the default browser.

The introduced item is not yet used anywhere and click listeners/handlers will be added in following PRs.

Steps to test this PR

As an example, apply below diff and the item will show up whenever you open the overflow menu.

diff --git a/app/src/main/java/com/duckduckgo/app/browser/viewstate/BrowserViewState.kt b/app/src/main/java/com/duckduckgo/app/browser/viewstate/BrowserViewState.kt
index bfb487f1e..5db2efe5b 100644
--- a/app/src/main/java/com/duckduckgo/app/browser/viewstate/BrowserViewState.kt
+++ b/app/src/main/java/com/duckduckgo/app/browser/viewstate/BrowserViewState.kt
@@ -34,7 +34,7 @@ data class BrowserViewState(
     val showTabsButton: Boolean = true,
     val fireButton: HighlightableButton = HighlightableButton.Visible(),
     val showMenuButton: HighlightableButton = HighlightableButton.Visible(),
-    val showSelectDefaultBrowserMenuItem: Boolean = false,
+    val showSelectDefaultBrowserMenuItem: Boolean = true,
     val canSharePage: Boolean = false,
     val canSaveSite: Boolean = false,
     val bookmark: SavedSite.Bookmark? = null,

UI changes

Light Dark
Screenshot_20241213_172011 Screenshot_20241213_172029
Screenshot_20241213_172048 Screenshot_20241213_172149

Comment on lines 37 to +38
<string name="defaultBrowserLetsDoIt">Set as Default Browser</string>
<string name="defaultBrowserMenuTitle">Set as Default Browser</string>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assumed that we want to keep each text view's string separate to avoid potential changes impacting other text views unexpectedly. And since we already had the same string translated, I copied that around.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is common-ui the right place for the new icon? Or should it land in app @malmstein?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is common-ui the right place for the new color? Or should it land in app @malmstein?

@LukasPaczos LukasPaczos enabled auto-merge (squash) December 13, 2024 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant