Skip to content

feat: Add Raw/Preview Toggle to Markdown Export Panel#8101

Open
iRAFEEK wants to merge 2 commits into
JhaSourav07:mainfrom
iRAFEEK:feat/markdown-preview-toggle
Open

feat: Add Raw/Preview Toggle to Markdown Export Panel#8101
iRAFEEK wants to merge 2 commits into
JhaSourav07:mainfrom
iRAFEEK:feat/markdown-preview-toggle

Conversation

@iRAFEEK

@iRAFEEK iRAFEEK commented Jul 15, 2026

Copy link
Copy Markdown

Description

Adds a Raw / Preview toggle to the Markdown tab of the Export Panel, so users can verify the badge image renders correctly before copying the snippet to their GitHub README.

Fixes #7813

Note on the existing Live Preview: The page already has a Live Preview widget in the customization studio. The visual output is largely the same — both show the badge for your username. This toggle is a UX convenience scoped to the Export Panel itself: it lets users confirm the exact Markdown snippet URL renders correctly as a plain <img> (the way GitHub displays it in a README) without having to scroll back up to the Live Preview section.

Changes

  • Added viewMode state ('raw' | 'rendered') to ExportPanel.tsx
  • Rendered a pill-style Raw / Preview toggle button group, visible only when the Markdown tab is active
  • In Preview mode: extracts the image URL from the markdown snippet and renders it as <img>; falls back to a placeholder message if no username is set
  • Resets to Raw mode when switching export format tabs

Pillar

  • 🎨Pillar 1 — New Theme Design
  • 📐Pillar 2 — Geometric SVG Improvement
  • 🕐Pillar 3 — Timezone Logic Optimization
  • ⚡Other (Bug fix, refactoring, docs)

Visual Preview

image image image

Checklist before requesting a review:

  • I have performed a self-review of my code
  • I have tested the changes locally
  • My changes follow the project's existing code style

@retenta-bot

retenta-bot Bot commented Jul 15, 2026

Copy link
Copy Markdown

This PR adds a Raw/Preview toggle to the Markdown export tab, which is a great UX improvement for users verifying badge image rendering. It aligns with previous decisions made regarding enhancing user experience in the Export Panel. Please ensure to review the implementation thoroughly. Thank you for your contribution!

@retenta-bot retenta-bot Bot changed the title feat: add Raw/Preview toggle for Markdown export tab feat: Add Raw/Preview Toggle to Markdown Export Panel Jul 15, 2026
@vercel

vercel Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

@iRAFEEK is attempting to deploy a commit to the jhasourav07's projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

feat: Markdown Preview Toggle (Raw vs. Rendered)

1 participant