Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance MDX content features #26

Open
3 of 5 tasks
tyaga001 opened this issue Nov 18, 2024 · 1 comment
Open
3 of 5 tasks

Enhance MDX content features #26

tyaga001 opened this issue Nov 18, 2024 · 1 comment
Labels
enhancement New feature or request mdx

Comments

@tyaga001
Copy link
Owner

tyaga001 commented Nov 18, 2024

Overview

Improve our MDX implementation with better code snippets, interactive demos, and contextual components.

Features to Implement

1. Enhanced Code Snippets

  • Switch to Shiki for syntax highlighting
  • Add line highlighting
  • Copy button with animation
  • Line numbers toggle
  • Multiple language support

2. Interactive Demos

  • Create reusable demo wrapper component
  • Add controls system for demos
  • Implement state management for demos
  • Add reset functionality

3. Contextual Components

  • Add Smart Aside component with variants:
    • Info
    • Warning
    • Success
    • Error
  • Style cohesion between nested components

Technical Implementation

Code Snippet Component

interface CodeSnippetProps {
  code: string;
  language: string;
  highlightLines?: number[];
  showLineNumbers?: boolean;
  filename?: string;
}

Demo Component

interface DemoProps {
  defaultState: Record<string, any>;
  controls: Control[];
  children: React.ReactNode;
}

Acceptance Criteria

  • Shiki syntax highlighting works
  • Code snippets support all required languages
  • Demo component handles state correctly
  • Contextual components nest properly
  • Copy functionality works

Performance Requirements

  • Shiki highlighting at build time
  • Lazy loading for interactive components
  • Optimized bundle size

Resources

Priority: High

@tyaga001 tyaga001 added enhancement New feature or request mdx labels Nov 18, 2024
@tyaga001 tyaga001 changed the title Enhance MDX Content Features Enhance MDX content features Nov 18, 2024
@nirnejak
Copy link
Collaborator

nirnejak commented Jan 6, 2025

@tyaga001 These points can be removed since these are done in #58

  • Switch to Shiki for syntax highlighting
  • Add line highlighting
  • Copy button with animation
  • Multiple language support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request mdx
Projects
None yet
Development

No branches or pull requests

2 participants