Skip to content

After selecting a settings search result, scroll-to and highlight the setting #1095

@gordolio

Description

@gordolio

Is your feature request related to a problem? Please describe.

Settings search navigates to the correct screen but doesn't always scroll to or highlight the target setting. Testing 149 searchable items revealed failures in several categories: label mismatches between the search index and UI, settings hidden behind disabled toggles, navigation stopping short of nested sub-screens, and missing scroll target annotations on custom UI sections.

Describe the solution you'd like

Complete scroll-to-highlight coverage for all searchable settings:

  1. Add .settingsHighlightScroll() modifier to all settings sub-screens
  2. Add .settingsSearchTarget(label:) annotations to custom UI sections (e.g. picker-style layouts in User Interface settings)
  3. Fix search index label mismatches where searchContents entries don't match actual UI labels
  4. Add scrollTargetLabels mappings where the search term intentionally differs from the UI label
  5. Handle conditionally-hidden settings gated behind a toggle that can't be scrolled to when the toggle is off
  6. Fix nested navigation for screens behind intermediate navigation (Apple Watch, Nightscout Upload/Fetch)

Describe alternatives you've considered

  • Ignore scroll-to for hidden settings: Only show them in search results when visible. Reduces scope but changes search behavior.
  • Auto-enable parent toggles: Rejected because toggling user settings as a side effect of search is unexpected and potentially unsafe for a medical device app.

Additional context

Category Count Example
Hidden behind disabled toggle ~15 "Reduced Bolus Percentage" (toggle OFF)
Nested navigation stops short ~8 Apple Watch, Nightscout Upload/Fetch
Label mismatch ~4 "Glucose Units", "Max Carbs", "DIA"
Missing scroll target ~2 "Glucose Notifications", "Anonymized Data Sharing"

Searchable Settings Checklist

Devices

  • Devices (navigation)
  • Insulin Pump (navigation)

Devices > Continuous Glucose Monitor

  • CGM (navigation)
  • Smooth Glucose Value

Devices > Smart Watch

  • Smart Watch (navigation)
  • Apple Watch (navigation): nav stops at Watch list
  • Display on Watch: nav stops at Watch list
  • Show Protein and Fat: nav stops at Watch list
  • Confirm Bolus Faster: nav stops at Watch list
  • Contact Image (navigation): nav stops at Watch list
  • Watch Complication: nav stops at Watch list

Therapy Settings

  • Therapy (navigation)
  • Basal Rates (navigation)
  • Insulin Sensitivities (navigation)
  • ISF (navigation)
  • Carb Ratios (navigation)
  • CR (navigation)
  • Glucose Targets (navigation)

Therapy Settings > Units and Limits

Algorithm

  • Algorithm (navigation)

Algorithm > Autosens

  • Autosens (navigation)
  • Autosens Max
  • Autosens Min
  • Rewind Resets Autosens

Algorithm > Super Micro Bolus (SMB)

Algorithm > Dynamic Sensitivity

  • Dynamic Settings (navigation)
  • Dynamic ISF
  • Sigmoid
  • Logarithmic
  • Adjustment Factor (AF)
  • Sigmoid Adjustment Factor
  • Weighted Average of TDD
  • Adjust Basal

Algorithm > Target Behavior

Algorithm > Additionals

Features

  • Features (navigation)

Features > Bolus Calculator

Features > Meal Settings

  • Meal Settings (navigation)
  • Max Carbs: label mismatch
  • Max Meal Absorption Time
  • Max Fat: hidden, toggle OFF
  • Max Protein: hidden, toggle OFF
  • Enable Fat and Protein Entries
  • Fat and Protein Delay: hidden, toggle OFF
  • Spread Interval: hidden, toggle OFF
  • Fat and Protein Percentage: hidden, toggle OFF
  • FPU: hidden, toggle OFF

Features > Shortcuts

  • Shortcuts (navigation)
  • Allow Bolusing with Shortcuts

Features > Remote Control

  • Remote Control (navigation)

Features > User Interface

Features > App Icons

  • App Icons (navigation)
  • Trio Icon

Features > App Diagnostics

  • App Diagnostics (navigation)
  • Anonymized Data Sharing: uses radio buttons, not a highlightable row

Manage iOS Preferences

  • Manage iOS Preferences (navigation)

Notifications

  • Notifications (navigation)

Notifications > Trio Notifications

  • Trio Notifications (navigation)
  • Always Notify Pump
  • Always Notify CGM
  • Always Notify Carb
  • Always Notify Algorithm
  • Show Glucose App Badge
  • Glucose Notifications: scroll target not reached
  • Add Glucose Source to Alarm
  • Low Glucose Alarm Limit: hidden, toggle OFF
  • High Glucose Alarm Limit: hidden, toggle OFF

Notifications > Live Activity

  • Live Activity (navigation)
  • Enable Live Activity
  • Lock Screen Widget Style: hidden, toggle OFF

Notifications > Calendar Events

  • Calendar Events (navigation)
  • Create Calendar Events: label mismatch, UI shows 'Create Events in Calendar'
  • Choose Calendar: hidden, toggle OFF
  • Display Emojis as Labels: hidden, toggle OFF
  • Display IOB and COB: hidden, toggle OFF

Services

  • Services (navigation)
  • Tidepool (navigation)
  • Apple Health (navigation)

Services > Nightscout

  • Nightscout (navigation)
  • Import Settings: not visible from Nightscout main
  • Backfill Glucose: no highlight on button

Services > Nightscout > Upload

  • Nightscout Upload (navigation): nav stops at Nightscout main
  • Allow Uploading to Nightscout: nav stops at Nightscout main
  • Upload Glucose: nav stops at Nightscout main

Services > Nightscout > Fetch and Remote Control

  • Nightscout Fetch & Remote Control (navigation): nav stops at Nightscout main
  • Allow Fetching From Nightscout: nav stops at Nightscout main

Technical Details

  • .settingsHighlightScroll() reads from SettingsSearchHighlight (an @Observable environment object) to drive ScrollViewReader scrolling and row highlight animation
  • .settingsSearchTarget(label:) is for sections that don't use SettingInputSection (which has built-in support)
  • scrollTargetLabels in SettingItems.swift maps search terms to their actual UI label when they differ
  • Nested navigation (Apple Watch, Nightscout sub-screens) requires changes to NavigationPath-based routing in SettingsRootView
  • Hidden-setting handling may require the search result UI to indicate when a setting exists but isn't currently visible

User Impact

Settings search is a core discoverability feature. Currently ~30 of 149 items don't fully work. Completing this ensures search reliably takes users to the exact setting they're looking for.

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions