Skip to content

Commit 47340ff

Browse files
committed
General: Refresh the store screenshots and swap two of the six
The committed PNGs predated ~85 UI commits: the charging card, the enforcement tier line, the adapter capability note and the setup guide had all moved on. Re-rendered all six from the current fixtures. Two shots also changed subject. The Samsung multi-mode shot had become indistinguishable from the dashboard shot — same hero, chart and full-charge card, differing only in the device line, with the multi-mode chips it existed to show sitting below the fold. The theme-settings shot was three rows on an otherwise empty screen. They are replaced by the charge-conditions rule list and the battery hub, neither of which appeared anywhere before. The hub shot reuses HubFixtures' tile-grid content rather than a second copy, so the store shot cannot drift from the engineering regression shot that renders the same composable.
1 parent 12ca552 commit 47340ff

12 files changed

Lines changed: 75 additions & 64 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ the extras above and is what funds continued development.
8181

8282
## Screenshots
8383

84-
<img src="https://github.com/d4rken-org/amply/raw/main/fastlane/metadata/android/en-US/images/phoneScreenshots/1_dashboard_light.png" width="100"><img src="https://github.com/d4rken-org/amply/raw/main/fastlane/metadata/android/en-US/images/phoneScreenshots/2_full_charge_dark.png" width="100"><img src="https://github.com/d4rken-org/amply/raw/main/fastlane/metadata/android/en-US/images/phoneScreenshots/3_samsung_multimode.png" width="100"><img src="https://github.com/d4rken-org/amply/raw/main/fastlane/metadata/android/en-US/images/phoneScreenshots/4_setup_guide.png" width="100"><img src="https://github.com/d4rken-org/amply/raw/main/fastlane/metadata/android/en-US/images/phoneScreenshots/5_settings.png" width="100"><img src="https://github.com/d4rken-org/amply/raw/main/fastlane/metadata/android/en-US/images/phoneScreenshots/6_reconnect_gesture.png" width="100">
84+
<img src="https://github.com/d4rken-org/amply/raw/main/fastlane/metadata/android/en-US/images/phoneScreenshots/1_dashboard_light.png" width="100"><img src="https://github.com/d4rken-org/amply/raw/main/fastlane/metadata/android/en-US/images/phoneScreenshots/2_full_charge_dark.png" width="100"><img src="https://github.com/d4rken-org/amply/raw/main/fastlane/metadata/android/en-US/images/phoneScreenshots/3_charge_conditions.png" width="100"><img src="https://github.com/d4rken-org/amply/raw/main/fastlane/metadata/android/en-US/images/phoneScreenshots/4_setup_guide.png" width="100"><img src="https://github.com/d4rken-org/amply/raw/main/fastlane/metadata/android/en-US/images/phoneScreenshots/5_battery_hub.png" width="100"><img src="https://github.com/d4rken-org/amply/raw/main/fastlane/metadata/android/en-US/images/phoneScreenshots/6_reconnect_gesture.png" width="100">
8585

8686
## Setup & access
8787

app/src/debug/java/eu/darken/amply/screenshots/ScreenshotContent.kt

Lines changed: 67 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,10 @@ import eu.darken.amply.charging.core.ChargeObservation
1212
import eu.darken.amply.charging.core.ChargePolicy
1313
import eu.darken.amply.charging.core.ChargingState
1414
import eu.darken.amply.charging.core.DeviceInfo
15-
import eu.darken.amply.charging.core.SettingProbe
1615
import eu.darken.amply.charging.core.access.AccessSnapshot
1716
import eu.darken.amply.charging.core.access.BackendStatus
1817
import eu.darken.amply.common.ca.toCaString
1918
import eu.darken.amply.common.compose.PreviewWrapper
20-
import eu.darken.amply.common.theming.ThemeState
2119
import eu.darken.amply.battery.core.BatteryReadout
2220
import eu.darken.amply.fullcharge.core.ChargeSessionRecord
2321
import eu.darken.amply.main.ui.dashboard.DashboardScreen
@@ -26,7 +24,13 @@ import eu.darken.amply.main.ui.dashboard.StatsDashboardState
2624
import eu.darken.amply.stats.core.ChargeCurvePoint
2725
import eu.darken.amply.stats.core.StatsLiveSession
2826
import eu.darken.amply.main.ui.settings.ChargingSettingsScreen
29-
import eu.darken.amply.main.ui.settings.GeneralSettingsScreen
27+
import eu.darken.amply.rules.core.ChargeRule
28+
import eu.darken.amply.rules.core.PlugKind
29+
import eu.darken.amply.rules.core.RuleCondition
30+
import eu.darken.amply.rules.core.policy
31+
import eu.darken.amply.rules.ui.ChargeRuleRow
32+
import eu.darken.amply.rules.ui.ChargeRulesScreen
33+
import eu.darken.amply.rules.ui.ChargeRulesUiState
3034

