Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/issue/21449-a8c-feedback-form' i…
Browse files Browse the repository at this point in the history
…nto issue/21449-a8c-feedback-form
  • Loading branch information
nbradbury committed Nov 14, 2024
2 parents fe3c13c + eeeb0fb commit 15031a1
Show file tree
Hide file tree
Showing 27 changed files with 207 additions and 106 deletions.
21 changes: 16 additions & 5 deletions .buildkite/beta-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ steps:
#################
- label: "Gradle Wrapper Validation"
command: |
.buildkite/commands/checkout-release-branch.sh "$RELEASE_VERSION"
validate_gradle_wrapper
plugins: [$CI_TOOLKIT]

Expand All @@ -27,14 +28,18 @@ steps:

- label: "🕵️ Lint WordPress"
key: wplint
command: ".buildkite/commands/lint.sh wordpress"
command: |
.buildkite/commands/checkout-release-branch.sh "$RELEASE_VERSION"
.buildkite/commands/lint.sh wordpress
plugins: [$CI_TOOLKIT]
artifact_paths:
- "**/build/reports/lint-results*.*"

- label: "🕵️ Lint Jetpack"
key: jplint
command: ".buildkite/commands/lint.sh jetpack"
command: |
.buildkite/commands/checkout-release-branch.sh "$RELEASE_VERSION"
.buildkite/commands/lint.sh jetpack
plugins: [$CI_TOOLKIT]
artifact_paths:
- "**/build/reports/lint-results*.*"
Expand All @@ -47,7 +52,9 @@ steps:

- label: ":wordpress: :android: Beta Build"
key: wpbuild
command: ".buildkite/commands/beta-build.sh wordpress"
command: |
.buildkite/commands/checkout-release-branch.sh "$RELEASE_VERSION"
.buildkite/commands/beta-build.sh wordpress
depends_on: wplint
plugins: [$CI_TOOLKIT]
notify:
Expand All @@ -59,7 +66,9 @@ steps:

- label: ":jetpack: :android: Beta Build"
key: jpbuild
command: ".buildkite/commands/beta-build.sh jetpack"
command: |
.buildkite/commands/checkout-release-branch.sh "$RELEASE_VERSION"
.buildkite/commands/beta-build.sh jetpack
depends_on: jplint
plugins: [$CI_TOOLKIT]
notify:
Expand All @@ -76,5 +85,7 @@ steps:
depends_on:
- wpbuild
- jpbuild
command: ".buildkite/commands/create-github-release.sh"
command: |
.buildkite/commands/checkout-release-branch.sh "$RELEASE_VERSION"
.buildkite/commands/create-github-release.sh
plugins: [$CI_TOOLKIT]
2 changes: 2 additions & 0 deletions .buildkite/commands/checkout-editorial-branch.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash -eu

echo '--- :git: Checkout Editorial Branch'

# EDITORIAL_BRANCH is passed as an environment variable from fastlane to Buildkite
#
if [[ -z "${EDITORIAL_BRANCH}" ]]; then
Expand Down
8 changes: 3 additions & 5 deletions .buildkite/commands/checkout-release-branch.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
#!/bin/bash -eu

# RELEASE_VERSION is passed as an environment variable passed to Buildkite by ReleasesV2.
if [[ -z "${RELEASE_VERSION}" ]]; then
echo "RELEASE_VERSION is not set."
exit 1
fi
echo "--- :git: Checkout Release Branch"

RELEASE_VERSION="${1?Please provide a release version as an argument.}"

