Skip to content

Commit 90cf276

Browse files
committed
Merge branch 'trunk' into woomob-1256-tech-debt-remove-ff-set-to-true-with-the-dead-code
# Conflicts: # WooCommerce/src/main/kotlin/com/woocommerce/android/util/FeatureFlag.kt
2 parents 3ac74dc + f8e2fd7 commit 90cf276

File tree

139 files changed

+17070
-1460
lines changed

Some content is hidden

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

139 files changed

+17070
-1460
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
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Auto-merge Dependabot PATCH updates
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened]
6+
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
11+
jobs:
12+
auto-merge:
13+
runs-on: ubuntu-latest
14+
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'woocommerce/woocommerce-android'
15+
env:
16+
PR_URL: ${{ github.event.pull_request.html_url }}
17+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
steps:
19+
- uses: actions/checkout@v5
20+
21+
- name: Fetch Dependabot metadata
22+
id: metadata
23+
uses: dependabot/fetch-metadata@v2
24+
with:
25+
github-token: "${{ secrets.GITHUB_TOKEN }}"
26+
27+
- name: Assign closest open milestone to PR
28+
if: steps.metadata.outputs.update-type == 'version-update:semver-patch'
29+
run: |
30+
set -e
31+
title=$(gh api repos/$GITHUB_REPOSITORY/milestones \
32+
--jq '[.[]
33+
| select(.state=="open" and .due_on!=null and (.due_on | fromdateiso8601) >= now)
34+
]
35+
| sort_by(.due_on)
36+
| .[0].title')
37+
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"
41+
else
42+
echo "No future open milestones found."
43+
fi
44+
45+
- name: Approve the PR
46+
if: steps.metadata.outputs.update-type == 'version-update:semver-patch'
47+
run: |
48+
set -e
49+
gh pr review --approve "$PR_URL"
50+
51+
- name: Enable auto-merge for Dependabot PRs
52+
if: steps.metadata.outputs.update-type == 'version-update:semver-patch'
53+
run: |
54+
set -e
55+
gh pr merge --auto --merge "$PR_URL"

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: 6 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]
@@ -12,7 +16,9 @@
1216
- [WEAR] Updated UserAgent of API requests to use `http.agent` System Property to fix performance issues related to WebView usage on app launch [https://github.com/woocommerce/woocommerce-android/pull/14431]
1317
- [***] POS: A new settings to customize the POS [https://github.com/woocommerce/woocommerce-android/pull/14527]
1418
- [*] [Login] Improved the detection of WooCommerce API version during login flow [https://github.com/woocommerce/woocommerce-android/pull/14524]
19+
- [*] Add more filter options to orders filters sales channel [https://github.com/woocommerce/woocommerce-android/pull/14546]
1520
- [*] Automatically populate the weight field in the create shipment flow [https://github.com/woocommerce/woocommerce-android/pull/14525]
21+
- [*] [Shipping Labels] Fixed displaying incorrect hazardous material option for purchased labels [https://github.com/woocommerce/woocommerce-android/pull/14571]
1622

1723
23.1
1824
-----
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)