Widget: a header menu with New conversation, Download transcript and a privacy link
Mantenedores costumam responder em até 1 dia
Avaliação
Esta issue ainda não foi avaliada.
Descrição
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.
- Linguagem predominante
- TypeScript
- Estrelas
- 13
- Forks
- 7
- Merge médio
- 3h 15min
- PRs com merge (30d)
- 330
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de codercops/chatcops
-
Widget: a code block tagged `c++`, `c#` or `objective-c` shows part of the tag as codeTalvez já em andamento @prakashNalla assumiu hoje. Abertabug widget
codercops/chatcops#578 · 2 comentários · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
Docs: Astro, Nuxt and SvelteKit guides for the serverTalvez já em andamento @anurag2787 assumiu hoje. Abertadocumentation
codercops/chatcops#575 · 2 comentários · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
Server: chatcopsNext(), one catch-all route for Next.jsTalvez já em andamento @Saifjafri212213 assumiu hoje. Abertaenhancement server
codercops/chatcops#574 · 2 comentários · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
@chatcops/react: a <ChatCops> component and useChatCops() hookTalvez já em andamento @Saifjafri212213 assumiu hoje. Abertaenhancement widget
codercops/chatcops#573 · 2 comentários · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 25/100
codercops/chatcops#546 · 5 comentários ·
Mantenedores costumam responder em até 1 dia
Todas as issues de codercops/chatcops
Issues semelhantes
-
area: cli bug flake ready-for-agent
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
gazetta-studio/gazetta-studio#1772 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
-
needs-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
microsoft/playwright#43875 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
documentation good first issue
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 1 dia
-
feature
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
calagopus/panel#285 · 1 comentário ·
Mantenedores costumam responder em até 1 dia