Skip to content

Commit 3f3ba1a

Browse files
authored
Merge branch 'trunk' into woomob-860-shipping-labels-allow-proceeding-if-address-is-not-verified
2 parents 9d25a6e + 44700a8 commit 3f3ba1a

File tree

15 files changed

+358
-150
lines changed

15 files changed

+358
-150
lines changed

.github/workflows/screenshots.yml

Lines changed: 38 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,13 @@ on:
55
types: [opened, synchronize, reopened, labeled, unlabeled]
66

77
env:
8-
S3_BUCKET: ${{ secrets.S3_BUCKET }}
9-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
10-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
118
CONFIGURE_ENCRYPTION_KEY: ${{ secrets.CONFIGURE_ENCRYPTION_KEY }}
129

1310
jobs:
1411
build:
1512
name: Build Application
1613
if: contains(github.event.pull_request.labels.*.name, 'generate screenshots')
17-
runs-on: macos-latest
14+
runs-on: macos-15
1815

1916
steps:
2017
- name: "Check out Project"
@@ -30,26 +27,21 @@ jobs:
3027
- name: Compile the App
3128
run: bundle exec fastlane build_screenshots
3229

33-
- name: Archive App
30+
- name: Archive Build Products
3431
uses: actions/upload-artifact@v4
3532
with:
36-
name: screenshot-app
37-
path: fastlane/DerivedData/Build/Products/Debug-iphonesimulator/WooCommerce.app
38-
39-
- name: Archive Runner
40-
uses: actions/upload-artifact@v4
41-
with:
42-
name: screenshot-runner
43-
path: fastlane/DerivedData/Build/Products/Debug-iphonesimulator/WooCommerceScreenshots-Runner.app
33+
name: screenshot-build-products
34+
path: fastlane/DerivedData/Build/Products/Debug-iphonesimulator/
35+
retention-days: 1
4436

4537
capture:
4638
name: Capture
4739
needs: build
48-
runs-on: macos-latest
40+
runs-on: macos-15
4941

5042
strategy:
5143
matrix:
52-
language: [ar, de-DE, en-US, es-ES, fr-FR, he, id, it, ja, ko, nl-NL, pt-BR, ru, sv, tr, zh-Hans, zh-Hant]
44+
language: [ar-SA, de-DE, en-US, es-ES, fr-FR, he, id, it, ja, ko, nl-NL, pt-BR, ru, sv, tr, zh-Hans, zh-Hant]
5345
mode: [dark, light]
5446
steps:
5547
- uses: actions/checkout@v4
@@ -61,17 +53,11 @@ jobs:
6153
- name: Install Fastlane Dependencies
6254
run: bundle exec fastlane run configure_apply
6355

64-
- name: Download Screenshot App
65-
uses: actions/download-artifact@v4
66-
with:
67-
name: screenshot-app
68-
path: fastlane/DerivedData/Build/Products/Debug-iphonesimulator/WooCommerce.app
69-
70-
- name: Download Screenshot Runner
56+
- name: Download Build Products
7157
uses: actions/download-artifact@v4
7258
with:
73-
name: screenshot-runner
74-
path: fastlane/DerivedData/Build/Products/Debug-iphonesimulator/WooCommerceScreenshots-Runner.app
59+
name: screenshot-build-products
60+
path: fastlane/DerivedData/Build/Products/Debug-iphonesimulator/
7561

7662
- name: Generate Screenshots
7763
run: |
@@ -85,14 +71,18 @@ jobs:
8571
path: fastlane/logs
8672

8773
- name: Archive Generated Screenshots
88-
run: |
89-
cd fastlane && mkdir $GITHUB_RUN_ID && mv screenshots $GITHUB_RUN_ID
90-
aws s3 cp $GITHUB_RUN_ID s3://$S3_BUCKET/$GITHUB_RUN_ID --recursive --exclude "*.html"
74+
uses: actions/upload-artifact@v4
75+
with:
76+
name: "screenshots-${{ matrix.language }}-${{ matrix.mode }}"
77+
path: fastlane/screenshots/
9178

9279
process:
9380
name: "Process Screenshots"
9481
needs: capture
95-
runs-on: macos-latest
82+
runs-on: macos-15
83+
84+
env:
85+
BUNDLE_WITH: screenshots
9686

9787
steps:
9888
- uses: actions/checkout@v4
@@ -101,55 +91,50 @@ jobs:
10191
run: |
10292
brew install imagemagick@7
10393
brew link imagemagick@7 --force
94+
brew install automattic/build-tools/drawText
10495
10596
- name: "Set up Ruby"
10697
uses: ruby/setup-ruby@v1
10798
with:
10899
bundler-cache: true
109100

