Skip to content

Feat(host): 주최사 링크 추출 버튼 구현#324

Open
jisooooooooooo wants to merge 10 commits intodevelopfrom
feat/copy-btn/#323
Open

Feat(host): 주최사 링크 추출 버튼 구현#324
jisooooooooooo wants to merge 10 commits intodevelopfrom
feat/copy-btn/#323

Conversation

@jisooooooooooo
Copy link
Contributor

📌 Summary

#323

📚 Tasks

  • 주최사 링크 추출 버튼 구현

🔍 Describe

주최사 링크 추출 버튼 컴포넌트 구현

  • 주최사 공지 리스트 배너에 관객용 공지 링크를 복사할 수 있는 버튼을 추가했어요.
  • AddToWatchButton을 재사용하기 위해 아이콘, 텍스트를 변경할 수 있도록 수정했어요.
  • 버튼 클릭 시 링크가 복사되면서 토스트가 표시되도록 구현했어요.

👀 To Reviewer

  • 화면설계서 내용대로 해당 주최사 URL이 아니라 관객 뷰의 해당 공연 공지 리스트 링크가 복사되도록 연결했는데 이게 맞는지 확인 한 번 부탁드려욤 !

📸 Screenshot

2026-03-13.5.23.51.mov

@jisooooooooooo jisooooooooooo self-assigned this Mar 13, 2026
@jisooooooooooo jisooooooooooo requested a review from a team as a code owner March 13, 2026 08:26
@jisooooooooooo jisooooooooooo added 🐵 지수 ✨ Feature 새로운 기능 추가 labels Mar 13, 2026
@jisooooooooooo jisooooooooooo linked an issue Mar 13, 2026 that may be closed by this pull request
2 tasks
@coderabbitai
Copy link

coderabbitai bot commented Mar 13, 2026

📝 Walkthrough

Summary by CodeRabbit

릴리스 노트

  • New Features

    • 공지사항 페이지에 링크 복사 기능 추가 및 성공/실패 알림 제공
    • 새로운 복사 아이콘 UI 요소 추가
  • Refactor

    • 버튼 컴포넌트 개선 및 최적화
    • 공지사항 배너 버튼 UI 업데이트

Walkthrough

AddToWatchButton 컴포넌트를 ActionButton으로 대체하고 스타일링을 재구성합니다. 호스트 페이지에 알림 공유 링크 기능을 추가하며, 환경 변수에 AUDIENCE_BASE_URL을 등록하고 새로운 CopyIcon을 아이콘 라이브러리에 추가합니다.

Changes

Cohort / File(s) Summary
컴포넌트 재구성
packages/ads-ui/src/components/button/add-to-watch/add-to-watch.tsx, packages/ads-ui/src/components/button/add-to-watch/action-button.tsx, packages/ads-ui/src/components/button/add-to-watch/action-button.css.ts
AddToWatchButton 제거 및 ActionButton 신규 구현. 스타일 네이밍 변경(addToWatch → button), aria-pressed에서 data-selected/data-emphasized 속성으로 전환. emphasized 프롭 추가 및 children 렌더링 지원.
공개 API 업데이트
packages/ads-ui/src/components/index.ts, packages/ads-ui/src/icons/index.ts
ActionButton 내보내기로 변경(AddToWatchButton 제거). CopyIcon 신규 내보내기 추가.
페이지 기능 확장
apps/host/src/pages/notice-list/notice-list.tsx, apps/audience/src/pages/notice-list/notice-list.tsx
호스트: 클립보드 복사 기능 구현(handleCopyLink), 라우팅 경로 ENV.AUDIENCE_BASE_URL 기반으로 변경, 복사 버튼 UI 추가. 관람: ActionButton으로 대체 및 "관람 예정" 텍스트 추가.
환경 설정
packages/apis/src/constants/env.ts
AUDIENCE_BASE_URL 환경 변수 신규 추가.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 분

Suggested reviewers

  • eunkr82
  • jin-evergreen
  • Sohyunnnn
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 [type] 형식을 따르고 27자로 50자 이내 요구사항을 만족하며, 주최사 링크 추출 버튼 구현이라는 주요 변경 사항을 명확히 설명합니다.
Description check ✅ Passed PR 설명이 구현 내용(링크 복사 버튼 추가, AddToWatchButton 재사용 리팩토링, 토스트 표시)을 구체적으로 설명하고 있어 변경사항과 관련이 있습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

