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

[Notifications P1] Replace AsyncImage with CachedAsyncImage #22643

Conversation

alpavanoglu
Copy link
Contributor

@alpavanoglu alpavanoglu commented Feb 20, 2024

Fixes #22642 & #22647

Description

The current implementation has no caching mechanism. This PR introduces the newly added CachedAsyncImage to AvatarsView
It also fixes the horizontal margin mismatch between rows that have indicator and rows that don't.

Testing Steps

  1. Install & Login Jetpack
  2. Navigate to Notifications tab
  3. ✅ Verify that the replicating images are not being fetched again from network
  4. ✅ Verify that the text line for each row is the same regardless of what style is the avatar and whether there's indicator or not. The trailing padding for indicator with multi-avatar views will be less than single avatar views.

Regression Notes

  1. Potential unintended areas of impact
    N/A

  2. What I did to test those areas of impact (or what existing automated tests I relied on)
    N/A

  3. What automated tests I added (or what prevented me from doing so)
    N/A

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding unit tests for my changes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

Testing checklist:

  • WordPress.com sites and self-hosted Jetpack sites.
  • Portrait and landscape orientations.
  • Light and dark modes.
  • Fonts: Larger, smaller and bold text.
  • High contrast.
  • VoiceOver.
  • Languages with large words or with letters/accents not frequently used in English.
  • Right-to-left languages. (Even if translation isn’t complete, formatting should still respect the right-to-left layout)
  • iPhone and iPad.
  • Multi-tasking: Split view and Slide over. (iPad)

@dangermattic
Copy link
Collaborator

dangermattic commented Feb 20, 2024

1 Warning
⚠️ View files have been modified, but no screenshot or video is included in the pull request. Consider adding some for clarity.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Feb 20, 2024

Jetpack Alpha📲 You can test the changes from this Pull Request in Jetpack Alpha by scanning the QR code below to install the corresponding build.
App NameJetpack Alpha Jetpack Alpha
ConfigurationRelease-Alpha
Build Numberpr22643-bdbd1cf
Version24.3
Bundle IDcom.jetpack.alpha
Commitbdbd1cf
App Center Buildjetpack-installable-builds #7904
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Feb 20, 2024

WordPress Alpha📲 You can test the changes from this Pull Request in WordPress Alpha by scanning the QR code below to install the corresponding build.
App NameWordPress Alpha WordPress Alpha
ConfigurationRelease-Alpha
Build Numberpr22643-bdbd1cf
Version24.3
Bundle IDorg.wordpress.alpha
Commitbdbd1cf
App Center BuildWPiOS - One-Offs #8874
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

…ss-mobile/WordPress-iOS into feature/notifications_avatars_cached_async_image
Copy link
Contributor

@salimbraksa salimbraksa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Scrolling back to notifications doesn't reload the avatars
✅ Avatars and texts are aligned with or without the indicator

LGTM!

@alpavanoglu alpavanoglu merged commit b590e79 into feature/notifications_refresh_p1 Feb 21, 2024
21 checks passed
@alpavanoglu alpavanoglu deleted the feature/notifications_avatars_cached_async_image branch February 21, 2024 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants