Skip to content

fix(proposals): show duplicate banner in preview by rendering description as Markdown#110

Merged
r4topunk merged 2 commits into
r4topunk:mainfrom
mtlouzada:fix/proposal-preview-markdown
May 28, 2026
Merged

fix(proposals): show duplicate banner in preview by rendering description as Markdown#110
r4topunk merged 2 commits into
r4topunk:mainfrom
mtlouzada:fix/proposal-preview-markdown

Conversation

@mtlouzada

Copy link
Copy Markdown
Contributor

Summary

  • Replace plain text split("\n\n") with <Markdown> in ProposalPreview so the preview renders identically to the published proposal detail page
  • If the user accidentally pastes the banner image into the description, they will see it duplicated in the preview and can fix it before submitting

Changes

  • src/components/proposals/ProposalPreview.tsx — swap split("\n\n") for <Markdown> component

Test plan

  • Create a proposal with a banner image selected
  • Paste ![banner](url) into the description field
  • Go to preview — banner should appear twice, user can correct before submitting
  • Create a proposal without duplicating the banner — preview shows correctly

Generated with Claude Code

…tion as Markdown

Replace plain text split with <Markdown> in ProposalPreview so the preview
renders identically to the published proposal detail page. If the user
accidentally pastes the banner image into the description, they will see
it duplicated in the preview and can fix it before submitting.
@vercel

vercel Bot commented May 28, 2026

Copy link
Copy Markdown

@mtlouzada is attempting to deploy a commit to the r4to's projects Team on Vercel.

A member of the Team first needs to authorize it.

The preview wrapped <Markdown> in an extra `prose prose-gray max-w-none`
div, but Markdown already renders its own `prose prose-neutral
dark:prose-invert` container. This nested two prose contexts and applied
a light-only palette over a dark-aware one. Remove the wrapper so the
preview renders through a single prose context — matching
ProposalDescriptionCard on the published proposal page.

Verified in the running app: markdown (headings, links, images, lists,
tables) renders identically, nested prose eliminated (2 -> 1 wrapper),
and malicious description input stays sanitized (no script/onerror/js:).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@r4topunk r4topunk merged commit 54edadc into r4topunk:main May 28, 2026
1 of 3 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.

2 participants