Skip to content

[LWDM] feat: lwd add icon image key value for braze action cards#15584

Merged
RobinVncnt merged 1 commit intodevelopfrom
feat/lwd-icon-image-braze-action-banner-logic
Mar 20, 2026
Merged

[LWDM] feat: lwd add icon image key value for braze action cards#15584
RobinVncnt merged 1 commit intodevelopfrom
feat/lwd-icon-image-braze-action-banner-logic

Conversation

@RobinVncnt
Copy link
Copy Markdown
Contributor

@RobinVncnt RobinVncnt commented Mar 19, 2026

✅ Checklist

  • npx changeset was attached.
  • Covered by automatic tests.
  • Impact of the changes:
    • ...

📝 Description

  • add icon and image_background braze key value
  • display icon or image variant in consequence (image variant not ready so it's mocked)

❓ Context

  • JIRA or GitHub link: LIVE-26627
  • ADR link (if any):
Screenshot 2026-03-19 at 16 42 39

🧐 Checklist for the PR Reviewers

  • The code aligns with the requirements described in the linked JIRA or GitHub issue.
  • The PR description clearly documents the changes made and explains any technical trade-offs or design decisions.
  • There are no undocumented trade-offs, technical debt, or maintainability issues.
  • The PR has been tested thoroughly, and any potential edge cases have been considered and handled.
  • Any new dependencies have been justified and documented.
  • Performance considerations have been taken into account. (changes have been profiled or benchmarked if necessary)

@RobinVncnt RobinVncnt requested review from a team as code owners March 19, 2026 15:44
Copilot AI review requested due to automatic review settings March 19, 2026 15:44
@live-github-bot live-github-bot Bot added desktop Has changes in LLD mobile Has changes in LLM labels Mar 19, 2026
@live-github-bot live-github-bot Bot changed the title feat: lwd add icon image key value for braze action cards [LWDM] feat: lwd add icon image key value for braze action cards Mar 19, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Web Tools Build Status

Build Status Deployment
Web Tools Build ⏭️ Skipped
Native Storybook Build ⏭️ Skipped
React Storybook Build ⏭️ Skipped

@github-actions
Copy link
Copy Markdown
Contributor

⚠️ E2E tests are required

Changes detected require e2e testing before merge (even before asking for any review).

🖥️ Desktop

-> Run Desktop E2E

  • Select "Run workflow"
  • Branch: feat/lwd-icon-image-braze-action-banner-logic
  • Device: nanoSP or stax

📱 Mobile

-> Run Mobile E2E

  • Select "Run workflow"
  • Branch: feat/lwd-icon-image-braze-action-banner-logic
  • Device: nanoX

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support for two additional Braze action card extras (icon and image_background) across mobile + desktop dynamic content, and wires them through the local Braze dev tools and UI components so the action card variant can change based on these keys.

Changes:

  • Mobile: extend HorizontalContentCard mapping/types to include image_background, and update the action banner card to branch on it.
  • Desktop: extend ActionContentCard type + Braze mapping, pass new props through the dashboard action cards, and allow generating these fields via the BrazeTools modal.
  • Desktop MVVM: extend ContentBannerActionCard to accept icon and image_background.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
apps/ledger-live-mobile/src/dynamicContent/utils.tsx Maps Braze image_background into horizontal action cards.
apps/ledger-live-mobile/src/dynamicContent/types.ts Extends HorizontalContentCard with image_background.
apps/ledger-live-mobile/src/contentCards/cards/contentBannerAction/index.tsx Switches banner variant selection to use image_background and supports icon.
apps/ledger-live-desktop/src/types/dynamicContent.ts Extends ActionContentCard with image_background and icon.
apps/ledger-live-desktop/src/renderer/hooks/useBraze.ts Maps Braze icon / image_background extras into ActionContentCard.
apps/ledger-live-desktop/src/renderer/screens/dashboard/ActionContentCards.tsx Passes icon / image_background down to the banner card component.
apps/ledger-live-desktop/src/renderer/screens/settings/sections/Developer/BrazeTools/Modal/Body.tsx Adds form fields for image_background and icon when generating local Action cards.
apps/ledger-live-desktop/src/renderer/screens/settings/sections/Developer/BrazeTools/Hooks/useGenerateLocalBraze.ts Updates local action-card generation to include optional icon and image_background.
apps/ledger-live-desktop/src/mvvm/features/DynamicContent/components/ContentBannerActionCard/index.tsx Accepts icon / image_background props and selects an icon by name.
.changeset/silent-rice-shop.md Declares minor bumps for desktop and mobile to reflect the feature addition.
Comments suppressed due to low confidence (1)

apps/ledger-live-mobile/src/contentCards/cards/contentBannerAction/index.tsx:44

  • imageBackground/props.image_background is only used to switch rendering branches, but the URL is never actually applied to the ContentBanner (or any wrapper). As-is, providing image_background won’t display an image background, it will only remove the Spot icon.
  const imageBackground =
    "image_background" in props && props.image_background?.length
      ? props.image_background
      : undefined;
  const iconProp =
    "icon" in props && props.icon !== undefined ? (props.icon as keyof typeof Icons) : "Settings";
  const icon = Icons[iconProp] || Icons.Settings;

  useEffect(() => metadata.actions?.onView?.());

  const handleDismiss = useCallback(
    (event?: GestureResponderEvent) => {
      if (event) {
        event.preventDefault();
        event.stopPropagation();
      }
      metadata.actions?.onDismiss?.();
    },
    [metadata.actions],
  );

  if (imageBackground && imageBackground.length > 0) {
    return (
      <Pressable onPress={metadata.actions?.onClick} key={metadata.id}>
        <ContentBanner onClose={handleDismiss}>
          <ContentBannerContent>

You can also share your feedback on Copilot code review. Take the survey.

@live-github-bot
Copy link
Copy Markdown
Contributor

live-github-bot Bot commented Mar 19, 2026

Desktop Bundle Checks

Comparing c4732ae against a863296.

⚠️ renderer bundle size significantly increased: 25.8mb -> 26mb. Please check if this is expected.

Mobile Bundle Checks

Comparing c4732ae against a863296.

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
2.8% Coverage on New Code (required ≥ 80%)
2 New Code Smells (required ≤ 1)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@RobinVncnt RobinVncnt merged commit dc1d4f3 into develop Mar 20, 2026
120 of 123 checks passed
@RobinVncnt RobinVncnt deleted the feat/lwd-icon-image-braze-action-banner-logic branch March 20, 2026 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

desktop Has changes in LLD mobile Has changes in LLM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants