1e07ab1ddc
Keep the Templates destination available through its direct routes while removing the obsolete Settings entry and wiring. Update navigation coverage and document the preserved route behavior.
3.0 KiB
3.0 KiB
Remove the Templates entry from Settings
What changed
- Deleted
lib/features/settings/settings_templates_section.dart(theBrowse templateschevron row and its label constants). - Removed
SettingsKeys.templates, theonOpenTemplatesparameter and its doc comment fromSettingsScreen, and the Templates row from the Tools topic's Library group (settings_topic_pages.dart). The Library group now renders only when a Schedules route is supplied. pipelines_app.dartno longer passesonOpenTemplates.settings_schedules_section.dart: doc comment no longer refers to the Templates entry.
Kept on purpose
- The Templates destination (
lib/application/templates_destination.dart), theAppRoute.templateskind, its codec (/templates,/settings/templatesaliases),AppRouter.openTemplates/closeTemplates, and the templates feature underlib/features/templates/. They remain reachable by URL (/templates,/settings/templates) and byAppRouter.openTemplates, so they are not solely reachable from the removed row. Removing them is a separate follow-up if the route itself should go.
Tests
test/application/templates_wiring_test.dartandtest/application/templates_behind_bar_test.dartused to reach Templates by tapping the Settings row. They now boot at/pipelinesand push/templatesby route, then assert the same embedded page, bar, refresh, detail and create expectations. The Settings-only assertions (edited server URL surviving the detour, the Settings row being present, thepinganswer) were removed with the row.readTemplatesintemplates_wiring_test.dartsettles the frame after the list reply before answeringvalidate, because the shell's ownpingshares the request queue.- New
test/features/settings/settings_library_test.dart: Tools showsLibrarywith Schedules and noBrowse templates; Schedules still calls its route; without a Schedules route the Library group is absent.
Focused results (app/, tool/memwatch/full.sh)
- Baseline on the untouched worktree, 4 files: 31 passed, 0 failed.
- After the change, 10 files (the 4 above plus
settings_library_test.dart,settings_topic_restore_test.dart,settings_screen_test.dart,settings_layout_test.dart,settings_tabs_test.dart,settings_shell_background_test.dart): 61 passed, 0 failed. tool/analyze.sh: clean.- Not run: the whole
testdirectory (left to the land gate), and no UI capture was made.
Affected states (not yet captured)
- Settings > Tools: Library group shows Schedules only.
/templatesand/settings/templatesdeep links: still open the embedded Templates page; Back returns to Settings.
Known leftovers
app/tool/templates_wiring_probe*,templates_gallery_probe*andtemplate_create_probe.dartdrive Settings > Templates and will fail against this build. They were not edited or run here.app/PARITY.md,app/WORK.mdandapp/pipelines/flutter-design.mdmay still describe the Settings entry; they were not reviewed.