Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

Suggested questions as buttons in an empty chat

Fermée
#343 2 commentaires 0 réactions 1 personne assignée Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@srujankaleru2007 y travaille déjà.

Depuis le 26/10/2026.

  • #348 par @srujankaleru2007 — fusionnée

Évaluation

Cette issue n'a pas encore été évaluée.

Description

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.

Langage dominant
TypeScript
Étoiles
13
Forks
7
Merge moyen
3 h 29 min
PR mergées (30 j)
215

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de codercops/chatcops

Toutes les issues de codercops/chatcops

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.