Skip to content

Dev#106

Merged
afsar-dev merged 4 commits intomainfrom
dev
Sep 8, 2025
Merged

Dev#106
afsar-dev merged 4 commits intomainfrom
dev

Conversation

@afsar-dev
Copy link
Owner

@afsar-dev afsar-dev commented Sep 8, 2025

Summary by CodeRabbit

  • New Features

    • Added a copy-to-clipboard button on docs pages with a menu to open the page in GitHub and popular AI tools (ChatGPT, Claude, Scira AI, T3 Chat).
    • Introduced new icons for improved visual consistency.
  • Style

    • Minor layout formatting cleanup with no functional changes.
  • Chores

    • Added a multi-stage Docker configuration to optimize production builds.
    • Introduced Docker ignore rules to reduce build context and image size.

@vercel
Copy link

vercel bot commented Sep 8, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
nurui Ready Ready Preview Comment Sep 8, 2025 5:20pm

@afsar-dev afsar-dev merged commit 52e59ad into main Sep 8, 2025
3 checks passed
@coderabbitai
Copy link

coderabbitai bot commented Sep 8, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Adds Docker support with a multi-stage Next.js Dockerfile and a .dockerignore. Introduces a CopyButton UI with external-open menu on docs pages, integrates it into the docs page route, and adds two SVG icon components. Includes a minor formatting change to the docs layout.

Changes

Cohort / File(s) Summary
Docker setup
Dockerfile, .dockerignore
New multi-stage Dockerfile (deps, builder, runner) for Next.js; adds .dockerignore excluding common build/context files.
Docs page integration
src/app/(docs)/docs/[slug]/page.tsx
Renders a CopyButton above compiled MDX: CopyPage receives raw MDX and slug.
UI CopyButton component
src/components/ui/CopyButton.tsx
New client component with “Copy Markdown” and dropdown to open page in GitHub/AI tools; clipboard copy, state handling, outside-click close.
Icon components
src/components/icons/ChatgptIcon.tsx, src/components/icons/SciraAiIcon.tsx
Adds SVG icon components with optional className; default exports.
Layout formatting
src/app/(docs)/docs/layout.tsx
Formatting-only: children on separate line inside main.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant DocsPage as Docs Page
  participant CopyButton as CopyButton (client)
  participant Clipboard as Clipboard API
  participant Window as Window

  User->>DocsPage: Open /docs/[slug]
  DocsPage->>CopyButton: Render with { text: rawMDX, slug }
  User->>CopyButton: Click "Copy Markdown"
  CopyButton->>Clipboard: navigator.clipboard.writeText(text)
  Clipboard-->>CopyButton: Promise resolved
  CopyButton-->>User: Show "Copied!" then revert

  User->>CopyButton: Click "Open"
  CopyButton-->>User: Show dropdown
  User->>CopyButton: Select destination (e.g., GitHub/ChatGPT/Scira/Claude/T3)
  CopyButton->>Window: window.open(computedURL, "_blank")

  Note over CopyButton: Click outside closes dropdown
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

A rabbit taps the docker drum—thump, thump, deploy!
Buttons bloom on docs—copy, click, enjoy.
New icons twinkle, SVG starlight bright,
Menus hop to chats in the velvet night.
With tidy layout lines aligned just so—
Ship it swift, and off we go! 🐇🚀


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 266a2b4 and 1f6a41a.

📒 Files selected for processing (7)
  • .dockerignore (1 hunks)
  • Dockerfile (1 hunks)
  • src/app/(docs)/docs/[slug]/page.tsx (2 hunks)
  • src/app/(docs)/docs/layout.tsx (1 hunks)
  • src/components/icons/ChatgptIcon.tsx (1 hunks)
  • src/components/icons/SciraAiIcon.tsx (1 hunks)
  • src/components/ui/CopyButton.tsx (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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