mirror of
https://github.com/kuhyx/todo-app.git
synced 2026-11-11 12:07:51 +01:00
Editing an existing note looked nothing like capturing a new one: it always showed the template dropdown, the View/Guided/Raw pills and the priority/status row. The cause was one missing argument -- both screens already embedded the same NoteEditor, but NoteDetailScreen never passed advancedMode, which defaults to true in the widget while the app-wide AppSettings.advancedMode defaults to false. Extract the shared form as three single-purpose components rather than one widget owning several jobs: - note_meta_row.dart renders the priority/status row (was capture_meta_row.dart; drops the private _MetaDropdown duplicate the detail screen carried, which used DropdownButtonFormField where the shared one uses DropdownButton). - note_form_chrome_gate.dart owns chrome visibility and nothing else, replacing the _chromeVisible flag both screens copy-pasted. - note_form.dart composes those two with NoteEditor. appSettings is now a required parameter through NotesListScreen and NoteDetailScreen. Required, not defaulted: a silent default is exactly what caused this, so it must not be reintroducible. Also in the capture app bar: drop the decorative Icons.list_alt_outlined beside the note count, since the adjacent Icons.list button already names what is counted, and move the count to the right of that button. The finalize-and-clear action becomes Icons.check instead of Icons.add -- it never saved anything (every keystroke is already persisted), so a plus sign misdescribed it. 314 tests, 100% line coverage. Verified in a running web build that edit and capture render identically with advanced mode both off and on. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| analytics_event_test.dart | ||
| analytics_flush_test.dart | ||
| analytics_helpers.dart | ||
| app_settings_test.dart | ||
| capture_screen_advanced_test.dart | ||
| capture_screen_editing_test.dart | ||
| capture_screen_harness.dart | ||
| capture_screen_lifecycle_test.dart | ||
| capture_screen_sync_test.dart | ||
| confirm_test.dart | ||
| fake_note_repository.dart | ||
| fake_secure_storage.dart | ||
| firebase_backend_test.dart | ||
| github_device_auth_test.dart | ||
| github_mirror_device_flow_test.dart | ||
| github_mirror_harness.dart | ||
| github_mirror_screen_test.dart | ||
| google_sign_in_backend_test.dart | ||
| local_backup_test.dart | ||
| markdown_view_test.dart | ||
| note_detail_screen_test.dart | ||
| note_editor_guided_test.dart | ||
| note_editor_harness.dart | ||
| note_editor_modes_test.dart | ||
| note_editor_wizard_test.dart | ||
| note_repository_crud_test.dart | ||
| note_repository_filters_test.dart | ||
| note_repository_helpers.dart | ||
| note_repository_migration_test.dart | ||
| note_repository_streams_test.dart | ||
| note_template_test.dart | ||
| note_test.dart | ||
| notes_list_filter_test.dart | ||
| notes_list_harness.dart | ||
| notes_list_screen_test.dart | ||
| notes_markdown_test.dart | ||
| port_guard_fakes.dart | ||
| port_guard_linux_probe_test.dart | ||
| port_guard_parsing_test.dart | ||
| port_guard_resolve_test.dart | ||
| run_sync_test.dart | ||
| settings_screen_backup_test.dart | ||
| settings_screen_harness.dart | ||
| settings_screen_test.dart | ||
| sync_service_fakes.dart | ||
| sync_service_revision_test.dart | ||
| sync_service_test.dart | ||
| sync_settings_test.dart | ||
| sync_state_factory_io_test.dart | ||
| theme_test.dart | ||
| wrapper_server_harness.dart | ||
| wrapper_server_provisioning_test.dart | ||
| wrapper_server_static_test.dart | ||