MessageFeedback e ações da mensagem (copiar, avaliar)
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 56/100
- Issue 類型
- 功能
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- typescript
研究方向
Read packages/ui/src/lib/Button.svelte plus the existing CopyButton and Popover sources to copy their prop and a11y conventions; the grep quoted in the issue confirms no feedback component exists yet. Add MessageFeedback beside them with aria-pressed and arrow-key roving focus, and change CopyButton so a rejected clipboard promise yields denied and a polite 'Não foi possível copiar' status instead of the check mark, keeping touch targets at 44 px and focus-visible. Done means the three acceptance checkboxes pass in the library's test run and a manual keyboard pass.
由索引模型根據 Issue 內容生成。
描述
Versão: @codeatlasdev/ui 4.6.0 · código lido em main (950628f2) · classe: lacuna (migração do AC)
Problema
O AC depende deste comportamento hoje e a lib não o oferece. Sem ele, a migração perde qualidade no desktop, no mobile ou no PWA.
O que a lib já oferece (para não duplicar) e o que falta
Conferido com git grep -il "Feedback\|ThumbsUp" origin/main -- packages/ui/src/lib (950628f2): só ocorrências não relacionadas (Button.svelte, index.ts, theme/define.ts). Peças reaproveitáveis que existem: MessageBubble, VirtualList, ConversationItem, CodeSnippet (./code), CopyButton, Chip/ChipRow, Popover, Sheet, Spinner, toast.
Referência no AC
Caminhos do repo AC (repo privado, só caminho):
apps/seller/src/components/copilot/chat-message/assistant-message.tsx:26-30 (copiar: navigator.clipboard.writeText(content) sem await nem catch; mostra "copiado" mesmo se falhar), :36-60 (botão absoluto em -top-2 -right-2, reveal-on-hover).
Defeitos do AC (leitura do código, não executado): - assistant-message.tsx:27: falha de permissão do clipboard é engolida e o ícone de ✓ aparece.
- Não há avaliação (joinha) nem motivo. Feedback não existe no AC (lacuna, não regressão).
- Ação de copiar é só da IA. Pergunta do vendedor não tem copiar.
Proposta
<MessageFeedback value onchange> (grupo de dois botões com aria-pressed, opção de motivo) e copyToClipboard com resultado ok | denied para o CopyButton.
Critério de aceite (testável)
- Falha de copiar mostra "Não foi possível copiar" (status polite), sem ✓.
- Avaliar com teclado: Tab para o grupo, setas e Enter escolhem,
aria-pressedreflete. - Botões de ação com 44 px no toque e visíveis com foco (sem depender só de hover).
Mãe: #1089
- 主要語言
- TypeScript
- 星號
- 6
- 分支
- 3
- 平均合併
- 5 小時 21 分鐘
- 30 天內合併 PR
- 378
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
codeatlasdev/ui 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 84/100
codeatlasdev/ui#1340 ·
維護者通常 1 天內回覆
-
area:a11y area:components bug
難度 2/5 1-3 小時 新手友好度 76/100
codeatlasdev/ui#1336 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 77/100
codeatlasdev/ui#1329 ·
維護者通常 1 天內回覆
-
good first issue
難度 2/5 1-3 小時 新手友好度 74/100
codeatlasdev/ui#1292 · 1 則留言 ·
維護者通常 1 天內回覆
-
area:components enhancement good first issue
難度 2/5 1-3 小時 新手友好度 68/100
codeatlasdev/ui#1198 ·
維護者通常 1 天內回覆
相似的 Issue
-
bug frontend
難度 2/5 1-3 小時 新手友好度 85/100
CivicTechWR/accessible-housing-portal#578 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
nekko-labs/nekko-agent#2998 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 86/100
sandbox-quantum/switch#2163 ·
維護者通常 1 天內回覆
-
enhancement ux
難度 2/5 1-3 小時 新手友好度 72/100
lolimmlost/aidj#433 ·
維護者通常 1 天內回覆
-
test: ipcShownDialogKeys.test.tsx can fail the unit run with 'window is not defined' after it ends未關閉
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