📝 Coding Plan
  • Generate coding plan for human review comments

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/host/src/pages/notice-list/notice-list.tsx`:
- Around line 67-75: The catch block in handleCopyLink swallows errors so users
get no feedback on copy failures; update handleCopyLink to catch the exception
from navigator.clipboard.writeText and call toast.show with an error message
(e.g., '링크 복사에 실패했습니다.') to mirror the success toast, and optionally log the
caught error for debugging (use the existing toast.show and any local logger if
available).

In `@packages/ads-ui/src/components/button/add-to-watch/add-to-watch.tsx`:
- Around line 27-30: The button is always rendering aria-pressed which misuses
ARIA for non-toggle actions; change the AddToWatch component so aria-pressed is
only added when the component is actually a toggle (e.g., when the selected prop
is provided/used or an explicit isToggle prop is true). Update the JSX that
currently sets aria-pressed={selected} (in add-to-watch.tsx / AddToWatch) to
conditionally include the attribute (only when selected !== undefined or
isToggle === true) and leave it out for non-toggle actions like copy-link so
downstream callers can omit selected.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 57819d86-fe86-4f91-969e-5d68c6d8ba5b

📥 Commits

Reviewing files that changed from the base of the PR and between 3c2b010 and 35053cb.

⛔ Files ignored due to path filters (1)
  • packages/ads-ui/src/icons/svgs/icn_copy.svg is excluded by !**/*.svg, !**/*.svg and included by packages/**/src/**
📒 Files selected for processing (5)
  • apps/audience/src/pages/notice-list/notice-list.tsx
  • apps/host/src/pages/notice-list/notice-list.tsx
  • packages/ads-ui/src/components/button/add-to-watch/add-to-watch.css.ts
  • packages/ads-ui/src/components/button/add-to-watch/add-to-watch.tsx
  • packages/ads-ui/src/icons/index.ts

Copy link
Contributor

@Sohyunnnn Sohyunnnn left a comment

Choose a reason for hiding this comment

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

수고많으셨습니다 👍
코멘트 몇 개 작성했는데 참고 부탁드립니다!!

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/ads-ui/src/components/button/add-to-watch/action-button.css.ts`:
- Line 5: Rename the generic style identifier `button` to a more descriptive
`actionButton` in the CSS module (update the exported constant name from
`button` to `actionButton`) and then update the corresponding component
`add-to-watch/action-button.tsx` to import and use the renamed `actionButton`
identifier (ensure any usages, className assignments or destructured imports
referencing `button` are replaced with `actionButton` and the export remains
default/ named consistent with the module).

In `@packages/ads-ui/src/components/index.ts`:
- Line 6: Restore a backward-compatible alias export so consumers can continue
using AddToWatchButton while encouraging migration to ActionButton: in the
components index module (where ActionButton is exported from
'./button/add-to-watch/action-button'), also export AddToWatchButton as a named
export that references the same default component (i.e., export AddToWatchButton
as an alias of ActionButton) and add a short deprecation comment; keep this
alias available for at least one release to allow gradual migration.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4b792dbe-81cf-43f9-928b-47c418917122

📥 Commits

Reviewing files that changed from the base of the PR and between 35053cb and 797fc5f.

📒 Files selected for processing (7)
  • apps/audience/src/pages/notice-list/notice-list.tsx
  • apps/host/src/pages/notice-list/notice-list.tsx
  • packages/ads-ui/src/components/button/add-to-watch/action-button.css.ts
  • packages/ads-ui/src/components/button/add-to-watch/action-button.tsx
  • packages/ads-ui/src/components/button/add-to-watch/add-to-watch.tsx
  • packages/ads-ui/src/components/index.ts
  • packages/apis/src/constants/env.ts
💤 Files with no reviewable changes (1)
  • packages/ads-ui/src/components/button/add-to-watch/add-to-watch.tsx

Copy link
Member

@jin-evergreen jin-evergreen left a comment

Choose a reason for hiding this comment

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

구현하시느라 고생하셨습니다~!!👍👍

Comment on lines +65 to +70
navigate(
ROUTE_PATH.NOTICE_DETAILS.replace(':eventId', String(eventId)).replace(
':noticeId',
String(noticeId),
),
);
Copy link
Member

Choose a reason for hiding this comment

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

지금 바로 수정할 수 있는 부분은 아니지만, 아래 PR에서 빌더를 만들어둬서 해당 PR이 머지되면 .replace를 사용하는 것보다 더 간단히 구현할 수 있을 것 같아요!

navigate(ROUTE_PATH.noticeDetails(eventId, noticeId));

이 부분은 추후에 천천히 반영하면 될 것 같습니다~!!😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ Feature 새로운 기능 추가 🐵 지수

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] 주최사 공연 링크 복사 컴포넌트 구현

3 participants