Skip to content

Conversation

@cmonfortep
Copy link
Contributor

@cmonfortep cmonfortep commented Feb 9, 2023

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

Description

Adds a new waitlist in settings. Similar to the one we had for macOS.

Steps to test this PR

Follow instructions in https://app.asana.com/0/0/1203975737540623/f

UI changes

Before After
!(Upload before screenshot) (Upload after screenshot)

@cmonfortep
Copy link
Contributor Author

cmonfortep commented Feb 9, 2023

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

* Public interface to provide navigation Intents related to Windows App Settings
*/
interface WindowsSettingsNav {
fun openWindowsSettings(context: Context): Intent
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would rename this to activityContext and even probably annotated with ActivityContext. That's the only reason you need a context here, if it was the app context you would not need it as a parameter

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good 👍

Comment on lines 1 to 18
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="16dp"
android:height="16dp"
android:viewportWidth="16"
android:viewportHeight="16">
<path
android:pathData="M7.5,1.5H1.5V7.5H7.5V1.5Z"
android:fillColor="#000000"
android:fillAlpha="0.84"/>
<path
android:pathData="M7.5,8.5H1.5V14.5H7.5V8.5Z"
android:fillColor="#000000"
android:fillAlpha="0.84"/>
<path
android:pathData="M8.5,1.5H14.5V7.5H8.5V1.5Z"
android:fillColor="#000000"
android:fillAlpha="0.84"/>
<path
android:pathData="M14.5,8.5H8.5V14.5H14.5V8.5Z"
android:fillColor="#000000"
android:fillAlpha="0.84"/>
</vector>
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as before, you need to replace fillColor attribute with ?attr/daxColorPrimaryIcon and remove alpha in all <paths/>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks for the check @nalcalag 👍

@cmonfortep cmonfortep force-pushed the feature/cristian/windows_waitlist branch 2 times, most recently from 3ec563c to 38b46a9 Compare February 15, 2023 08:38
This was referenced Feb 15, 2023
@cmonfortep cmonfortep marked this pull request as ready for review February 15, 2023 13:10
Copy link
Contributor

@marcosholgado marcosholgado left a comment

Choose a reason for hiding this comment

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

LGTM except that PendingIntent crash

putExtra(Intent.EXTRA_TITLE, getString(R.string.windows_waitlist_share_invite))
}

val pi = PendingIntent.getBroadcast(
Copy link
Contributor

Choose a reason for hiding this comment

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

This is making the app crash with

java.lang.IllegalArgumentException: com.duckduckgo.mobile.android.debug: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.

In reality that pi variable is not used so you can delete and this should work again.

private fun executeCommand(command: Command) {
when (command) {
is ShareLink -> launchSharePageChooser()
GoToWindowsClientSettings -> launchWindowsClientSettings()
Copy link
Contributor

Choose a reason for hiding this comment

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

is this missing an is ?

-->

<resources>
<string name="macos_app">DuckDuckGo Desktop App</string>
Copy link
Contributor

Choose a reason for hiding this comment

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

Just as a reminder when we get the translations would be good to translate these strings as well.

}
}

fun onDialogDismissed() {
Copy link
Contributor

Choose a reason for hiding this comment

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

This function is not used anywhere so we can delete it.

@cmonfortep cmonfortep force-pushed the feature/cristian/windows_waitlist branch from 0dfc124 to 2b866fe Compare February 17, 2023 10:15
setSpan(
ForegroundColorSpan(
ContextCompat.getColor(context, R.color.cornflowerBlue),
context.getColorFromAttr(R.attr.daxColorAccentBlue),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated spannable links colors (reported by sveta, discussed with @malmstein )

<!--
Note: This checklist is a reminder of our shared engineering
expectations.
The items in Bold are required
If your PR involves UI changes:
1. Upload screenshots or screencasts that illustrate the changes before
/ after
2. Add them under the UI changes section (feel free to add more columns
if needed)
    3. Make sure these changes are tested in API 23 and API 26
If your PR does not involve UI changes, you can remove the **UI
changes** section
-->

Task/Issue URL:
https://app.asana.com/0/488551667048375/1203975081655927/f

### Description
Adds notify me component to waitlist

### Steps to test this PR

_Feature 1_
- [ ] fresh install
- [ ] go to settings waitlist
- [ ] join the waitlist
- [ ] if notifications enabled, notifyme component shouldn't appear. If
disabled, ensure it appears.

### UI changes
| Before  | After |
| ------ | ----- |
!(Upload before screenshot)|(Upload after screenshot)|
@cmonfortep cmonfortep merged commit d0212bb into develop Feb 21, 2023
@cmonfortep cmonfortep deleted the feature/cristian/windows_waitlist branch February 21, 2023 16:00
aitorvs pushed a commit that referenced this pull request Feb 24, 2023
Task/Issue URL: https://app.asana.com/0/0/1202843599939263/f 

### Description
Adds a new waitlist in settings. Similar to the one we had for macOS.


### Steps to test this PR
Follow instructions in https://app.asana.com/0/0/1203975737540623/f

### UI changes
| Before  | After |
| ------ | ----- |
!(Upload before screenshot)|(Upload after screenshot)|

Co-authored-by: Marcos <marcosh@duckduckgo.com>
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.

4 participants