feat: redesign Pakkit’s watch and browser experience
- Unify branding around “Pack it. Send it. Wear it.” - Refine layouts, typography, motion, and accessibility - Rewrite product copy, notifications, and error messages - Simplify receiving and contextual installation permissions - Expand browser and Wear OS emulator validation
This commit is contained in:
28 files changed
+1058
-471
No files matched your search
@@ -61,11 +61,13 @@ def tap_text(serial, label, attempts=6):
|
||||
|
||||
|
||||
def session_url(serial):
|
||||
tap_text(serial, "View link")
|
||||
for _ in range(6):
|
||||
tree = ui(serial)
|
||||
for node in tree.iter("node"):
|
||||
value = node.get("text", "")
|
||||
if value.startswith("http://") and "#" in value:
|
||||
tap_text(serial, "Back to code")
|
||||
return value
|
||||
bounds = next(tree.iter("node")).get("bounds")
|
||||
_, _, width, height = map(int, re.findall(r"\d+", bounds))
|
||||
|
||||
@@ -44,11 +44,17 @@ try:
|
||||
adb(args.watch, "shell", "wm", "size", "384x384")
|
||||
adb(args.watch, "shell", "wm", "density", "320")
|
||||
adb(args.watch, "shell", "settings", "put", "system", "font_scale", "1.3")
|
||||
test_args = ["-e", "class", "meghdad.pakkit.WatchReviewTest,meghdad.pakkit.WatchSessionTest"]
|
||||
test_args = ["-e", "class", "meghdad.pakkit.WatchReviewTest,meghdad.pakkit.WatchSessionTest,meghdad.pakkit.WatchExperienceTest"]
|
||||
output = adb(args.watch, "shell", "am", "instrument", "-w", "-r", *test_args,
|
||||
"meghdad.pakkit.test/androidx.test.runner.AndroidJUnitRunner").decode()
|
||||
(report_dir / ("watch-small.txt" if args.small else "watch.txt")).write_text(output)
|
||||
print(output, flush=True)
|
||||
screenshots = report_dir / ("watch-product-small" if args.small else "watch-product")
|
||||
screenshots.mkdir(exist_ok=True)
|
||||
for name in ["home", "scan", "link", "sending", "checking", "ready", "installing", "confirm", "failed", "installed"]:
|
||||
image = adb(args.watch, "exec-out", "cat", f"/sdcard/Android/data/meghdad.pakkit/files/product-review/{name}.png")
|
||||
(screenshots / f"{name}.png").write_bytes(image)
|
||||
|
||||
if re.search(r"INSTRUMENTATION_STATUS_CODE: -[34]", output):
|
||||
raise RuntimeError("Tests skipped: allow Pakkit as an install source through the emulator’s system UI, then rerun.")
|
||||
if not re.search(r"OK \(\d+ tests?\)", output) or "FAILURES" in output:
|
||||
@@ -74,7 +80,7 @@ if args.browser:
|
||||
env = dict(os.environ, PAKKIT_SESSION_URL=url, PAKKIT_CDP_URL=f"http://127.0.0.1:{endpoint}")
|
||||
subprocess.run(["node", str(ROOT / "web-tests/emulator.test.cjs")], cwd=ROOT, env=env, check=True)
|
||||
adb(args.watch, "shell", "am", "start", "-W", "-n", "meghdad.pakkit/.ui.WatchActivity")
|
||||
tap_text(args.watch, "Dismiss")
|
||||
tap_text(args.watch, "Remove file")
|
||||
tap_text(args.watch, "End session")
|
||||
finally:
|
||||
adb(args.browser, "forward", "--remove", f"tcp:{endpoint}")
|
||||
|
||||
Reference in new issue
Block a user