Skip to content

Migrate Files Settings screen to Jetpack Compose - #5721

Open
clementiano9 wants to merge 2 commits into
Automattic:mainfrom
clementiano9:task/compose-migrate-cloud-settings
Open

Migrate Files Settings screen to Jetpack Compose#5721
clementiano9 wants to merge 2 commits into
Automattic:mainfrom
clementiano9:task/compose-migrate-cloud-settings

Conversation

@clementiano9

Copy link
Copy Markdown

Description

  • Migrates CloudSettingsFragment (the Files Settings screen) to Jetpack Compose, adding CloudSettingsPage and deleting fragment_cloud_settings.xml
  • Follows the pattern already used by HeadphoneControlsSettingsFragment, reusing the shared SettingSection / SettingRow / SettingRowToggle / Banner components
  • Reworks CloudSettingsViewModel to expose a single StateFlow<UiState> instead of a LiveData sign-in state plus direct settings.*.value reads in the fragment. This also fixes a latent issue: the old screen read each switch value once at bind time, so a preference changed elsewhere (e.g.by sync) while the screen was open would not be reflected
  • Adds CloudSettingsViewModelTest

Fixes # 753

Testing Instructions

  1. Sign out (or use a free account) so the Plus rows render locked
  2. Go to Profile → Files → ⋮ → Files settings
  3. Toggle Auto Add To Up Next and Delete local file; reopen the screen and confirm the values persisted
  4. Confirm Delete cloud file is hidden (not merely disabled) while not Plus
  5. Tap any of the three locked Plus rows, the upgrade screen should open
  6. Tap Learn More in the banner, the upgrade screen should open
  7. Dismiss the banner with ; reopen the screen and confirm it stays dismissed
  8. Sign in as Plus/Patron and confirm all six toggles are enabled, Delete cloud file appears, and the banner is gone
  9. Confirm the analytics still fire: settings_files_shown on open, and the per-toggle events on each change

Screenshots

new_banner Screenshot_20260811-183017 Screenshot_20260811-183042

Checklist

  • If this is a user-facing change, I have added an entry in CHANGELOG.md
  • Ensure the linter passes (./gradlew spotlessApply to automatically apply formatting/linting)
  • I have considered whether it makes sense to add tests for my changes
  • All strings that need to be localized are in modules/services/localization/src/main/res/values/strings.xml
  • Any jetpack compose components I added or changed are covered by compose previews
  • I have updated (or requested that someone edit) [the Event Horizon schema](https://github.com/
    Automattic/EventHorizonSchemas/blob/trunk/schema/pocket-casts.yml) to reflect any new or changed analytics.

I have tested any UI changes...

  • with different themes
  • with a landscape orientation
  • with the device set to have a large display and font size
  • for accessibility with TalkBack

@clementiano9
clementiano9 requested a review from a team as a code owner August 11, 2026 17:53
@clementiano9
clementiano9 requested review from sztomek and removed request for a team August 11, 2026 17:53
@CLAassistant

CLAassistant commented Aug 11, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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