Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Widget: `data-welcome-bubble-delay="3s"` becomes a 3 ms delay

クローズ
#445 コメント 2 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@prakashNalla がすでに取り組んでいます。

2026年10月28日 から。

  • #450 @prakashNalla による — マージ済み

評価

この issue はまだ評価されていません。

説明

Which part?

@chatcops/widget

Package version

dev

What happened?

data-welcome-bubble-delay is read with parseInt(value, 10) in packages/widget/src/script-config.ts (line 44), and the loader uses it as bubble.delay ?? DEFAULT_BUBBLE_DELAY (packages/widget/src/loader/loader.ts, line 226). So a value that isn't plain milliseconds doesn't fall back to the 3000 ms default:

data-welcome-bubble-delay delay used
"3000" 3000 ms
"3s" 3 ms
"1.5s" 1 ms
"soon" NaN, and ?? keeps it, so the bubble shows at once

The other numeric attributes in the same file (data-auto-open, data-history-ttl-days) only accept /^\d+$/ and give undefined otherwise, so they fall back to their defaults.

What did you expect?

The same check as the other attributes: digits only become the delay, anything else is undefined and the 3000 ms default applies. The docs say the value is in ms.

How can we reproduce it?
<script src=".../chatcops.min.js" data-api-url="/api/chat" data-welcome-bubble="Need help?" data-welcome-bubble-delay="3s"></script>

The bubble shows almost immediately instead of after 3 seconds. parseInt("3s", 10) is 3.

Environment

Read from the code on dev and checked the parsing in Node 22

主要言語
TypeScript
スター
13
フォーク
7
平均マージ
3時間 39分
マージ済み PR(30日)
275

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

codercops/chatcops のほかの issue

codercops/chatcops の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。