Skip to content

feat(ngo-admin): preview the embed widget - #284

Merged
github-actions[bot] merged 1 commit into
StreamGive:mainfrom
Favourof:feat/embed-preview
Oct 18, 2026
Merged

github-actions[bot] merged 1 commit into
StreamGive:mainfrom
Favourof:feat/embed-preview

Conversation

@Favourof

Copy link
Copy Markdown
Contributor

Description

close #236.

Previously, EmbedSnippet allowed NGOs to select widget dimensions and copy the embed code, but they could not preview how the widget rendered at that size without pasting it into an external page.

This PR adds a live preview iframe directly adjacent to the snippet so NGOs can see real-time sizing adjustments.

Changes

  • Rendered an iframe preview alongside the embed snippet utilizing the active width and height.
  • Added title="Donate widget preview" for accessibility.
  • Styled preview container with responsive layout and border treatment consistent with the design system.
  • Added comprehensive unit tests in src/components/ngoAdmin/EmbedSnippet.test.tsx verifying:
    • Initial rendering with default dimensions.
    • Sizing updates when changing preset dimensions (Wide, Compact).
    • Sizing updates when custom width and height inputs are modified.

How to Test

  1. Run npx vitest run src/components/ngoAdmin/EmbedSnippet.test.tsx.
  2. Navigate to /ngo-admin with a verified NGO and inspect the embed snippet preview card.

@vercel

vercel Bot commented Oct 18, 2026

Copy link
Copy Markdown

@Favourof is attempting to deploy a commit to the Ashborne team Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Oct 18, 2026

Copy link
Copy Markdown

@Favourof Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@github-actions
github-actions Bot merged commit 6576a6d into StreamGive:main Oct 18, 2026
1 of 2 checks passed
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.

Show a live preview of the widget in the embed snippet

1 participant