3135
// Device spec shared by every Play Store screenshot. 1080x1920 (9:16) is Play's recommended phone
3236
// size and stays within its "longest side may not exceed 2x the shorter side" rule — 1080x2400
@@ -44,20 +48,67 @@ internal fun DashboardReadyContent() = DashboardShot(readyState())
4448
@Composable
4549
internal fun DashboardActiveContent() = DashboardShot(sessionState())
4650

47-
@Composable
48-
internal fun SamsungMultiModeContent() = DashboardShot(samsungState())
49-
5051
@Composable
5152
internal fun SetupGuideContent() = DashboardShot(setupNeededState())
5253

54+
// Three healthy rules covering both condition kinds, with the topmost one currently matching — the
55+
// list IS the priority editor, so the shot has to show more than one row to mean anything.
5356
@Composable
54-
internal fun SettingsContent() = PreviewWrapper {
55-
GeneralSettingsScreen(
56-
state = ThemeState(),
57+
internal fun ChargeConditionsContent() = PreviewWrapper {
58+
ChargeRulesScreen(
59+
state = ChargeRulesUiState(
60+
rows = listOf(
61+
ruleRow(
62+
id = "car",
63+
label = "Car",
64+
condition = RuleCondition.BluetoothDevice("AA:BB:CC:DD:EE:FF", "Car audio"),
65+
policy = ChargePolicy.Unrestricted,
66+
active = true,
67+
canMoveUp = false,
68+
),
69+
ruleRow(
70+
id = "dock",
71+
label = "Desk dock",
72+
condition = RuleCondition.ChargerType(setOf(PlugKind.DOCK, PlugKind.WIRELESS)),
73+
policy = ChargePolicy.FixedLimit(80),
74+
),
75+
ruleRow(
76+
id = "bedside",
77+
label = "Overnight",
78+
condition = RuleCondition.BluetoothDevice("11:22:33:44:55:66", "Bedside speaker"),
79+
policy = ChargePolicy.Adaptive,
80+
canMoveDown = false,
81+
),
82+
),
83+
),
5784
onBack = {},
58-
onModeChange = {},
59-
onStyleChange = {},
60-
onColorChange = {},
85+
onAdd = {},
86+
onEdit = {},
87+
onDelete = {},
88+
onEnabledChange = { _, _ -> },
89+
onMove = { _, _ -> },
90+
onFixBluetoothPermission = {},
91+
)
92+
}
93+
94+
private fun ruleRow(
95+
id: String,
96+
label: String,
97+
condition: RuleCondition,
98+
policy: ChargePolicy,
99+
active: Boolean = false,
100+
canMoveUp: Boolean = true,
101+
canMoveDown: Boolean = true,
102+
): ChargeRuleRow {
103+
val rule = ChargeRule(id = id, label = label, condition = condition, policyId = policy.stableId)
104+
return ChargeRuleRow(
105+
rule = rule,
106+
policy = rule.policy,
107+
active = active,
108+
unsupportedCondition = false,
109+
unsupportedPolicy = false,
110+
canMoveUp = canMoveUp,
111+
canMoveDown = canMoveDown,
61112
)
62113
}
63114

@@ -245,48 +296,6 @@ private fun sessionState() = DashboardUiState(
245296
),
246297
)
247298

248-
// Samsung One UI 8 multi-mode: four fixed limits plus pause-at-full, shown as chips.
249-
private fun samsungState() = DashboardUiState(
250-
onboardingComplete = true,
251-
batteryReadout = holdingAtLimit(),
252-
stats = liveStats(),
253-
charging = ChargingState(
254-
device = DeviceInfo(
255-
"samsung",
256-
"SM-X210",
257-
36,
258-
"preview",
259-
oneUiVersion = 80000,
260-
protectBatteryProbe = SettingProbe.PRESENT,
261-
),
262-
adapterName = "Samsung battery protection".toCaString(),
263-
adapterId = "samsung-oneui8-v1",
264-
supportedPolicies = listOf(
265-
ChargePolicy.FixedLimit(80),
266-
ChargePolicy.FixedLimit(85),
267-
ChargePolicy.FixedLimit(90),
268-
ChargePolicy.FixedLimit(95),
269-
ChargePolicy.PauseAtFull,
270-
ChargePolicy.Unrestricted,
271-
),
272-
reconnectSupported = false,
273-
controlEnabled = true,
274-
access = AccessSnapshot(
275-
direct = BackendStatus(
276-
available = true,
277-
granted = true,
278-
detail = "Charge-control access granted".toCaString(),
279-
),
280-
shizuku = BackendStatus(
281-
available = false,
282-
granted = false,
283-
detail = "Shizuku not installed".toCaString(),
284-
),
285-
),
286-
observation = ChargeObservation.Verified(ChargePolicy.FixedLimit(80), BackendKind.DIRECT_WSS),
287-
),
288-
)
289-
290299
// Pixel before access is granted: the dashboard leads with the setup guide.
291300
private fun setupNeededState() = DashboardUiState(
292301
// Capture is off here: this shot is about the setup guide, and the charging card showing its
@@ -326,17 +335,17 @@ private fun PreviewDashboardReady() = DashboardReadyContent()
326335
@Composable
327336
private fun PreviewDashboardActive() = DashboardActiveContent()
328337

329-
@Preview(name = "3 - Samsung multi-mode", device = DS, showSystemUi = true)
338+
@Preview(name = "3 - Charge conditions", device = DS, showSystemUi = true)
330339
@Composable
331-
private fun PreviewSamsungMultiMode() = SamsungMultiModeContent()
340+
private fun PreviewChargeConditions() = ChargeConditionsContent()
332341

333342
@Preview(name = "4 - Setup guide", device = DS, showSystemUi = true)
334343
@Composable
335344
private fun PreviewSetupGuide() = SetupGuideContent()
336345

337-
@Preview(name = "5 - Settings", device = DS, showSystemUi = true)
346+
@Preview(name = "5 - Battery hub", device = DS, showSystemUi = true)
338347
@Composable
339-
private fun PreviewSettings() = SettingsContent()
348+
private fun PreviewBatteryHub() = HubTileGridContent()
340349

341350
@Preview(name = "6 - Reconnect gesture", device = DS, showSystemUi = true)
342351
@Composable

app/src/screenshotTest/kotlin/eu/darken/amply/screenshots/PlayStoreScreenshots.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,19 @@ fun FullChargeActive() = DashboardActiveContent()
2020
@PreviewTest
2121
@PlayStoreLocales
2222
@Composable
23-
fun SamsungMultiMode() = SamsungMultiModeContent()
23+
fun ChargeConditions() = ChargeConditionsContent()
2424

2525
@PreviewTest
2626
@PlayStoreLocales
2727
@Composable
2828
fun SetupGuide() = SetupGuideContent()
2929

30+
// Shares HubFixtures' tile-grid content with the engineering hub shots — one fixture, two capture
31+
// dirs, so the store shot can never drift from the regression one.
3032
@PreviewTest
3133
@PlayStoreLocales
3234
@Composable
33-
fun Settings() = SettingsContent()
35+
fun BatteryHub() = HubTileGridContent()
3436

3537
@PreviewTest
3638
@PlayStoreLocales

fastlane/copy_screenshots.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ screen_file() {
2323
case "$1" in
2424
DashboardReady) echo "1_dashboard_light" ;;
2525
FullChargeActive) echo "2_full_charge_dark" ;;
26-
SamsungMultiMode) echo "3_samsung_multimode" ;;
26+
ChargeConditions) echo "3_charge_conditions" ;;
2727
SetupGuide) echo "4_setup_guide" ;;
28-
Settings) echo "5_settings" ;;
28+
BatteryHub) echo "5_battery_hub" ;;
2929
ReconnectGesture) echo "6_reconnect_gesture" ;;
3030
*) return 1 ;;
3131
esac
3232
}
33-
EXPECTED_FILES=(1_dashboard_light 2_full_charge_dark 3_samsung_multimode 4_setup_guide 5_settings 6_reconnect_gesture)
33+
EXPECTED_FILES=(1_dashboard_light 2_full_charge_dark 3_charge_conditions 4_setup_guide 5_battery_hub 6_reconnect_gesture)
3434
EXPECTED_PER_LOCALE=${#EXPECTED_FILES[@]}
3535

3636
# ImageMagick flattens the alpha channel (Play rejects transparent PNGs) and reports dimensions.
9.53 KB
Loading
1.25 KB
Loading
128 KB
Loading
Binary file not shown.
106 Bytes
Loading
140 KB
Loading

0 commit comments

Comments
 (0)