Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace profile header view with Compose UI #3235

Merged
merged 11 commits into from
Nov 18, 2024
Merged

Conversation

MiSikora
Copy link
Contributor

@MiSikora MiSikora commented Nov 15, 2024

Description

This PR replaces the header in the profile screen with Compose UI components. It includes minor changes, improvements, and some alignment with iOS:

  • Patron: Now uses a border around the avatar. Previously, this feature was available only for Plus users. It also uses a Patron color for background to align it with Plus coloring scheme.
  • Email and Expiry Date: Both can now be displayed simultaneously.
  • Expiry Date Resolution: The expiry date is now shown with seconds resolution. It still displays the single largest unit, but for example, if someone has 2 minutes left, it will show "2 minutes."

The old view has not been removed as it is still used by the Automotive app. It is also inherited from and used in the Account Details screen.

Testing Instructions

Test profile header behavior in different scenarios:

  • Landscape orientation.
  • Signed out.
  • Signed in with Free, Plus, and Patron accounts.
  • An account with a profile image and a different one without it.

Screenshots or Screencast

Comparison

Before After
bef aft
bef1 aft1
bef2 aft2

Compose preview

Screenshot 2024-11-15 at 14 01 46

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 spreadsheet 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

@MiSikora MiSikora added [Type] Tech Debt Involving upgrades or refactoring to maintain or enhance the codebase. do not merge [Area] Compose labels Nov 15, 2024
@MiSikora MiSikora requested a review from a team as a code owner November 15, 2024 12:04
@MiSikora MiSikora requested review from geekygecko and removed request for a team November 15, 2024 12:04
@dangermattic
Copy link
Collaborator

dangermattic commented Nov 15, 2024

1 Warning
⚠️ This PR is larger than 500 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Nov 15, 2024

📲 You can test the changes from this Pull Request in 📱 Mobile by scanning the QR code below to install the corresponding build.
App Name 📱 Mobile
Build TypedebugProd
Commitb469504
Direct Downloadpocketcasts-app-prototype-build-pr3235-b469504.apk
📲 You can test the changes from this Pull Request in 🚗 Automotive by scanning the QR code below to install the corresponding build.
App Name 🚗 Automotive
Build TypedebugProd
Commitb469504
Direct Downloadpocketcasts-automotive-prototype-build-pr3235-b469504.apk
📲 You can test the changes from this Pull Request in ⌚ Wear by scanning the QR code below to install the corresponding build.
App Name ⌚ Wear
Build TypedebugProd
Commitb469504
Direct Downloadpocketcasts-wear-prototype-build-pr3235-b469504.apk

@MiSikora MiSikora added this to the 7.78 milestone Nov 15, 2024
@MiSikora MiSikora force-pushed the task/profile-header-compose branch from 6f72eb9 to c882fb5 Compare November 15, 2024 16:44
Base automatically changed from task/user-image-compose to main November 18, 2024 07:04
@MiSikora MiSikora enabled auto-merge (squash) November 18, 2024 07:43
…etcasts/profile/ProfileHeader.kt

Co-authored-by: Philip Simpson <[email protected]>
@MiSikora MiSikora force-pushed the task/profile-header-compose branch from e86b997 to b469504 Compare November 18, 2024 08:26
@MiSikora MiSikora merged commit 0ec3355 into main Nov 18, 2024
15 of 16 checks passed
@MiSikora MiSikora deleted the task/profile-header-compose branch November 18, 2024 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Area] Compose [Type] Tech Debt Involving upgrades or refactoring to maintain or enhance the codebase.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants