feat(article): quote image generator with mobile bottom bar and license gate#5965
Closed
yingshinlee wants to merge 5 commits into
Closed
feat(article): quote image generator with mobile bottom bar and license gate#5965yingshinlee wants to merge 5 commits into
yingshinlee wants to merge 5 commits into
Conversation
Let readers select text in an article and generate a shareable quote
image (download as JPG / Web Share). Extends the existing
TextSelectionPopover with a second button next to "quote to comment".
- New component: src/components/QuoteImageDialog (Card / Content / presets / gql)
- 6 neutral color presets + 3 sizes (1:1, 4:5, 9:16) with platform hints
- auto font-scaling + 80-char cap so long selections never overflow
- QR code (qrcode) links back to the article; rendered via html-to-image
- 七日書 (WritingChallenge) articles automatically swap the Matters
wordmark for the seven-day-book logo (silent detection via campaigns)
- TextSelectionPopover: add icon-only "金句圖" button, thread article in
- ArticleDetail/Content + gql: pass article + spread QuoteImageArticle fragment
- analytics: register quote_image_* click events
- deps: html-to-image, qrcode (+ @types/qrcode)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- TextSelectionPopover: new variant='bottomBar' for mobile — fixed bottom action bar (Quote / Quote card) so it never fights with the iOS/Android native selection menu; selection detected via debounced selectionchange - mount bottomBar on ArticleDetail/Content under Media lessThan md (previously the feature was desktop-only) - license gate: hide quote-card button when article license is ARR (all rights reserved) unless the viewer is the author; CC licenses pass (card already quotes faithfully with author + link attribution) - add license to QuoteImageArticle fragment 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. |
- route.ts: add campaignDiscussion to CommentArgs.type union (shared fix: generated CommentType now includes campaignDiscussion from staging, which broke this branch's 4-value CommentArgs across Notice/Comment/History views) - QuoteImageDialog: remove dead closeDialog prop wiring - align formatjs ids, fix stylelint, extract i18n strings Verified locally on Node 22 against staging schema: gen:type + tsc + eslint + stylelint + prettier 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.
這是什麼
文章頁「金句卡片」功能(選取文字 → 生成可下載/分享的金句圖,含作者、文章標題與回原文 QR)。本分支共 4 個 commit:基礎功能+8 種風格 × 3 種尺寸+本次補完的手機入口與版權 gate。
互動原型(可先體驗 UX):https://yingshinlee.github.io/jinju-generator-prototype/
功能
selectionchange(手機沒有可靠的 mouseup)。版權 gate(本次新增)
文章授權為 ARR(作者保留所有權利)→ 隱藏「金句卡片」鈕,僅作者本人可用;CC 系列授權放行(卡片本身已忠實引用、標註作者、帶原文連結,屬引用而非改作)。
QuoteImageArticlefragment 新增license欄位。主要改動
src/components/QuoteImageDialog/(前次 commit)src/components/TextSelectionPopover/index.tsxvariant='popover' | 'bottomBar';版權 gate(ViewerContext+ArticleLicenseType.Arr)src/components/TextSelectionPopover/styles.module.csssrc/views/ArticleDetail/Content/index.tsx<Media lessThan="md">掛 bottomBar(原本桌機限定)package.json貢獻環境 node < 22,未跑生成步驟,CI typecheck 預期會紅:
QuoteImageArticleFragment等型別)。部署與 QA
Merge 進 develop 後先上測試站 https://matters.icu/ 驗收,確認後才隨 release 上正式站。建議 QA:
範圍外(後續)
「上牆」(Memo Wall 金句資料層)為下一階段,本 PR 的卡片僅下載/分享,不寫入任何資料。
🤖 Generated with Claude Code