Skip to content

Commit

Permalink
Merge branch 'trunk' into 11525-change-due-calculator-ui-part-3
Browse files Browse the repository at this point in the history
  • Loading branch information
backwardstruck committed May 24, 2024
2 parents 605b295 + 305c278 commit d6768bd
Show file tree
Hide file tree
Showing 44 changed files with 1,559 additions and 1,405 deletions.
1 change: 1 addition & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
18.7
-----
- [*] Products: Fixed a bug that caused the app to crash sometimes during screen rotation [https://github.com/woocommerce/woocommerce-android/pull/11484]
- [*] Dashboard: Fixed an issue that caused the date range picker to be invisible when using large fonts [https://github.com/woocommerce/woocommerce-android/pull/11552]

18.6
-----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"equalTo": "day"
},
"quantity": {
"matches": "[0-9]+"
"equalTo": "1"
},
"date": {
"matches": "(.*)"
Expand All @@ -30,36 +30,7 @@
"visitors"
],
"data": [
["{{fnow offset='-29 days' format='yyyy-MM-dd'}}", 440],
["{{fnow offset='-28 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-27 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-26 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-25 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-24 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-23 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-22 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-21 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-20 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-19 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-18 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-17 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-16 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-15 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-14 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-13 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-12 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-11 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-10 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-9 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-8 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-7 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-6 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-5 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-4 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-3 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-2 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-1 days' format='yyyy-MM-dd'}}", 0],
["{{fnow format='yyyy-MM-dd'}}", 0]
["{{fnow format='yyyy-MM-dd'}}", 440]
]
},
"headers": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,44 +1,70 @@
{
"request": {
"method": "GET",
"urlPath": "/rest/v1.1/sites/161477129/stats/visits/",
"queryParameters": {
"unit": {
"equalTo": "month"
},
"quantity": {
"matches": "[0-9]+"
},
"date": {
"matches": "(.*)"
},
"stat_fields": {
"matches": "visitors"
}
}
"request": {
"method": "GET",
"urlPath": "/rest/v1.1/sites/161477129/stats/visits/",
"queryParameters": {
"unit": {
"equalTo": "day"
},
"quantity": {
"matches": "(28|29|30|31)"
},
"date": {
"matches": "(.*)"
},
"stat_fields": {
"equalTo": "visitors"
},
"locale": {
"matches": "(.*)"
}
}
},
"response": {
"status": 200,
"jsonBody": {
"date": "{{fnow format='yyyy-MM-dd'}}",
"unit": "day",
"fields": [
"period",
"visitors"
],
"data": [
["{{fnow offset='-29 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-28 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-27 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-26 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-25 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-24 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-23 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-22 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-21 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-20 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-19 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-18 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-17 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-16 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-15 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-14 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-13 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-12 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-11 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-10 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-9 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-8 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-7 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-6 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-5 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-4 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-3 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-2 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-1 days' format='yyyy-MM-dd'}}", 0],
["{{fnow format='yyyy-MM-dd'}}", 440]
]
},
"response": {
"status": 200,
"jsonBody": {
"date": "{{#assign 'currentYear'}}{{fnow format='yyyy'}}{{/assign}}{{currentYear}}-10-01",
"unit": "month",
"fields": [
"period",
"visitors"
],
"data": [
["{{currentYear}}-12-01", 12000],
["{{currentYear}}-01-01", 0],
["{{currentYear}}-02-01", 0],
["{{currentYear}}-03-01", 0],
["{{currentYear}}-04-01", 0],
["{{currentYear}}-05-01", 0],
["{{currentYear}}-06-01", 0],
["{{currentYear}}-07-01", 0],
["{{currentYear}}-08-01", 0],
["{{currentYear}}-09-01", 0],
["{{currentYear}}-10-01", 0]
]
}
"headers": {
"Content-Type": "application/json",
"Connection": "keep-alive"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"urlPath": "/rest/v1.1/sites/161477129/stats/visits/",
"queryParameters": {
"unit": {
"equalTo": "week"
"equalTo": "day"
},
"quantity": {
"matches": "[0-9]+"
"equalTo": "7"
},
"date": {
"matches": "(.*)"
Expand All @@ -23,62 +23,18 @@
"date": "2020-01-30",
"unit": "week",
"fields": [
"period",
"period",
"visitors"
],
"data": [
[
"2019W11W04",
0
],
[
"2019W11W11",
0
],
[
"2019W11W18",
0
],
[
"2019W11W25",
0
],
[
"2019W12W02",
0
],
[
"2019W12W09",
0
],
[
"2019W12W16",
0
],
[
"2019W12W23",
0
],
[
"2019W12W30",
0
],
[
"2020W01W06",
0
],
[
"2020W01W13",
0
],
[
"2020W01W20",
0
],
[
"2020W01W27",
0
]
["{{fnow offset='-7 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-6 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-5 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-4 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-3 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-2 days' format='yyyy-MM-dd'}}", 0],
["{{fnow offset='-1 days' format='yyyy-MM-dd'}}", 0],
["{{fnow format='yyyy-MM-dd'}}", 440]
]
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,38 +1,44 @@
{
"request": {
"method": "GET",
"urlPath": "/rest/v1.1/sites/161477129/stats/visits/",
"queryParameters": {
"unit": {
"equalTo": "year"
},
"quantity": {
"matches": "[0-9]+"
},
"date": {
"matches": "(.*)"
},
"stat_fields": {
"matches": "visitors"
}
}
},
"response": {
"status": 200,
"jsonBody": {
"date": "{{fnow format='yyyy-MM-dd'}}",
"unit": "year",
"fields": [
"period",
"visitors"
],
"data": [
["{{fnow offset='-4 years' format='yyyy-MM-dd'}}", 500],
["{{fnow offset='-3 years' format='yyyy-MM-dd'}}", 900],
["{{fnow offset='-2 years' format='yyyy-MM-dd'}}", 1200],
["{{fnow offset='-1 years' format='yyyy-MM-dd'}}", 1350],
["{{fnow format='yyyy-MM-dd'}}", 1299]
]
}
"request": {
"method": "GET",
"urlPath": "/rest/v1.1/sites/161477129/stats/visits/",
"queryParameters": {
"unit": {
"equalTo": "month"
},
"quantity": {
"matches": "[0-9]+"
},
"date": {
"matches": "(.*)"
},
"stat_fields": {
"matches": "visitors"
}
}
},
"response": {
"status": 200,
"jsonBody": {
"date": "{{#assign 'currentYear'}}{{fnow format='yyyy'}}{{/assign}}{{currentYear}}-10-01",
"unit": "month",
"fields": [
"period",
"visitors"
],
"data": [
["{{currentYear}}-12-01", 12000],
["{{currentYear}}-01-01", 0],
["{{currentYear}}-02-01", 0],
["{{currentYear}}-03-01", 0],
["{{currentYear}}-04-01", 0],
["{{currentYear}}-05-01", 0],
["{{currentYear}}-06-01", 0],
["{{currentYear}}-07-01", 0],
["{{currentYear}}-08-01", 0],
["{{currentYear}}-09-01", 0],
["{{currentYear}}-10-01", 0]
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"jsonBody": {
"date": "{{fnow format='yyyy-MM-dd'}}",
"period": "month",
"views": 12000,
"visitors": 12000,
"views": 440,
"visitors": 440,
"likes": 0,
"reblogs": 0,
"comments": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class BlazeCampaignPaymentSummaryViewModel @Inject constructor(
).fold(
onSuccess = {
campaignCreationState.value = null
analyticsTrackerWrapper.track(stat = AnalyticsEvent.BLAZE_CREATION_PAYMENT_SUBMIT_CAMPAIGN_TAPPED)
analyticsTrackerWrapper.track(stat = AnalyticsEvent.BLAZE_CAMPAIGN_CREATION_SUCCESS)
dashboardRepository.updateWidgetVisibility(type = DashboardWidget.Type.ONBOARDING, isVisible = true)
triggerEvent(NavigateToStartingScreenWithSuccessBottomSheet)
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.defaultMinSize
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.wrapContentSize
import androidx.compose.material.ContentAlpha
import androidx.compose.material.DropdownMenu
import androidx.compose.material.DropdownMenuItem
Expand Down Expand Up @@ -56,12 +57,14 @@ fun DashboardDateRangeHeader(
style = MaterialTheme.typography.body2,
color = MaterialTheme.colors.onSurface
)
val isCustomRange = rangeSelection.selectionType == SelectionType.CUSTOM

val isCustomRange = rangeSelection.selectionType == SelectionType.CUSTOM
Row(
horizontalArrangement = Arrangement.spacedBy(dimensionResource(id = dimen.minor_100)),
verticalAlignment = Alignment.CenterVertically,
modifier = Modifier
.weight(1f)
.wrapContentSize(align = Alignment.CenterStart)
.then(if (isCustomRange) Modifier.clickable(onClick = onCustomRangeClick) else Modifier)
.padding(dimensionResource(id = dimen.minor_100))
) {
Expand All @@ -72,7 +75,8 @@ fun DashboardDateRangeHeader(
MaterialTheme.colors.primary
} else {
MaterialTheme.colors.onSurface.copy(alpha = ContentAlpha.medium)
}
},
modifier = Modifier.weight(1f, fill = false)
)
if (isCustomRange) {
Icon(
Expand All @@ -84,8 +88,6 @@ fun DashboardDateRangeHeader(
}
}

Spacer(modifier = Modifier.weight(1f))

Box {
var isMenuExpanded by remember { mutableStateOf(false) }
IconButton(
Expand Down
Loading

0 comments on commit d6768bd

Please sign in to comment.