Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Widget: a header menu with New conversation, Download transcript and a privacy link

未关闭
#496 4 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 1 天内回复

@anurag2787 已经在做这个了。

开始于 2026年10月30日。

  • #505 来自 @anurag2787 —— 未关闭

评估

这个 Issue 还没有评估数据。

描述

hacktoberfest

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 in packages/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 .txt file (who said it and the text, one message after another) through a Blob and a temporary <a download>. No network request.
    • Privacy: a link that opens in a new tab. It's only shown when a new privacyUrl config option is set (only https: and http: URLs).
  • Use the menu button pattern: aria-haspopup="menu" and aria-expanded on the button, role="menu" and role="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-raised for 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 privacyUrl set (and never for a javascript: 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
  • privacyUrl documented in website/src/content/docs/widget/configuration.mdx and the widget README (pnpm docs:check passes)
  • A minor changeset for @chatcops/widget; pnpm test:coverage, pnpm lint, pnpm api (commit the snapshot change) and pnpm size pass

Comment here to be assigned.

主要语言
TypeScript
星标
13
派生
7
平均合并
3 小时 28 分钟
30 天内合并 PR
296

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

codercops/chatcops 的其他 Issue

查看 codercops/chatcops 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。