# Buildkite, by default, checks out a specific commit. For many release actions, we need to be
# on a release branch instead.
Expand Down
3 changes: 1 addition & 2 deletions .buildkite/complete-code-freeze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ steps:
echo '--- :robot_face: Use bot for git operations'
source use-bot-for-git
echo '--- :git: Checkout Release Branch'
.buildkite/commands/checkout-release-branch.sh
.buildkite/commands/checkout-release-branch.sh "$RELEASE_VERSION"
echo '--- :ruby: Setup Ruby Tools'
install_gems
Expand Down
3 changes: 1 addition & 2 deletions .buildkite/finalize-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ steps:
echo '--- :robot_face: Use bot for git operations'
source use-bot-for-git
echo '--- :git: Checkout Release Branch'
.buildkite/commands/checkout-release-branch.sh
.buildkite/commands/checkout-release-branch.sh "$RELEASE_VERSION"
echo '--- :ruby: Setup Ruby Tools'
install_gems
Expand Down
3 changes: 1 addition & 2 deletions .buildkite/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ steps:
echo '--- :robot_face: Use bot for git operations'
source use-bot-for-git
echo '--- :git: Checkout Release Branch'
.buildkite/commands/checkout-release-branch.sh
.buildkite/commands/checkout-release-branch.sh "$RELEASE_VERSION"
echo '--- :ruby: Setup Ruby tools'
install_gems
Expand Down
21 changes: 16 additions & 5 deletions .buildkite/release-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ steps:
#################
- label: "Gradle Wrapper Validation"
command: |
.buildkite/commands/checkout-release-branch.sh "$RELEASE_VERSION"
validate_gradle_wrapper
priority: 1
plugins: [$CI_TOOLKIT]
Expand All @@ -28,15 +29,19 @@ steps:

- label: "🕵️ Lint WordPress"
key: wplint
command: ".buildkite/commands/lint.sh wordpress"
command: |
.buildkite/commands/checkout-release-branch.sh "$RELEASE_VERSION"
.buildkite/commands/lint.sh wordpress
priority: 1
plugins: [$CI_TOOLKIT]
artifact_paths:
- "**/build/reports/lint-results*.*"

- label: "🕵️ Lint Jetpack"
key: jplint
command: ".buildkite/commands/lint.sh jetpack"
command: |
.buildkite/commands/checkout-release-branch.sh "$RELEASE_VERSION"
.buildkite/commands/lint.sh jetpack
priority: 1
plugins: [$CI_TOOLKIT]
artifact_paths:
Expand All @@ -50,7 +55,9 @@ steps:

- label: ":wordpress: :android: Release Build"
key: wpbuild
command: ".buildkite/commands/release-build.sh wordpress"
command: |
.buildkite/commands/checkout-release-branch.sh "$RELEASE_VERSION"
.buildkite/commands/release-build.sh wordpress
priority: 1
depends_on: wplint
plugins: [$CI_TOOLKIT]
Expand All @@ -63,7 +70,9 @@ steps:

- label: ":jetpack: :android: Release Build"
key: jpbuild
command: ".buildkite/commands/release-build.sh jetpack"
command: |
.buildkite/commands/checkout-release-branch.sh "$RELEASE_VERSION"
.buildkite/commands/release-build.sh jetpack
priority: 1
depends_on: jplint
plugins: [$CI_TOOLKIT]
Expand All @@ -81,6 +90,8 @@ steps:
depends_on:
- wpbuild
- jpbuild
command: ".buildkite/commands/create-github-release.sh"
command: |
.buildkite/commands/checkout-release-branch.sh "$RELEASE_VERSION"
.buildkite/commands/create-github-release.sh
priority: 1
plugins: [$CI_TOOLKIT]
1 change: 0 additions & 1 deletion .buildkite/update-release-notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ steps:
echo '--- :robot_face: Use bot for git operations'
source use-bot-for-git
echo '--- :git: Checkout Editorial Branch'
.buildkite/commands/checkout-editorial-branch.sh
echo '--- :ruby: Setup Ruby Tools'
Expand Down
12 changes: 6 additions & 6 deletions WordPress/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,10 @@ sentry {
logcat.enabled = false
}
autoInstallation.enabled = false
includeSourceContext = true
autoUploadSourceContext = true
includeDependenciesReport = false

