Skip to content

Add search to the Menu#695

Open
bjorkert wants to merge 2 commits into
devfrom
feature/menu-search
Open

Add search to the Menu#695
bjorkert wants to merge 2 commits into
devfrom
feature/menu-search

Conversation

@bjorkert

@bjorkert bjorkert commented Jul 8, 2026

Copy link
Copy Markdown
Member

Adds a search field to the Menu tab, matching the iOS 26 style of the in-flight search additions to the Add Alarm sheet (#681) and the alarms list (#694).

Search covers the Menu's own rows (Settings, the tab features, View Log / Share Logs, and the support links) and the rows inside the Settings sub-screen (General, Graph, Units, Alarms, …). Typing e.g. "graph" surfaces the Graph settings row and tapping it deep-links straight into that screen.

Single source of truth

To avoid maintaining a parallel search index, the menu is now driven from the data that also feeds the search:

  • SettingsRoute carries each row's title, icon and search keywords, and a new SettingsSection + menuSections(nightscoutConfigured:) groups the rows and encodes their conditional visibility (Information Display / Remote require Nightscout; Live Activity is excluded on Mac Catalyst) in one place. SettingsMenuView renders from this — visually unchanged.
  • The Menu search results are assembled from those same routes, TabItem.featureOrder, and the handful of static rows, so adding a settings page automatically appears in both the list and the search with nothing to keep in sync.

Empty search shows the normal menu; a query with no matches shows a "No Results" state consistent with #681/#694.

Make SettingsRoute the single source of truth for the Settings list by
moving each row's title, icon and search keywords onto the route, and
grouping them via menuSections(nightscoutConfigured:). SettingsMenuView
now renders from that data.

Add .searchable to the Menu. Search results are assembled from the same
sources that build the menu — the Settings routes, the tab features and
the static rows — so they stay in sync automatically. A settings result
deep-links straight into its sub-screen; features, log and support-link
results reuse the menu's existing navigation.
Add a leaves list to SettingsRoute describing the individual settings
inside each sub-screen (row titles plus search synonyms), and include
them in the Menu search index after the screen-level items. A leaf
result shows a Settings → <screen> subtitle and opens the screen that
contains the setting, e.g. searching "basal" finds Graph Basal under
Advanced. Info Display leaves are derived from InfoType so they follow
the app's info rows automatically. NavigationRow gains an optional
subtitle to render these results.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant