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

Widget: let the embed script load its display settings from our server

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
50/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
领域
api, backend

调研方向

Start by locating the embed script and the server-side widget/API routes; the payload does not name specific files or tests. Read the plan rules from merged issue #331 and the tracking issue #333, then trace how the script loads settings and how existing tests cover widget behavior. Done means the script safely falls back to defaults and the public lookup enforces server-side plan limits, caching, rate limits, and harmless handling of unknown or expired tokens, with tests and updated widget docs.

由索引模型根据 Issue 内容生成。

描述

enhancement help wanted

The problem today

The small script businesses paste on their site knows nothing about the business. It can't learn that a business wants a different window size or bubble color, because it never asks our server anything.

What to build

A small public lookup the script calls when it loads. It tells the script how this business wants the widget to look.

  • Returns display settings only (for example window size and bubble color). Never anything private.
  • Cached so the page isn't slowed down, and rate limited.
  • Which settings a business gets always follows their plan, decided on our server, never by what the install snippet says.
  • Until a business has chosen anything, it returns today's defaults, so existing installs keep working without re-pasting the snippet.

Done when

  • The script asks for its settings on load and falls back to today's look if the lookup fails or is slow
  • The lookup is cached, rate limited, and returns only display settings
  • An unknown or expired widget token gets a harmless default, not an error page
  • Tests cover defaults, plan-based limits, caching headers and the rate limit
  • The widget docs mention that display settings are read from the server

Depends on / related

  • #331 (plan rules) is merged. This is the base for window sizes and brand color; see the tracking issue #333.
主要语言
TypeScript
星标
16
派生
2
平均合并
6 小时 51 分钟
30 天内合并 PR
151

环境准备

从这里开始

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

answerLoops/answerLoops 的其他 Issue

查看 answerLoops/answerLoops 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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