feat(campaign): discussion board on campaign detail page#5964
Closed
yingshinlee wants to merge 2 commits into
Closed
feat(campaign): discussion board on campaign detail page#5964yingshinlee wants to merge 2 commits into
yingshinlee wants to merge 2 commits into
Conversation
- CampaignDetail/Discussion: compact module (desktop right aside) with input box + latest 3 comments + view-all dialog; mobile renders a one-line chip entry that opens the dialog - reuse CircleComment family: CircleCommentForm/Dialog accept campaignId and type campaignDiscussion; ReplyButton/DropdownActions resolve campaign node - 240-char cap with counter on campaign comments (matches moments) - layout: cover height halved (23.26% -> 12%), side participants avatars trimmed 60 -> 12 to make room for the discussion module Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@yingshinlee is attempting to deploy a commit to the DimensionDev Team on Vercel. A member of the Team first needs to authorize it. |
…arrowing
- add campaignDiscussion to CommentArgs.type union (route.ts) so the generated
CommentType (now including campaignDiscussion) is assignable
- drop broken Extract<…, { __typename: 'WritingChallenge' }> narrowing in
Discussion index/Dialog: campaign is generated as a single object with an
optional __typename, so Extract resolved to never and comment.id failed
- align formatjs message ids with content hashes; fix two stylelint errors
- extract i18n strings for the discussion module
Verified locally on Node 22 against staging schema:
gen:type + tsc --noEmit + eslint + stylelint all pass with 0 errors.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
這是什麼
寫作活動頁(
/e/<shortHash>)新增「留言區」討論板的前端。依賴後端 PR(thematters/matters-server 的feat/campaign-discussion,新增campaignDiscussion評論類型與WritingChallenge.discussion欄位),請先合後端。application { state }控制輸入框、後端最終把關)。entry="chip"),點開彈出完整留言對話框。useMediaQuery確保同時只渲染一份(避免表單 DOM id 重複)。Expandable收合。改動
src/views/CampaignDetail/Discussion/(新)index.tsx(精簡模組+chip 入口模式)、Dialog.tsx(完整討論串彈窗:分頁、回覆)、gql.ts、styles.module.csssrc/views/CampaignDetail/index.tsxForms/CircleCommentForm、Dialogs/CircleCommentFormDialogcircleId改 optional、新增campaignId;type 加campaignDiscussion;campaign 留言顯示0/240字數計CircleComment/FooterActions/ReplyButton、CircleComment/DropdownActionsnode加... on WritingChallenge { id },回覆/編輯傳回 campaignIdsrc/common/enums/MAX_CAMPAIGN_COMMENT_LENGTH = 240;COMMENT_TYPE_TEXT加 campaignDiscussionInfoHeader/styles.module.css);右欄參與者頭像上限 60 → 12(SideParticipants)貢獻環境 node < 22,以下生成步驟未跑,CI typecheck 預期會紅:
CampaignDiscussionCommentsQuery等型別(需後端 schema 先合)。建議 QA
範圍外(後續 PR)
InfoHeader 重構(標題壓封面、說明兩行收合,等新封面圖)、通知、檢舉、金句牆。
🤖 Generated with Claude Code