Widget: a header menu with New conversation, Download transcript and a privacy link
维护者通常 1 天内回复
评估
这个 Issue 还没有评估数据。
描述
F-05 task 19. The panel header has the name, the subtitle and a close button (packages/widget/src/dom/panel.ts:128-160). Visitors have no way to start over or keep a copy of the chat, though the widget can already do the first one: newConversation() exists (packages/widget/src/widget.ts:455), and so does its string, newConversation: 'New conversation' (packages/widget/src/i18n.ts:62), which nothing uses yet.
What to do
- Add a "More options" button (a
⋯icon inpackages/widget/src/dom/icons.ts) before the close button. It opens a small menu with:- New conversation: calls
newConversation(). - Download transcript: saves the visible conversation as a
.txtfile (who said it and the text, one message after another) through aBloband a temporary<a download>. No network request. - Privacy: a link that opens in a new tab. It's only shown when a new
privacyUrlconfig option is set (onlyhttps:andhttp:URLs).
- New conversation: calls
- Use the menu button pattern:
aria-haspopup="menu"andaria-expandedon the button,role="menu"androle="menuitem", arrow keys and Home/End to move, Enter/Space to pick, and Escape closes the menu only, putting focus back on the button. Escape now closes the popup, so the menu has to handle Escape first (the F-05 key table says Escape "closes that layer only"). - New strings in
WidgetLocaleStrings(English defaults; other languages fall back to them): the button label, "Download transcript" and "Privacy". - Use
--cc-surface-raisedfor the menu background, with logical CSS so RTL works.
Size
The panel is at 17.15 of 18 kB. If the menu doesn't fit, it can load on first open the way the pre-chat form does (its own chunk, with a 2 kB budget). Talk to me before raising a budget.
Acceptance criteria
- Unit tests: the menu opens and closes, keyboard navigation works, New conversation resets the log, the transcript file has the right text, and Privacy only shows with
privacyUrlset (and never for ajavascript:URL) - An e2e test for opening the menu with the keyboard and choosing New conversation, with the axe checks passing in light, dark and RTL
-
privacyUrldocumented inwebsite/src/content/docs/widget/configuration.mdxand the widget README (pnpm docs:checkpasses) - A minor changeset for
@chatcops/widget;pnpm test:coverage,pnpm lint,pnpm api(commit the snapshot change) andpnpm sizepass
Comment here to be assigned.
- 主要语言
- TypeScript
- 星标
- 13
- 派生
- 7
- 平均合并
- 3 小时 28 分钟
- 30 天内合并 PR
- 296
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
codercops/chatcops 的其他 Issue
-
Core README lists old default models可能已有人在做 @prakashNalla 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 90/100
codercops/chatcops#503 · 1 条评论 ·
维护者通常 1 天内回复
-
Widget: theme.tokens to set any color or size token, and the full token table in the docs可能已有人在做 @Sreehita-here 今天认领。 未关闭hacktoberfest
codercops/chatcops#500 · 2 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Widget: keep a message sent while offline, and send it when the connection is back可能已有人在做 @Saifjafri212213 今天认领。 未关闭hacktoberfest
codercops/chatcops#495 · 3 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Widget: copy a completed assistant reply可能已有人在做 @piyusshhjangid 于 1 天前认领。 未关闭hacktoberfest
codercops/chatcops#477 · 2 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Server: validate `rateLimit.windowMs` before creating the limiter可能已有人在做 @ashutoshpalhare 于 1 天前认领。 未关闭
codercops/chatcops#452 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 codercops/chatcops 的全部 Issue
相似的 Issue
-
check:passed streams:add
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
level2 nsoc26
难度 2/5 1-3 小时 新手友好度 82/100
GauravKarakoti/SecureFlow#1488 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
deltachat/deltachat-desktop#6914 ·
维护者通常 2 天内回复
-
area:cli bug P4
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
bug from-studio
难度 2/5 1-3 小时 新手友好度 65/100
esengine/DeepSeek-Reasonix#14868 ·
维护者通常 1 天内回复