Skip to content

feat(UI): add label display in comments#1326

Merged
benjamin-747 merged 6 commits into
gitmono-dev:mainfrom
yumeowo:main
Aug 11, 2025
Merged

feat(UI): add label display in comments#1326
benjamin-747 merged 6 commits into
gitmono-dev:mainfrom
yumeowo:main

Conversation

@yumeowo

@yumeowo yumeowo commented Aug 11, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@vercel

vercel Bot commented Aug 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 Aug 11, 2025 6:45am

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 adds label display functionality to comments by implementing a new hook to fetch label data and updating the LabelItem component to parse and render labels within comment text.

  • Creates a new React Query mutation hook for fetching labels by ID
  • Updates the LabelItem component to parse label IDs from comment text and display them as styled badges
  • Replaces simple comment text display with a more complex layout that includes username, filtered comment text, and visual label badges

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
moon/apps/web/hooks/useGetLabelById.ts Creates a new hook using useMutation to fetch label data by ID
moon/apps/web/components/MrView/LabelItem.tsx Updates component to parse label IDs from comments and render them as styled badges

Comment thread moon/apps/web/hooks/useGetLabelById.ts
Comment thread moon/apps/web/components/MrView/LabelItem.tsx
Comment thread moon/apps/web/components/MrView/LabelItem.tsx
Comment thread moon/apps/web/components/MrView/LabelItem.tsx Outdated
Comment thread moon/apps/web/components/MrView/LabelItem.tsx Outdated
@benjamin-747
benjamin-747 added this pull request to the merge queue Aug 11, 2025
Merged via the queue into gitmono-dev:main with commit afb8a65 Aug 11, 2025
3 checks passed
@benjamin-747 benjamin-747 added this to the Web UI milestone Aug 11, 2025
@benjamin-747 benjamin-747 moved this to Done in Mega UI 重构 Aug 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants