Skip to content

Commit 616b935

Browse files
committed
Merge branch 'trunk' into feature-branch-for-pos-product-migration
2 parents 524e313 + f8e2fd7 commit 616b935

File tree

89 files changed

+2740
-1114
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+2740
-1114
lines changed

.github/dependabot.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ updates:
1515
- "com.google.devtools.ksp*"
1616
exclude-patterns:
1717
- "org.jetbrains.kotlinx*"
18+
cooldown:
19+
semver-major-days: 30
20+
semver-minor-days: 30
1821
ignore:
1922
# Bumping 2.26.3 to 2.27.2 will break the mocks. For more details, see
2023
# https://github.com/wiremock/wiremock/issues/1345#issuecomment-656060968

.github/workflows/dependabot_automerge.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ jobs:
2828
if: steps.metadata.outputs.update-type == 'version-update:semver-patch'
2929
run: |
3030
set -e
31-
number=$(gh api repos/$GITHUB_REPOSITORY/milestones \
31+
title=$(gh api repos/$GITHUB_REPOSITORY/milestones \
3232
--jq '[.[]
3333
| select(.state=="open" and .due_on!=null and (.due_on | fromdateiso8601) >= now)
3434
]
3535
| sort_by(.due_on)
36-
| .[0].number')
36+
| .[0].title')
3737
38-
if [ -n "$number" ]; then
39-
echo "Assigning milestone #$number to PR #${{ github.event.pull_request.number }}"
40-
gh pr edit "${{ github.event.pull_request.number }}" --milestone "$number"
38+
if [ -n "$title" ]; then
39+
echo "Assigning milestone '$title' to PR #${{ github.event.pull_request.number }}"
40+
gh pr edit "${{ github.event.pull_request.number }}" --milestone "$title"
4141
else
4242
echo "No future open milestones found."
4343
fi

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<!--
22
Contains editorialized release notes. Raw release notes should go into `RELEASE-NOTES.txt`.
33
-->
4+
## 23.2
5+
We’ve improved your WooCommerce app with new POS customization settings, clearer shipping label updates, smarter order filters, and automatic shipment weight entry. You’ll also find better handling of in-progress labels, fractional stock display, and enhanced login reliability for a smoother store management experience.
6+
47
## 23.1
58
Enhanced your store management experience with exciting new features! Remove backgrounds from product images instantly with our new one-tap tool. Improved shipping labels with better address validation, cleaner layouts, and smarter split shipment handling. Fixed order selection issues and enhanced login error handling for smoother operations.
69

RELEASE-NOTES.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
*** PLEASE FOLLOW THIS FORMAT: [<priority indicator, more stars = higher priority>] <description> [<PR URL>]
22
*** Use [*****] to indicate smoke tests of all critical flows should be run on the final APK before release (e.g. major library or targetSdk updates).
33
*** For entries which are touching the Android Wear app's, start entry with `[WEAR]` too.
4+
23.3
5+
-----
6+
7+
48
23.2
59
-----
610
- [Internal] Propagate response headers to all Rest Clients [https://github.com/woocommerce/woocommerce-android/pull/14513]
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package com.woocommerce.android.wear.di
2+
3+
import dagger.Binds
4+
import dagger.Module
5+
import dagger.hilt.InstallIn
6+
import dagger.hilt.components.SingletonComponent
7+
import org.wordpress.android.fluxc.network.rest.wpapi.applicationpasswords.ApplicationPasswordsConfiguration
8+
import javax.inject.Inject
9+
10+
@Module
11+
@InstallIn(SingletonComponent::class)
12+
interface ApplicationPasswordsModule {
13+
@Binds
14+
fun bindApplicationPasswordsConfiguration(
15+
configuration: WooWearApplicationPasswordsConfiguration
16+
): ApplicationPasswordsConfiguration
17+
}
18+
19+
class WooWearApplicationPasswordsConfiguration @Inject constructor() : ApplicationPasswordsConfiguration {
20+
override val applicationName: String = ""
21+
22+
override fun isEnabledForDirectAccess(): Boolean = false
23+
override suspend fun isEnabledForJetpackAccess(): Boolean = false
24+
}

WooCommerce/build.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ fladle {
1919
variant = "vanillaDebug"
2020
serviceAccountCredentials = rootProject.file(".configure-files/firebase.secrets.json")
2121
testTargets = [
22-
"notPackage com.woocommerce.android.e2e.tests.screenshot"
22+
"notPackage com.woocommerce.android.e2e.tests.screenshot",
23+
"notClass com.woocommerce.android.e2e.tests.ui.OrdersRealAPI",
24+
"notClass com.woocommerce.android.e2e.tests.ui.ProductsRealAPI"
2325
]
2426
devices = [
2527
["model": "MediumPhone.arm", "version": "35"]

WooCommerce/src/main/kotlin/com/woocommerce/android/AppPrefs.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ object AppPrefs {
134134
CUSTOM_FIELDS_TOP_BANNER_DISMISSED,
135135
BLAZE_CAMPAIGN_SELECTED_OBJECTIVE,
136136
BLAZE_CAMPAIGN_OBJECTIVE_SWITCH_CHECKED,
137-
IS_SITE_WPCOM_SUSPENDED
137+
IS_SITE_WPCOM_SUSPENDED,
138+
JETPACK_APP_PASSWORDS_ENABLED
138139
}
139140

140141
/**
@@ -301,6 +302,10 @@ object AppPrefs {
301302
get() = getBoolean(DeletablePrefKey.GATEWAY_MIGRATED, false)
302303
set(value) = setBoolean(DeletablePrefKey.GATEWAY_MIGRATED, value)
303304

305+
var jetpackAppPasswordsEnabled: Boolean
306+
get() = getBoolean(DeletablePrefKey.JETPACK_APP_PASSWORDS_ENABLED, true)
307+
set(value) = setBoolean(DeletablePrefKey.JETPACK_APP_PASSWORDS_ENABLED, value)
308+
304309
fun getProductSortingChoice(currentSiteId: Int) = getString(getProductSortingKey(currentSiteId)).orNullIfEmpty()
305310

306311
fun setProductSortingChoice(currentSiteId: Int, value: String) {

WooCommerce/src/main/kotlin/com/woocommerce/android/AppPrefsWrapper.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ open class AppPrefsWrapper @Inject constructor() {
4242
open var orderSummaryMigrated by AppPrefs::orderSummaryMigrated
4343
open var gatewayMigrated by AppPrefs::gatewayMigrated
4444

45+
var jetpackAppPasswordsEnabled by AppPrefs::jetpackAppPasswordsEnabled
46+
4547
fun getAppInstallationDate() = AppPrefs.installationDate
4648

4749
fun getReceiptUrl(localSiteId: Int, remoteSiteId: Long, selfHostedSiteId: Long, orderId: Long) =
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package com.woocommerce.android.applicationpasswords
2+
3+
import com.woocommerce.android.AppPrefsWrapper
4+
import com.woocommerce.android.BuildConfig
5+
import com.woocommerce.android.util.DeviceInfo
6+
import com.woocommerce.android.util.FeatureFlag.APP_PASSWORDS_FOR_JETPACK_SITES
7+
import jakarta.inject.Inject
8+
import org.wordpress.android.fluxc.network.rest.wpapi.applicationpasswords.ApplicationPasswordsConfiguration
9+
10+
class WooApplicationPasswordsConfiguration @Inject constructor(
11+
private val appPrefs: AppPrefsWrapper
12+
) : ApplicationPasswordsConfiguration {
13+
override val applicationName: String =
14+
"${BuildConfig.APPLICATION_ID}.app-client.${DeviceInfo.name.replace(' ', '-')}"
15+
16+
override suspend fun isEnabledForJetpackAccess(): Boolean =
17+
APP_PASSWORDS_FOR_JETPACK_SITES.isEnabled() && appPrefs.jetpackAppPasswordsEnabled
18+
}

WooCommerce/src/main/kotlin/com/woocommerce/android/config/FirebaseRemoteConfigRepository.kt

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ class FirebaseRemoteConfigRepository @Inject constructor(
2121
companion object {
2222
private const val DEBUG_INTERVAL = 10L
2323
private const val RELEASE_INTERVAL = 31200L
24-
25-
const val KEY_ENABLE_JETPACK_APP_PASSWORDS_EXPERIMENT = "wcandroid_enable_jetpack_app_passwords_experiment_2"
2624
}
2725

2826
private val minimumFetchIntervalInSeconds =
@@ -37,11 +35,7 @@ class FirebaseRemoteConfigRepository @Inject constructor(
3735
private val _fetchStatus = MutableStateFlow(RemoteConfigFetchStatus.Pending)
3836
override val fetchStatus: Flow<RemoteConfigFetchStatus> = _fetchStatus.asStateFlow()
3937

40-
private val defaultValues by lazy {
41-
mapOf(
42-
KEY_ENABLE_JETPACK_APP_PASSWORDS_EXPERIMENT to false.toString()
43-
)
44-
}
38+
private val defaultValues = emptyMap<String, String>()
4539

4640
init {
4741
remoteConfig.apply {
@@ -73,8 +67,4 @@ class FirebaseRemoteConfigRepository @Inject constructor(
7367
@VisibleForTesting
7468
fun observeStringRemoteValue(key: String) = changesTrigger
7569
.map { remoteConfig.getString(key) }
76-
77-
override fun isJetpackAppPasswordsExperimentEnabled(): Boolean {
78-
return remoteConfig.getBoolean(KEY_ENABLE_JETPACK_APP_PASSWORDS_EXPERIMENT)
79-
}
8070
}

0 commit comments

Comments
 (0)