mirror of
https://github.com/kuhyx/diet-guard.git
synced 2026-11-10 20:27:11 +01:00
Phase 2 consumer migration. diet-guard was the donor for make_button, so it
is one of the two proof consumers the extraction is validated against.
- _gatelock_buttons.py is deleted; its make_button now lives in gatelock,
where the variant API (text colour picked *from* the fill) and the
<Return>/<KP_Enter> bindings serve all four gates instead of one. Call
sites pass _COLORS explicitly, since a shared widget cannot read this
app's module-level palette. Pixel-identical: BODY/LABEL were -16/-14 and
LockConfig.font("body"/"label") yields the same negative (pixel) sizes.
- WidgetGroup now subclasses gatelock's, keeping the list[_W] constructor and
re-narrowing `first` to the widget type. The specialized groups (EntryGroup
over a shared StringVar, TextGroup, ListboxGroup, MacroGroup) are unchanged
behaviour and stay -- gatelock has no equivalent for them.
- bind() keeps *replacing* semantics, inverted from gatelock's additive
default and now documented + tested. _wire_events runs once per
build_surface and again on rebuild, so an additive bind would stack a
second <Return> handler on every surviving widget and log the meal twice.
- conftest swaps gatelock.widgets into the fake-tk module list in the same
edit that removes _gatelock_buttons, since that list fails the whole suite
if it drifts in either direction.
All three gatelock pins move together to v0.5.0 -- pyproject, requirements.txt
and the pylint hook's additional_dependencies. The config comment already
warned that a lagging hook pin lints against a gatelock without the API the
code calls; that is exactly what it did before this bump.
The "<Return> activates a button" test moves to gatelock with the button, so
it runs against real Tk rather than a fake widget that can only report the
binding it was handed.
Verified: 692 tests, 100% branch coverage against the *installed* gatelock
0.5.0 (not a PYTHONPATH shim); the gate builds under xvfb and <Return> and
<KP_Enter> both fire a real button's command, with the accent focus ring
(#B8862E, 2px) instead of Tk's invisible 1px black.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U4Rj3s7K2qzrLNgJqqPhno
69 lines
2.0 KiB
YAML
69 lines
2.0 KiB
YAML
name: diet_guard_app
|
|
description: "Companion phone app for diet_guard: log meals on the go."
|
|
publish_to: 'none'
|
|
|
|
version: 1.0.10+1
|
|
|
|
environment:
|
|
sdk: ^3.12.2
|
|
|
|
dependencies:
|
|
crdt_sync:
|
|
git:
|
|
url: https://github.com/kuhyx/utils
|
|
ref: crdt_sync_dart-v0.10.0
|
|
path: crdt_sync_dart
|
|
crypto: ^3.0.6
|
|
flutter:
|
|
sdk: flutter
|
|
flutter_local_notifications: ^22.0.1
|
|
flutter_secure_storage: ^10.3.1
|
|
|
|
# One-tap sign-in for the sync account. App-side only: crdt_sync stays pure
|
|
# Dart so it keeps working on Linux desktop and headless.
|
|
google_sign_in: ^7.2.0
|
|
http: ^1.6.0
|
|
idb_shim: ^2.9.6+2
|
|
path: ^1.9.1
|
|
path_provider: ^2.1.5
|
|
permission_handler: ^12.0.3
|
|
shared_preferences: ^2.5.5
|
|
|
|
# Shared "Sync settings" screen (Firebase + optional local backup), reused
|
|
# across every kuhy app that syncs. GitHub mirror stays app-local (see
|
|
# lib/screens/github_mirror_screen.dart) since connecting it here also
|
|
# triggers a real log sync, not just a settings save.
|
|
sync_settings_ui:
|
|
git:
|
|
url: https://github.com/kuhyx/utils
|
|
ref: sync_settings_ui-v0.1.0
|
|
path: sync_settings_ui
|
|
url_launcher: ^6.3.2
|
|
uuid: ^4.5.3
|
|
web: ^1.1.1
|
|
workmanager: ^0.9.0+3
|
|
|
|
dev_dependencies:
|
|
# Generates the Android launcher icons from assets/icon/ (see
|
|
# python_pkg/app_icons in testsAndMisc for the shared style).
|
|
flutter_launcher_icons: ^0.14.4
|
|
flutter_test:
|
|
sdk: flutter
|
|
url_launcher_platform_interface: ^2.3.2
|
|
very_good_analysis: ^10.2.0
|
|
|
|
flutter:
|
|
uses-material-design: true
|
|
|
|
# Launcher icon generation. Source art is produced by the shared generator:
|
|
# PYTHONPATH=~/testsAndMisc python3 -m python_pkg.app_icons generate --app <key>
|
|
# then run: dart run flutter_launcher_icons
|
|
flutter_launcher_icons:
|
|
android: true
|
|
ios: false
|
|
image_path: "assets/icon/icon.png"
|
|
adaptive_icon_background: "#211D1B"
|
|
adaptive_icon_foreground: "assets/icon/icon_foreground.png"
|
|
adaptive_icon_monochrome: "assets/icon/icon_monochrome.png"
|
|
min_sdk_android: 21
|