110-
- name: Install Screenshot Gems
111-
run: bundle install --with screenshots
112-
113101
- name: Install Fastlane Dependencies
114102
run: bundle exec fastlane run configure_apply
115103

116104
- name: Download Generated Screenshots
117-
run: |
118-
cd fastlane
119-
aws s3 cp s3://$S3_BUCKET/$GITHUB_RUN_ID/screenshots screenshots/ --recursive --exclude "*.html"
105+
uses: actions/download-artifact@v4
106+
with:
107+
pattern: "screenshots-*"
108+
path: fastlane/screenshots/
109+
merge-multiple: true
120110

121-
- name: Generate and Upload Screenshot Summary
111+
- name: Generate Screenshot Summary
122112
run: |
123113
bundle exec fastlane create_screenshot_summary
124-
aws s3 cp fastlane/screenshots/screenshots.html s3://$S3_BUCKET/$GITHUB_RUN_ID/screenshots/screenshots.html
114+
115+
- name: Upload Screenshot Summary
116+
uses: actions/upload-artifact@v4
117+
with:
118+
name: screenshot-summary
119+
path: fastlane/screenshots/screenshots.html
125120

126121
- name: Archive Raw Screenshots
127122
uses: actions/upload-artifact@v4
128123
with:
129124
name: raw-screenshots
130125
path: fastlane/screenshots
131126

