-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'trunk' into 12575-woo-pos-fix-clipping-issues-on-produc…
…tcart-screens
- Loading branch information
Showing
91 changed files
with
2,716 additions
and
2,358 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash -u | ||
|
||
echo "--- 🧹 Linting" | ||
cp gradle.properties-example gradle.properties | ||
./gradlew :WooCommerce:lintJalapenoDebug | ||
app_lint_exit_code=$? | ||
|
||
./gradlew :WooCommerce-Wear:lintJalapenoDebug | ||
wear_lint_exit_code=$? | ||
|
||
lint_exit_code=0 | ||
if [ $app_lint_exit_code -ne 0 ] || [ $wear_lint_exit_code -ne 0 ]; then | ||
lint_exit_code=1 | ||
fi | ||
|
||
upload_sarif_to_github 'WooCommerce/build/reports/lint-results-jalapenoDebug.sarif' | ||
|
||
exit $lint_exit_code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
#!/bin/sh | ||
|
||
# This file is `source`'d before calling `buildkite-agent pipeline upload`, and can be used | ||
# to set up some variables that will be interpolated in the `.yml` pipeline before uploading it. | ||
# This file is `source`'d before calling `buildkite-agent pipeline upload`, and can be used | ||
# to set up some variables that will be interpolated in the `.yml` pipeline before uploading it. | ||
|
||
export CI_TOOLKIT="automattic/a8c-ci-toolkit#3.7.1" | ||
export TEST_COLLECTOR="test-collector#v1.10.1" | ||
|
||
export CI_TOOLKIT="automattic/a8c-ci-toolkit#3.5.1" | ||
export TEST_COLLECTOR="test-collector#v1.10.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 50 additions & 15 deletions
65
WooCommerce/src/main/kotlin/com/woocommerce/android/notifications/WooNotificationType.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,60 @@ | ||
package com.woocommerce.android.notifications | ||
|
||
import android.os.Parcelable | ||
import kotlinx.parcelize.IgnoredOnParcel | ||
import kotlinx.parcelize.Parcelize | ||
import org.wordpress.android.fluxc.model.notification.NotificationModel | ||
|
||
enum class WooNotificationType { | ||
NEW_ORDER, | ||
PRODUCT_REVIEW, | ||
LOCAL_REMINDER, | ||
BLAZE_APPROVED_NOTE, | ||
BLAZE_REJECTED_NOTE, | ||
BLAZE_CANCELLED_NOTE, | ||
BLAZE_PERFORMED_NOTE, | ||
sealed interface WooNotificationType : Parcelable { | ||
val trackingValue: String | ||
|
||
@Parcelize | ||
data object NewOrder : WooNotificationType { | ||
@IgnoredOnParcel override val trackingValue: String = "NEW_ORDER" | ||
} | ||
|
||
@Parcelize | ||
data object ProductReview : WooNotificationType { | ||
@IgnoredOnParcel override val trackingValue: String = "PRODUCT_REVIEW" | ||
} | ||
|
||
@Parcelize | ||
data object LocalReminder : WooNotificationType { | ||
@IgnoredOnParcel override val trackingValue: String = "LOCAL_REMINDER" | ||
} | ||
|
||
@Parcelize | ||
sealed interface BlazeStatusUpdate : WooNotificationType, Parcelable { | ||
@Parcelize | ||
data object BlazeApprovedNote : BlazeStatusUpdate { | ||
@IgnoredOnParcel override val trackingValue: String = "blaze_approved_note" | ||
} | ||
|
||
@Parcelize | ||
data object BlazeRejectedNote : BlazeStatusUpdate { | ||
@IgnoredOnParcel override val trackingValue: String = "blaze_rejected_note" | ||
} | ||
|
||
@Parcelize | ||
data object BlazeCancelledNote : BlazeStatusUpdate { | ||
@IgnoredOnParcel override val trackingValue: String = "blaze_cancelled_note" | ||
} | ||
|
||
@Parcelize | ||
data object BlazePerformedNote : BlazeStatusUpdate { | ||
@IgnoredOnParcel override val trackingValue: String = "blaze_performed_note" | ||
} | ||
} | ||
} | ||
|
||
fun NotificationModel.getWooType(): WooNotificationType { | ||
return when (this.type) { | ||
NotificationModel.Kind.STORE_ORDER -> WooNotificationType.NEW_ORDER | ||
NotificationModel.Kind.COMMENT -> WooNotificationType.PRODUCT_REVIEW | ||
NotificationModel.Kind.BLAZE_APPROVED_NOTE -> WooNotificationType.BLAZE_APPROVED_NOTE | ||
NotificationModel.Kind.BLAZE_REJECTED_NOTE -> WooNotificationType.BLAZE_REJECTED_NOTE | ||
NotificationModel.Kind.BLAZE_CANCELLED_NOTE -> WooNotificationType.BLAZE_CANCELLED_NOTE | ||
NotificationModel.Kind.BLAZE_PERFORMED_NOTE -> WooNotificationType.BLAZE_PERFORMED_NOTE | ||
else -> WooNotificationType.LOCAL_REMINDER | ||
NotificationModel.Kind.STORE_ORDER -> WooNotificationType.NewOrder | ||
NotificationModel.Kind.COMMENT -> WooNotificationType.ProductReview | ||
NotificationModel.Kind.BLAZE_APPROVED_NOTE -> WooNotificationType.BlazeStatusUpdate.BlazeApprovedNote | ||
NotificationModel.Kind.BLAZE_REJECTED_NOTE -> WooNotificationType.BlazeStatusUpdate.BlazeRejectedNote | ||
NotificationModel.Kind.BLAZE_CANCELLED_NOTE -> WooNotificationType.BlazeStatusUpdate.BlazeCancelledNote | ||
NotificationModel.Kind.BLAZE_PERFORMED_NOTE -> WooNotificationType.BlazeStatusUpdate.BlazePerformedNote | ||
else -> WooNotificationType.LocalReminder | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.