Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Suggested questions as buttons in an empty chat

Chiusa
#343 2 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@srujankaleru2007 ci sta già lavorando.

Dal 26/10/2026.

  • #348 di @srujankaleru2007 — integrata

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

enhancement hacktoberfest widget

A new visitor opening the chat sees only the welcome message. A few suggested questions ("Compare plans", "Book a demo") help people start, and they're common in support widgets.

What to do

  • Add suggestions?: string[] to WidgetConfig.
  • When the conversation has no messages from the visitor yet, show them under the welcome message as a row of <button type="button">s, wrapped in a container with role="group" and an aria-label from a new locale string (suggestionsLabel: 'Suggested questions').
  • Clicking one sends its text as the visitor's message and removes the row.
  • Don't show them while the pre-chat form is up, and don't show them when a saved conversation is restored.
  • Document the option in configuration.mdx. No data-* attribute for now, since a list doesn't fit well in one.
  • Later, the server will be able to send suggestions as a suggestions part. That's not part of this issue, but keep the rendering in its own small function so it can be reused.

Where to look

  • packages/widget/src/widget.ts (WidgetConfig, showChatView, handleSend)
  • packages/widget/src/dom/messages.ts
  • packages/widget/src/i18n.ts

Acceptance criteria

  • Suggestions show in a new, empty chat, and not after the visitor sent something, over a restored conversation or with the pre-chat form open
  • Clicking one sends it and removes the row
  • They're real buttons in a labelled group
  • Tests for each case
  • Docs and a changeset for @chatcops/widget (minor, it adds an option)
  • pnpm test:coverage, pnpm lint and pnpm size pass

The chat panel (dist/chatcops.panel.js) has a 14 kB gzip budget and about 800 B of it is left, shared by several open issues. Keep the change small, and check pnpm size before you open the PR.

Lingua principale
TypeScript
Stelle
13
Fork
7
Merge medio
3h 39m
PR unite (30g)
275

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di codercops/chatcops

Tutte le issue di codercops/chatcops

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.