Skip to content

refactor(UI):Display the data returned by the file-changed page in ch…#1109

Merged
benjamin-747 merged 5 commits into
gitmono-dev:mainfrom
Ceron-CSS:main
Jun 11, 2025
Merged

refactor(UI):Display the data returned by the file-changed page in ch…#1109
benjamin-747 merged 5 commits into
gitmono-dev:mainfrom
Ceron-CSS:main

Conversation

@Ceron-CSS

Copy link
Copy Markdown
Contributor

No description provided.

@vercel

vercel Bot commented Jun 11, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mega ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 11, 2025 7:57am

This comment was marked as outdated.

This comment was marked as outdated.

@genedna
genedna requested a review from Copilot June 11, 2025 07:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the UI to display file change diffs with a new diff view while replacing the previous Diff2Html-based implementation. Key changes include:

  • Adding styles for the new diff view in _app.tsx.
  • Replacing the Diff2Html and FilesChanged components with a new FileDiff component in the merge request page.
  • Introducing new utility modules (parsedDiffs.ts and FileDiff.tsx) and updating dependencies in package.json.

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
moon/apps/web/pages/_app.tsx Added import for diff view CSS.
moon/apps/web/pages/[org]/mr/[id].tsx Updated diff rendering logic and removed unused diff callback.
moon/apps/web/package.json Added '@git-diff-view/react' dependency.
moon/apps/web/components/DiffView/parsedDiffs.ts New module for parsing diff content with a regex approach.
moon/apps/web/components/DiffView/FileDiff.tsx New FileDiff component for rendering diffs using the diff view library.
Files not reviewed (1)
  • moon/pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)

moon/apps/web/components/DiffView/FileDiff.tsx:5

  • [nitpick] Consider importing 'cn' from the public API of '@gitmono/ui' instead of directly from the internal 'src/utils' to improve encapsulation and ensure long-term stability.
import { cn } from '@gitmono/ui/src/utils'

Comment thread moon/apps/web/components/DiffView/parsedDiffs.ts Outdated
@benjamin-747
benjamin-747 added this pull request to the merge queue Jun 11, 2025
Merged via the queue into gitmono-dev:main with commit 62b7534 Jun 11, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants