Skip to content

feat(campaign): discussion polish — open to all + likes, button/layout/dialog refinements#5978

Merged
yingshinlee merged 11 commits into
developfrom
feat/discussion-form-and-collapse
Jun 17, 2026
Merged

feat(campaign): discussion polish — open to all + likes, button/layout/dialog refinements#5978
yingshinlee merged 11 commits into
developfrom
feat/discussion-form-and-collapse

Conversation

@yingshinlee

@yingshinlee yingshinlee commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

活動討論區整備上線(搭配 server#4859「開放登入者留言」已上 ICU)。base = develop

功能

  • 開放任何登入者留言(canComment = viewer.isAuthed,前後端一致)+ 留言點讚hasUpvote,圖示用既有留言區的愛心 IconLike/IconLikeFill,非三角形)
  • 每則留言 2 行收合,比照文章留言區「展開後不再收回」(expand-only);留言列表 max-height 捲動、隱藏捲軸,不擠壓下方參與者

UI / 排版打磨

  • 討論區入口鈕(手機):改成 Secondary 外框綠膠囊,與報名鈕(Apply/Button)外框狀態用同組 props;移除 💬 與
  • 討論區彈窗加寬small(375px) → design-system dialog medium(480px)≤sm 仍為全寬底部抽屜
  • 手機版頭部:移除重複的參與者 chip(InfoHeader 已有 avatar 列)、縮小封面→標題間距、補上按鈕間距
  • 右欄區塊分隔:討論區模組與參與者之間加 dashed 分隔線,顏色/樣式對齊文章列表分隔線(同 border-top-grey-light = #ddd dashed)
  • 討論區標題字級對齊「參與者」(text20);「展開」字級對齊留言內文;送出鈕移進輸入框內(CircleCommentForm 新增 inlineFooter 變體,圍爐眾聊不受影響)

i18n

  • 補上討論區/金句牆的繁簡中翻譯(原本 fallback 成英文);lang/*.json 進版,compiled-lang 由 build 時 npm run i18n 生成

依賴

測試狀態

  • ✅ CI:buildunit、Vercel 皆 pass;本機 tsc --noEmit
  • ✅ i18n 已在 Vercel preview 上實測為中文
  • ⚠️ 討論區在本機 next dev 不 renderssr:false + fresnel 的 dev 怪癖,與本 PR 無關),請一律在此 PR 的 Vercel preview 上驗收

yingshinlee and others added 2 commits June 17, 2026 20:29
…nt likes

- canComment relaxed to viewer.isAuthed (was: succeeded participant only); the
  server enforces the same rule. Drops the now-unused viewer-application query.
- enable upvote (like) on discussion comments (hasUpvote), in both the inline
  preview and the full dialog. Downvote stays off.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ne submit, i18n)

- comment content: collapse campaign-discussion comments to 2 lines with a
  proper 展開/收回 toggle (was 4 lines, expand-only) — campaignDiscussion only
- discussion preview: cap height (20rem) so a busy thread scrolls instead of
  pushing the participants list down the rail
- comment form: add an `inlineFooter` variant that places the submit inside the
  editor box; the campaign discussion uses it (circles unaffected)
- i18n: fill the zh-Hant / zh-Hans translations for the discussion + quote-wall
  strings that were still showing the English defaults

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@yingshinlee yingshinlee requested a review from a team as a code owner June 17, 2026 13:37
@vercel

vercel Bot commented Jun 17, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
matters-web Ready Ready Preview Jun 17, 2026 5:25pm

Request Review

…de scrollbars

- the campaign-discussion comment upvote now renders a heart (like) icon
  instead of the circle up-vote arrow (gated to campaignDiscussion only)
- shrink campaign-discussion comment text to 14px (was 15)
- hide the preview scrollbars and clip horizontal overflow so the comment list
  scrolls cleanly without visible bars

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Drop the per-comment collapse: campaign-discussion comments now clamp to 2
lines then expand-only (like article comments), via the rich expand path. This
also fixes the font mismatch between the clamped and expanded states (the
previous non-rich Truncate path rendered them at different sizes).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Pass the comment size down to Expandable so the rich "展開" button renders at
14px (the campaign-discussion comment size) instead of the larger default.
Gated to campaignDiscussion; other comment types unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Both are right-rail section titles at the same level, so bump 討論區 from 16px
to 20px to match 參與者 (SideParticipants).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
yingshinlee and others added 2 commits June 18, 2026 00:45
Replace the green-box chip (with 💬 and chevron) with a Secondary
outlined pill that mirrors the Apply button's outlined state, so the
discussion entry reads one clear level below the apply button.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ghten spacing

- remove the duplicate mobile participants chip (the avatar row inside
  InfoHeader already shows them)
- reduce the cover→title gap on mobile (sp24 → sp12; desktop keeps sp24)
- add spacing above the mobile discussion entry button so it no longer
  crowds the apply button above it

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The default Dialog is `small` (375px / fixedWidth), which crams avatars
and threaded comments. Switch the discussion dialog to fixedWidth={false}
and constrain its body to 480px on sm-up — the design-system dialog spec's
`medium` size. Below sm it remains a full-width bottom sheet.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ants

The discussion module and the participants section shared near-identical
titles with only a small gap, blurring the seam between two distinct aside
fields. Drop the existing HorizontalRule (dashed) between them on desktop,
with symmetric 16px breathing room above (discussion padding) and below
(participants margin-top).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ators

The HorizontalRule used --color-line-grey-light (8% black), noticeably
lighter than the article list's dashed #ddd separators. Replace it with a
dashed top border on the participants section using the same
border-top-grey-light (#ddd) mixin the List uses, so both rules match.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@yingshinlee yingshinlee changed the title feat(campaign): discussion polish — open to all, likes, 2-line clamp, inline submit, i18n feat(campaign): discussion polish — open to all + likes, button/layout/dialog refinements Jun 17, 2026
@yingshinlee yingshinlee merged commit 8fffb8f into develop Jun 17, 2026
4 checks passed
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.

1 participant