Skip to content

General: Show pro upgrade indicators on gated settings#498

Merged
d4rken merged 3 commits into
mainfrom
feat/pro-settings-indicators
Apr 11, 2026
Merged

General: Show pro upgrade indicators on gated settings#498
d4rken merged 3 commits into
mainfrom
feat/pro-settings-indicators

Conversation

@d4rken

@d4rken d4rken commented Apr 11, 2026

Copy link
Copy Markdown
Member

What changed

Settings that require the Pro upgrade now show a small star icon next to their title, so you can see which features need Pro before tapping and getting bounced to the upgrade screen. The indicator is consistent across General Settings (theme mode/style/color), Reaction Settings (auto-play, auto-pause, auto-connect, popups) and Device Settings (sleep detection, stem actions, noise-control cycle customization). Switches remain visible, so users who had Pro and lost it can still toggle off a previously-enabled pro feature without first having to upgrade again.

Technical Context

  • Unifies three inconsistent pro-gating UI patterns (TextButton in the Appearance category header, star-replaces-switch in Reactions/Sleep Detection, and silent gates in Noise Control/Stem Actions) into a single proLocked parameter on SettingsBaseItem that renders a 16 dp primary-tinted star inline after the title. The parameter propagates through SettingsSwitchItem, SettingsListPreferenceItem, SettingsPreferenceItem as a one-line pass-through each.
  • Keeping the Switch visible (instead of replacing it with the star) fixes a latent UX bug flagged by Codex review: ex-pro users with an already-enabled reaction toggle previously had to tap the row once (silent disable) and then tap it again (only then the upgrade screen appeared). The ReactionSettingsViewModel.setXxx(false) path was already "free"; the old UI just hid it.
  • For the listening-mode cycle, non-pro builds now pass cycleMask = null into NoiseControlCombined, hiding the eye/eye-off visibility buttons entirely. This also side-steps a double-nav bug where tapping the OFF visibility button fired both onCycleMaskChange and onAllowOffChange, each independently routed through sendProGated, producing two upgrade navigations per tap. A new dedicated "Noise Control Cycle" row appears directly below the ANC card with the standard pro indicator and routes to Upgrade on tap.
  • Deletes the two duplicate local ProGatedToggle / ProGatedSwitchItem composables from ReactionSettingsScreen and DeviceSettingsScreen. Both were near-identical switch/star-swap helpers.
  • No new strings: reuses the existing overview_anc_mode_requires_upgrade ("Requires upgrade") as the ProBadge contentDescription (flavor-neutral), and the existing device_settings_listening_mode_cycle_label/description for the new cycle row.
  • Out of scope and intentionally left alone: the DeviceSettingsViewModel.sendProGated asymmetry — it gates both enable and disable behind Pro for sleep detection, listening-mode cycle and allow-off, unlike ReactionSettingsViewModel. Existing behavior, not addressed here.

Review checklist

  • Non-pro user: General → Appearance shows plain category header with an inline star on Theme Mode / Style / Color, and tapping any of them navigates directly to Upgrade without opening a picker dialog first.
  • Non-pro user: Reaction Settings rows show both the Switch and the inline star (not one-or-the-other).
  • Non-pro user with a connected AirPods Pro: ANC card shows only the mode selection (no eye/eye-off visibility buttons); a new "Noise Control Cycle" row with a star appears directly below the card and routes to Upgrade on tap.
  • Pro user: stars disappear, picker dialogs open, visibility buttons return, and the extra cycle row is not rendered.
  • FOSS and gplay builds both compile and behave identically — the indicators live in shared code, not per-flavor.

d4rken added 2 commits April 11, 2026 15:02
Unifies the three inconsistent pro-gating UI patterns (text button header, star-replaces-switch, silent gates) into a single inline star badge next to the title, driven by a new proLocked parameter on SettingsBaseItem that propagates to all wrappers. Switches stay visible so users can see state and disable ex-pro toggles. Hides the Noise Control visibility buttons when non-pro and surfaces a dedicated cycle customization row with the indicator. Deletes two duplicate local ProGated composables.
…lity

The 'Pro' label is gplay-specific vocabulary — FOSS unlocks the same features via sponsorship. Aligns with the existing flavor-neutral terms already used in UpgradeRepo, Nav.Main.Upgrade and launchUpgrade(). Renames the proLocked parameter to requiresUpgrade across SettingsBaseItem and its three wrappers, and adds a new common_upgrade_required_label string (Requires upgrade) for the badge content description.
@d4rken d4rken force-pushed the feat/pro-settings-indicators branch from 479b798 to 2f81c0a Compare April 11, 2026 14:36
Makes the inline upgrade badge a tiny star + short label (Pro on gplay, FOSS on foss) instead of icon-only. Text is flavor-switched via upgrade_badge_label in each flavor's strings.xml, primary color, labelSmall typography, no pill background to keep it lightweight when multiple rows stack it. Accessibility uses the existing common_upgrade_required_label.
@d4rken d4rken added the enhancement Add a new feature of improve an existing feature label Apr 11, 2026
@d4rken d4rken merged commit 30163a3 into main Apr 11, 2026
10 checks passed
@d4rken d4rken deleted the feat/pro-settings-indicators branch April 11, 2026 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Add a new feature of improve an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant