Skip to content

Add support for remotely loaded images in RMF#7445

Merged
catalinradoiu merged 30 commits intodevelopfrom
feature/cradoiu/rmf-image-load
Jan 16, 2026
Merged

Add support for remotely loaded images in RMF#7445
catalinradoiu merged 30 commits intodevelopfrom
feature/cradoiu/rmf-image-load

Conversation

@catalinradoiu
Copy link
Copy Markdown
Contributor

@catalinradoiu catalinradoiu commented Jan 7, 2026

Task/Issue URL: https://app.asana.com/1/137249556945/project/1211724162604201/task/1212745281144616?focus=true

Description

This PR adds support for loading remote images in the RMF components. It implements:

  • Updated MessageCta to handle image URLs and display them using Glide
  • Created a RemoteMessageImagePrefetcher to preload remote images for better performance
  • The image is stored in a local file that is deleted after the message is dismissed
  • Updated the RemoteMessage model to include imageUrl field in various content types
  • Modified UI layouts to accommodate remote images with proper transitions

Steps to test this PR

Remote Image Loading

UI changes

NTP Modal
Screenshot_20260108_170226 Screenshot_20260108_170149

The image that was loaded is taken from https://staticcdn.duckduckgo.com/remotemessaging/illustrations/image.png


Note

Adds remote image loading to RMF with prefetching and local caching for smoother rendering.

  • Introduces RemoteMessageImageStore (Glide-backed) to prefetch, persist, supply, and clear message images; wired via DI and repository (getRemoteMessageImageFile) and cleared on dismiss
  • Extends RemoteMessage.Content models and JSON mappers with optional imageUrl; maps through to UI via asMessage(..., localImageFilePath)
  • Updates MessageCta to render imageUrl or local file with Glide (fallback to drawable/animation), plus new ImageViews and barriers in view_remote_message_cta.xml, view_promo_message_cta.xml
  • Propagates image file path through RemoteMessageViewModel and NewTabLegacyPageViewModel/View to MessageCta
  • Adds remote image handling to Cards List modal view and layout
  • Adds Glide dependency to modules and comprehensive unit tests

Written by Cursor Bugbot for commit 3124c3e. This will update automatically on new commits. Configure here.

Copy link
Copy Markdown
Contributor Author

catalinradoiu commented Jan 7, 2026

@catalinradoiu catalinradoiu changed the title Create poc for loading images with RMF Add support for remotely loaded images in RMF Jan 7, 2026
# Conflicts:
#	android-design-system/design-system/src/main/res/layout/view_remote_message_cta.xml
@catalinradoiu catalinradoiu marked this pull request as ready for review January 8, 2026 16:15
Comment thread app/src/main/java/com/duckduckgo/app/browser/remotemessage/RemoteMessageMapper.kt Outdated
# Conflicts:
#	remote-messaging/remote-messaging-impl/src/main/java/com/duckduckgo/remote/messaging/impl/modal/cardslist/CardsListRemoteMessageView.kt
Comment thread app/src/main/java/com/duckduckgo/app/browser/remotemessage/RemoteMessageMapper.kt Outdated
@cmonfortep cmonfortep self-assigned this Jan 14, 2026
@cmonfortep cmonfortep self-requested a review January 14, 2026 14:12
Copy link
Copy Markdown
Contributor

@cmonfortep cmonfortep left a comment

Choose a reason for hiding this comment

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

LGTM


<ImageView
android:id="@+id/remoteImage"
android:layout_width="48dp"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ditto re sizes

Copy link
Copy Markdown
Contributor

@cmonfortep cmonfortep left a comment

Choose a reason for hiding this comment

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

LGTM

@catalinradoiu catalinradoiu merged commit 523859e into develop Jan 16, 2026
18 checks passed
@catalinradoiu catalinradoiu deleted the feature/cradoiu/rmf-image-load branch January 16, 2026 15:50
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