Skip to content

Commit

Permalink
ADS: Section Header List Item update (#3842)
Browse files Browse the repository at this point in the history
<!--
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)
If your PR does not involve UI changes, you can remove the **UI
changes** section

At a minimum, make sure your changes are tested in API 23 and one of the
more recent API levels available.
-->

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

### Description
New text color added to design system and applied to
`SectionHeaderListItem`

### Steps to test this PR

- Install from branch
- Go to Settings
- [ ] Check text color for all headers is updated to latests specs

### UI changes
| Before  | After |
| ------ | ----- |
<img width="408" alt="Screenshot 2023-11-09 at 15 56 34"
src="https://github.com/duckduckgo/Android/assets/20798495/0862b7d3-4a7c-4efb-ac37-8ed08fe5857a">|<img
width="408" alt="Screenshot 2023-11-09 at 15 44 43"
src="https://github.com/duckduckgo/Android/assets/20798495/5ef310c2-12f5-4a63-b269-25e2724769f0">|
<img width="404" alt="Screenshot 2023-11-09 at 15 56 56"
src="https://github.com/duckduckgo/Android/assets/20798495/0e190f14-c3db-4694-84be-66a3d91e45a1">|<img
width="405" alt="Screenshot 2023-11-09 at 15 44 31"
src="https://github.com/duckduckgo/Android/assets/20798495/9845b1e4-1cf8-4844-97f0-e7086751427c">|

---------

Co-authored-by: David González <malmstein@gmail.com>
  • Loading branch information
nalcalag and malmstein authored Nov 16, 2023
1 parent 85ce8ff commit 1c2cdbe
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class SectionHeaderListItem @JvmOverloads constructor(
).apply {
primaryText = getString(R.styleable.SectionHeaderListItem_primaryText).orEmpty()
binding.sectionHeaderText.text = primaryText
binding.sectionHeaderText.setTextColor(ContextCompat.getColorStateList(context, R.color.accent_blue_text_color_selector))
binding.sectionHeaderText.setTextColor(ContextCompat.getColorStateList(context, R.color.tertiary_text_color_selector))

val showOverflowMenuIcon = getBoolean(R.styleable.SectionHeaderListItem_showOverflowMenu, false)
if (showOverflowMenuIcon) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@

<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:color="?attr/daxColorTextDisabled" />
<item android:state_enabled="true" android:color="?attr/daxColorAccentBlue"/>
<item android:state_enabled="true" android:color="?attr/daxColorTertiaryText"/>
</selector>
4 changes: 4 additions & 0 deletions common/common-ui/src/main/res/values/design-system-colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
daxColorAccentYellow
daxColorContainerDisabled - Disabled color applied to background elements like buttons
daxColorTextDisabled - Disabled color applied to text elements
daxColorTertiaryText - Tertiary text color
-->
<attr name="daxColorBackground" format="color"/>
<attr name="daxColorBackgroundInverted" format="color"/>
Expand All @@ -50,6 +51,7 @@
<attr name="daxColorPrimaryInvertedText" format="color"/>
<attr name="daxColorSecondaryText" format="color"/>
<attr name="daxColorSecondaryInvertedText" format="color"/>
<attr name="daxColorTertiaryText" format="color"/>
<attr name="daxColorPrimaryIcon" format="color"/>
<attr name="daxColorIconDisabled" format="color"/>
<attr name="daxColorDestructive" format="color"/>
Expand Down Expand Up @@ -145,6 +147,7 @@

<color name="black84">#D6000000</color>
<color name="black60">#99000000</color>
<color name="black48">#7A000000</color>
<color name="black40">#66000000</color>
<color name="black36">#5C000000</color>
<color name="black30">#4D000000</color>
Expand All @@ -158,6 +161,7 @@

<color name="white84">#D6FFFFFF</color>
<color name="white60">#99FFFFFF</color>
<color name="white48">#7AFFFFFF</color>
<color name="white40">#66FFFFFF</color>
<color name="white36">#5CFFFFFF</color>
<color name="white30">#4DFFFFFF</color>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
<item name="daxColorPrimaryInvertedText">@color/black84</item>
<item name="daxColorSecondaryText">@color/white60</item>
<item name="daxColorSecondaryInvertedText">@color/black60</item>
<item name="daxColorTertiaryText">@color/white48</item>
<item name="daxColorPrimaryIcon">@color/white84</item>
<item name="daxColorDestructive">@color/alertRedOnDarkDefault</item>
<item name="daxColorIconDisabled">@color/white40</item>
Expand Down Expand Up @@ -225,6 +226,7 @@
<item name="daxColorPrimaryInvertedText">@color/white84</item>
<item name="daxColorSecondaryText">@color/black60</item>
<item name="daxColorSecondaryInvertedText">@color/white60</item>
<item name="daxColorTertiaryText">@color/black48</item>
<item name="daxColorPrimaryIcon">@color/black84</item>
<item name="daxColorIconDisabled">@color/black40</item>
<item name="daxColorDestructive">@color/alertRedOnLightDefault</item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package com.duckduckgo.sync.impl

import androidx.annotation.*
import com.duckduckgo.app.di.AppCoroutineScope
import com.duckduckgo.app.global.DispatcherProvider
import com.duckduckgo.common.utils.DispatcherProvider
import com.duckduckgo.di.scopes.*
import com.duckduckgo.sync.api.engine.*
import com.duckduckgo.sync.api.engine.SyncEngine.SyncTrigger.ACCOUNT_CREATION
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package com.duckduckgo.sync.impl

import androidx.test.ext.junit.runners.AndroidJUnit4
import com.duckduckgo.app.global.DefaultDispatcherProvider
import com.duckduckgo.common.utils.DefaultDispatcherProvider
import com.duckduckgo.sync.TestSyncFixtures.accountCreatedFailDupUser
import com.duckduckgo.sync.TestSyncFixtures.accountCreatedSuccess
import com.duckduckgo.sync.TestSyncFixtures.accountKeys
Expand Down

0 comments on commit 1c2cdbe

Please sign in to comment.