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

Update AutocompleteScreen button background #8538

Merged
merged 2 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# CHANGELOG

## XX.XX.XX - 20XX-XX-XX
* [FIXED][8538](https://github.com/stripe/stripe-android/pull/8538) Change Autocomplete Screen "Enter address manually" button background to prevent unexpected changes to user set colors

## 20.44.0 - 2024-05-20

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.focus.FocusRequester
import androidx.compose.ui.focus.focusRequester
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.testTag
import androidx.compose.ui.res.painterResource
Expand All @@ -41,8 +42,8 @@ import com.stripe.android.common.ui.LoadingIndicator
import com.stripe.android.paymentsheet.injection.AutocompleteViewModelSubcomponent
import com.stripe.android.paymentsheet.ui.AddressOptionsAppBar
import com.stripe.android.ui.core.elements.autocomplete.PlacesClientProxy
import com.stripe.android.uicore.darken
import com.stripe.android.uicore.elements.TextFieldSection
import com.stripe.android.uicore.shouldUseDarkDynamicColor
import com.stripe.android.uicore.stripeColors
import com.stripe.android.uicore.text.annotatedStringResource
import javax.inject.Provider
Expand Down Expand Up @@ -93,10 +94,10 @@ internal fun AutocompleteScreenUI(viewModel: AutocompleteViewModel) {
}
},
bottomBar = {
val background = if (isSystemInDarkTheme()) {
MaterialTheme.stripeColors.component
val background = if (MaterialTheme.stripeColors.materialColors.surface.shouldUseDarkDynamicColor()) {
Color.Black.copy(alpha = 0.07f)
} else {
MaterialTheme.stripeColors.materialColors.surface.darken(0.07f)
Color.White.copy(alpha = 0.07f)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Think when we synced on this, the plan was to use 0.2f, did this change?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Just checked the run ticket, see that this did indeed change. All good!

Copy link
Collaborator Author

@tjclawson-stripe tjclawson-stripe May 24, 2024

Choose a reason for hiding this comment

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

Based on this thread we decided to go with 7%. Archived thread in ticket

}
Row(
verticalAlignment = Alignment.CenterVertically,
Expand Down
Loading