includeSourceContext = gradle.ext.isCi
includeProguardMapping = gradle.ext.isCi
/* Sentry won't send source context or add performance instrumentations for debug builds
so we can save build times. Sending events will still work in debug builds
(if enabled in WPCrashLoggingDataProvider).
Expand Down Expand Up @@ -127,7 +128,6 @@ android {
buildConfigField "boolean", "UNIFIED_COMMENTS_DETAILS", "false"
buildConfigField "boolean", "COMMENTS_SNIPPET", "false"
buildConfigField "boolean", "READER_COMMENTS_MODERATION", "false"
buildConfigField "boolean", "SITE_INTENT_QUESTION", "true"
buildConfigField "boolean", "SITE_NAME", "false"
buildConfigField "boolean", "LAND_ON_THE_EDITOR", "false"
buildConfigField "boolean", "QRCODE_AUTH_FLOW", "false"
Expand Down Expand Up @@ -197,7 +197,7 @@ android {
targetCompatibility JvmTarget.fromTarget(libs.versions.java.get()).target
}

flavorDimensions "app", "buildType"
flavorDimensions = ['app', 'buildType']

productFlavors {
wordpress {
Expand Down Expand Up @@ -254,14 +254,14 @@ android {
// Used for local development - preferred variant for developers.
// AppName: WordPress Beta/Jetpack Beta
wasabi {
isDefault true
applicationIdSuffix ".beta"
dimension "buildType"
}

// Used for CI builds on PRs (aka "Prototype Builds"). Can be used locally when a developer needs to install multiple versions of the app on the same device.
// AppName: WordPress Pre-Alpha/Jetpack Pre-Alpha
jalapeno {
isDefault true
applicationIdSuffix ".prealpha"
dimension "buildType"
}
Expand Down Expand Up @@ -301,7 +301,7 @@ android {
checkGeneratedSources = true
lintConfig file("${project.rootDir}/config/lint/lint.xml")
baseline file("${project.rootDir}/config/lint/baseline.xml")
sarifReport = System.getenv('CI') ? true : false
sarifReport = gradle.ext.isCi
}

packagingOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import androidx.activity.viewModels
import androidx.appcompat.app.AppCompatActivity
import androidx.compose.foundation.Image
import androidx.compose.foundation.border
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
Expand Down Expand Up @@ -45,6 +46,7 @@ import androidx.compose.ui.graphics.ColorFilter
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
Expand Down Expand Up @@ -247,15 +249,27 @@ fun DashboardCardStateRow(
onCardToggled: (cardType: CardType, enabled: Boolean) -> Unit,
modifier: Modifier = Modifier
) {
Column(modifier = modifier.fillMaxWidth()) {
val title = stringResource(id = cardState.title)
val label = stringResource(id = R.string.personalization_screen_card_accessibility_label, title)

Column(
modifier = modifier
.fillMaxWidth()
.clickable(onClickLabel = label) {
onCardToggled(cardState.cardType, !cardState.enabled)
}
.semantics(
mergeDescendants = true,
) { },
) {
Row(
modifier = Modifier
.fillMaxWidth()
.padding(
start = 16.dp,
end = 16.dp
),
verticalAlignment = Alignment.CenterVertically
verticalAlignment = Alignment.CenterVertically,
) {
Column(
modifier = Modifier
Expand All @@ -279,7 +293,10 @@ fun DashboardCardStateRow(
onCardToggled(cardState.cardType, it)
},
modifier = Modifier
.weight(.1f),
.clickable(onClickLabel = label) {
onCardToggled(cardState.cardType, !cardState.enabled)
}
.weight(.1f)
)
}
HorizontalDivider(
Expand Down Expand Up @@ -318,7 +335,7 @@ fun ShortcutStateRow(
) {
Image(
painter = painterResource(id = state.icon),
contentDescription = null, // Add appropriate content description
contentDescription = uiStringText(state.label),
contentScale = ContentScale.Fit,
modifier = Modifier
.size(24.dp)
Expand Down Expand Up @@ -347,7 +364,8 @@ fun ShortcutStateRow(
painter = painterResource(id = actionIcon),
tint = actionIconTint,
contentDescription = stringResource(
R.string.personalization_screen_shortcuts_add_or_remove_shortcut_button
R.string.personalization_screen_shortcuts_accessibility_label,
uiStringText(state.label)
),
)
}
Expand Down
Loading

0 comments on commit 15031a1

Please sign in to comment.