Add scroll targets and fix search index labels for settings search#1096
Conversation
There was a problem hiding this comment.
All the labeling changes in this file are breaking localization for our settings search terms, i.e. before this change you were able to search a localized setting name or an English one, and it would list the localized result. Now it lists the hardcoded label as of the collections that were added here.
There was a problem hiding this comment.
Thanks for flagging the localization concern! I investigated and found that the untranslated search results ("Enable SMB With Temporary Target", "Allow SMB With High Temporary Target", "Max UAM SMB Basal Minutes", "Max Allowed Glucose Rise for SMB") are actually a pre-existing issue on dev. These strings were never added to the xcstrings file when they were introduced.
Here's the same "SMB" search on dev:
I had initially included some additional searchContents entries but have since removed them to keep this PR scoped strictly to scrollTargetLabels mappings and scroll target modifiers.
There was a problem hiding this comment.
Sorry, but shouldn't the color be retained, and the settings search target modifier be added here?
There was a problem hiding this comment.
The .settingsSearchTarget(label:) modifier includes .listRowBackground(Color.chart) as its base, with the highlight overlay on top. So the color is retained.
Settings search can now scroll to the matched setting and briefly highlight it. Implemented for Algorithm > DynamicSettings as a starting point. Remaining screens to follow.
Enables scroll-to-highlight support for settings search results across all settings views that were missing the modifier.
Restore removed search entries ("X-Axis Interval Step", "Dark Scheme",
"Light Scheme", "Enable Reduced Bolus Factor", etc.) so they still
navigate to the correct screen. Add scrollTargetLabels so the old
names also scroll to and highlight the correct row.
Reduced Bolus Percentage and Super Bolus Percentage are displayed inside SettingInputSection as conditionalLabel, but the scroll anchor is registered under the parent label. Map all related search terms to the actual anchor IDs.
905b5ac to
61ed450
Compare
…llable-settings-search-3-ui-scroll-targets


Part 3 of #1095
About
scrollTargetLabelsscrollTargetLabelsmaps the search term to the actual UI label:There are two cases where these are needed: