Skip to content

Add Power Saving settings to settings search - #1444

Open
gildor wants to merge 1 commit into
overtake:masterfrom
gildor:settings-search-power-saving
Open

Add Power Saving settings to settings search#1444
gildor wants to merge 1 commit into
overtake:masterfrom
gildor:settings-search-power-saving

Conversation

@gildor

@gildor gildor commented Aug 12, 2026

Copy link
Copy Markdown

Problem

The Power Saving (lite mode) screen is not in the settings search index. settingsSearchableItems builds the index from explicit per-section lists (profile, stickers, notifications, privacy, data, proxy, appearance, language), and no list was ever added for lite mode when it shipped.

The practical effect: searching Settings for emoji, animation, sticker animation or power returns nothing for these toggles. Since the screen is named after a motivation (saving battery) rather than what it controls (looping emoji, stickers, GIFs, videos, blur, menu animations), a user who wants to stop animated emoji from looping has no path to it except already knowing it lives under General.

This is easy to hit in practice — the toggle people usually want is Emoji Animations, and search is the natural way to look for it.

Change

Adds powerSavingSearchableItems, indexing:

  • the screen itself, under its existing title GeneralSettings.LiteMode, breadcrumb General
  • every toggle in LiteMode.allKeys, using each key's existing .title, breadcrumbs General › Power Saving Mode

Each key's .info text is passed as alternate, so the descriptions already shown on the rows become searchable too — e.g. "Loop animated emoji in messages, reactions and statuses" makes loop, reactions and statuses find the Emoji Animations toggle.

All items push LiteModeController. There is no item-tag/focus mechanism on that controller, so sub-items open the screen rather than scrolling to a specific row, matching how the language and sticker items behave.

Supporting changes:

  • new .powerSaving case in SettingsSearchableItemIcon (reuses theme.icons.settingsGeneral) and in SettingsSearchableItemId (namespace 16, appended so existing persisted recent-search indices keep their meaning)
  • extension LiteModeKey in LiteModeController.swift is no longer private, so the search items reuse the exact strings the rows render

No new localized strings — everything reuses keys that already exist.

Notes

Synonyms are deliberately not added. Words like "battery" would need new SettingsSearch.Synonyms.* entries, which go through the translations platform; happy to add them in a follow-up if you'd like.

Verified by inspection and swiftc -parse; I wasn't set up to run a full Xcode build locally, so please give it a compile before merging.

The Power Saving (lite mode) screen and its per-feature toggles were not
part of the settings search index, so queries like "emoji", "animation"
or "power" returned nothing and the screen could only be reached by
knowing it lives under General.

Index the screen plus every LiteMode.allKeys toggle, reusing the titles
and descriptions those rows already display, so no new localized strings
are required.

Making the LiteModeKey title/info extension internal lets the search
items reuse the same strings the controller renders.
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

2 participants