132-
- name: Install Promo Screenshot Fonts
127+
- name: Setup Git LFS
133128
run: |
134-
aws s3 cp s3://$S3_BUCKET/fonts.zip fonts.zip
135-
unzip fonts.zip
136-
137-
mkdir -p ~/Library/Fonts
138-
cp -v fonts/*.otf ~/Library/Fonts
139-
ls ~/Library/Fonts
140-
141-
mkdir -p /Library/Fonts
142-
cp -v fonts/*.otf /Library/Fonts
143-
ls /Library/Fonts
144-
145-
# Reset the font server in order to use these fonts
146-
atsutil databases -removeUser
147-
atsutil server -shutdown
148-
atsutil server -ping
129+
# Install Git LFS if not available
130+
if ! command -v git-lfs &> /dev/null; then
131+
echo "Installing Git LFS..."
132+
brew install git-lfs
133+
fi
134+
git lfs install && git lfs fetch && git lfs pull
149135
150136
- name: Generate Promo Screenshots
151137
run: |
152-
git lfs install && git lfs fetch && git lfs pull
153138
bundle exec fastlane create_promo_screenshots force:true
154139
155140
- name: Archive Promo Screenshots

RELEASE-NOTES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
- [*] Shipping Labels: Display base rate on selected shipping service cards [https://github.com/woocommerce/woocommerce-ios/pull/15916]
1212
- [*] Shipping Labels: Update mark order completed toggle on purchase form [https://github.com/woocommerce/woocommerce-ios/pull/15917]
1313
- [*] Shipping Labels: Allow confirming destination addresses when validation fails. [https://github.com/woocommerce/woocommerce-ios/pull/15928]
14+
- [*] Shipping Labels: Validate custom package dimensions [https://github.com/woocommerce/woocommerce-ios/pull/15925]
15+
- [*] Shipping Labels: Show UPS TOS modal in full length for better accessibility. [https://github.com/woocommerce/woocommerce-ios/pull/15926]
1416
- [*] Shipping Labels: Optimize data loading on purchase form [https://github.com/woocommerce/woocommerce-ios/pull/15919]
1517
- [internal] Optimized assets for app size reduction [https://github.com/woocommerce/woocommerce-ios/pull/15881]
1618

WooCommerce/Classes/POS/Presentation/Barcode Scanner Setup/PointOfSaleBarcodeScannerSetupFlow.swift

Lines changed: 47 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,19 @@ import WooFoundation
77
class PointOfSaleBarcodeScannerSetupFlow {
88
private let scannerType: PointOfSaleBarcodeScannerType
99
private let onBackToSelection: () -> Void
10+
fileprivate let onDismiss: () -> Void
1011
private var flowSteps: [PointOfSaleBarcodeScannerStepID: PointOfSaleBarcodeScannerSetupStep] = [:]
1112
private var currentStepKey: PointOfSaleBarcodeScannerStepID = .setupBarcodeHID
1213
private let analytics: Analytics
1314

1415
init(scannerType: PointOfSaleBarcodeScannerType,
1516
analytics: Analytics = ServiceLocator.analytics,
16-
onBackToSelection: @escaping () -> Void) {
17+
onBackToSelection: @escaping () -> Void,
18+
onDismiss: @escaping () -> Void) {
1719
self.scannerType = scannerType
1820
self.analytics = analytics
1921
self.onBackToSelection = onBackToSelection
22+
self.onDismiss = onDismiss
2023
self.flowSteps = createFlowSteps(for: scannerType)
2124
self.currentStepKey = initialStep(for: scannerType)
2225
}
@@ -132,7 +135,7 @@ class PointOfSaleBarcodeScannerSetupFlow {
132135
.testScanTimedOut: testScanTimeOutStep(barcode: .ean13),
133136
.testScanFailed: testScanFailedStep(),
134137
.complete: setupCompleteStep(),
135-
.setupInformation: setupInformationStep()
138+
.setupProducts: setupProductsStep()
136139
]
137140
case .tera12002D:
138141
return [
@@ -172,19 +175,19 @@ class PointOfSaleBarcodeScannerSetupFlow {
172175
.testScanTimedOut: testScanTimeOutStep(barcode: .ean13),
173176
.testScanFailed: testScanFailedStep(),
174177
.complete: setupCompleteStep(),
175-
.setupInformation: setupInformationStep()
178+
.setupProducts: setupProductsStep()
176179
]
177180
case .other:
178181
return [
179182
.setupInformation: PointOfSaleBarcodeScannerSetupStep(
180183
content: { BarcodeScannerInformation() },
181-
transitions: [.next: .setupProducts]
184+
transitions: [.next: .test]
182185
),
183-
.setupProducts: PointOfSaleBarcodeScannerSetupStep(
184-
content: { ProductBarcodeSetupInformation() },
185-
buttonCustomization: PointOfSaleBarcodeScannerBackOnlyButtonCustomization(),
186-
transitions: [.back: .setupInformation]
187-
)
186+
.test: testScanStep(barcode: .ean13, transitions: [.back: .setupInformation]),
187+
.testScanTimedOut: testScanTimeOutStep(barcode: .ean13, transitions: [.back: .setupInformation]),
188+
.testScanFailed: testScanFailedStep(),
189+
.complete: setupCompleteStep(),
190+
.setupProducts: setupProductsStep()
188191
]
189192
}
190193
}
@@ -212,7 +215,11 @@ class PointOfSaleBarcodeScannerSetupFlow {
212215

213216
// MARK: - Steps
214217

215-
private func testScanStep(barcode: PointOfSaleBarcodeScannerTestBarcode, timerCompleted: Bool = false) -> PointOfSaleBarcodeScannerSetupStep {
218+
private func testScanStep(
219+
barcode: PointOfSaleBarcodeScannerTestBarcode,
220+
transitions: [PointOfSaleBarcodeScannerTransitionType: PointOfSaleBarcodeScannerStepID] = [.back: .pairing],
221+
timerCompleted: Bool = false
222+
) -> PointOfSaleBarcodeScannerSetupStep {
216223
PointOfSaleBarcodeScannerSetupStep(
217224
content: {
218225
PointOfSaleBarcodeScannerTestBarcodeView(
@@ -234,14 +241,15 @@ class PointOfSaleBarcodeScannerSetupFlow {
234241
)
235242
},
236243
buttonCustomization: PointOfSaleBarcodeScannerBackOnlyButtonCustomization(),
237-
transitions: [
238-
.back: .pairing
239-
]
244+
transitions: transitions
240245
)
241246
}
242247

243-
private func testScanTimeOutStep(barcode: PointOfSaleBarcodeScannerTestBarcode) -> PointOfSaleBarcodeScannerSetupStep {
244-
testScanStep(barcode: barcode, timerCompleted: true)
248+
private func testScanTimeOutStep(
249+
barcode: PointOfSaleBarcodeScannerTestBarcode,
250+
transitions: [PointOfSaleBarcodeScannerTransitionType: PointOfSaleBarcodeScannerStepID] = [.back: .pairing]
251+
) -> PointOfSaleBarcodeScannerSetupStep {
252+
testScanStep(barcode: barcode, transitions: transitions, timerCompleted: true)
245253
}
246254

247255
private func testScanFailedStep() -> PointOfSaleBarcodeScannerSetupStep {
@@ -264,14 +272,17 @@ class PointOfSaleBarcodeScannerSetupFlow {
264272
},
265273
buttonCustomization: PointOfSaleBarcodeScannerOptionalScannerInformationButtonCustomization(),
266274
transitions: [
267-
.next: .setupInformation,
275+
.next: .setupProducts
268276
])
269277
}
270278

271-
private func setupInformationStep() -> PointOfSaleBarcodeScannerSetupStep {
279+
private func setupProductsStep() -> PointOfSaleBarcodeScannerSetupStep {
272280
PointOfSaleBarcodeScannerSetupStep(
273281
content: { ProductBarcodeSetupInformation() },
274-
buttonCustomization: PointOfSaleBarcodeScannerNoButtonsButtonCustomization()
282+
buttonCustomization: PointOfSaleBarcodeScannerProductBarcodeSetupInformationButtonCustomization(),
283+
transitions: [
284+
.back: .complete
285+
]
275286
)
276287
}
277288
}
@@ -344,9 +355,18 @@ struct PointOfSaleBarcodeScannerOptionalScannerInformationButtonCustomization: P
344355
}
345356

346357
@available(iOS 17.0, *)
347-
struct PointOfSaleBarcodeScannerNoButtonsButtonCustomization: PointOfSaleBarcodeScannerButtonCustomization {
358+
struct PointOfSaleBarcodeScannerProductBarcodeSetupInformationButtonCustomization: PointOfSaleBarcodeScannerButtonCustomization {
348359
func customizeButtons(for flow: PointOfSaleBarcodeScannerSetupFlow) -> PointOfSaleFlowButtonConfiguration {
349-
return PointOfSaleFlowButtonConfiguration.noButtons()
360+
return PointOfSaleFlowButtonConfiguration(
361+
primaryButton: PointOfSaleFlowButtonConfiguration.ButtonConfig(
362+
title: PointOfSaleBarcodeScannerSetupFlow.Localization.doneButtonTitle,
363+
action: { flow.onDismiss() }
364+
),
365+
secondaryButton: PointOfSaleFlowButtonConfiguration.ButtonConfig(
366+
title: PointOfSaleBarcodeScannerSetupFlow.Localization.backButtonTitle,
367+
action: { flow.transition(to: .back) }
368+
)
369+
)
350370
}
351371
}
352372

@@ -397,6 +417,13 @@ private extension PointOfSaleBarcodeScannerSetupFlow {
397417
value: "Back",
398418
comment: "Title for the back button in barcode scanner setup navigation"
399419
)
420+
421+
static let doneButtonTitle = NSLocalizedString(
422+
"pos.barcodeScannerSetup.done.button.title",
423+
value: "Done",
424+
comment: "Title for the done button in barcode scanner setup navigation"
425+
)
426+
400427
//TODO: WOOMOB-792
401428
static let scannerSetUpBarcodeStepTitleFormat = "Scanner Setup"
402429
static let setUpBarcodeHIDStepInstruction = "Scan the Bluetooth HID symbol."

WooCommerce/Classes/POS/Presentation/Barcode Scanner Setup/PointOfSaleBarcodeScannerSetupFlowManager.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ class PointOfSaleBarcodeScannerSetupFlowManager {
3030
analytics: analytics,
3131
onBackToSelection: { [weak self] in
3232
self?.goBackToSelection()
33+
},
34+
onDismiss: { [weak self] in
35+
self?.isPresented = false
3336
}
3437
)
3538
currentState = .setupFlow(scannerType)

WooCommerce/Classes/POS/Presentation/CardReaderConnection/UI States/Reader Messages/PointOfSaleCardPresentPaymentActivityIndicatingMessageView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ struct PointOfSaleCardPresentPaymentActivityIndicatingMessageView: View {
1616
.renderedIf(!dynamicTypeSize.isAccessibilitySize)
1717
VStack(alignment: .center, spacing: PointOfSaleCardPresentPaymentLayout.textSpacing) {
1818
Text(title)
19-
.foregroundStyle(Color.posOnSurface)
19+
.foregroundStyle(Color.posOnSurfaceVariantHighest)
2020
.font(.posBodyLargeRegular())
2121
.matchedGeometryEffect(id: animation.titleTransitionId, in: animation.namespace, properties: .position)
2222

WooCommerce/Classes/POS/Presentation/CardReaderConnection/UI States/Reader Messages/PointOfSaleCardPresentPaymentTapSwipeInsertCardMessageView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ struct PointOfSaleCardPresentPaymentTapSwipeInsertCardMessageView: View {
1616
.renderedIf(!dynamicTypeSize.isAccessibilitySize)
1717
VStack(alignment: .center, spacing: PointOfSaleCardPresentPaymentLayout.textSpacing) {
1818
Text(viewModel.title)
19-
.foregroundStyle(Color.posOnSurface)
19+
.foregroundStyle(Color.posOnSurfaceVariantHighest)
2020
.font(.posBodyLargeRegular())
2121
.matchedGeometryEffect(id: animation.titleTransitionId, in: animation.namespace, properties: .position)
2222

0 commit comments

Comments
 (0)