write-pr

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Writing pull requests

编写拉取请求(PR)

Standards for PR titles and descriptions in tldraw/tldraw.
tldraw/tldraw仓库中PR标题和描述的规范。

PR title

PR标题

Use semantic PR titles (Conventional Commits format):
<type>(<scope>): <description>
使用语义化PR标题(遵循Conventional Commits格式):
<type>(<scope>): <description>

Types

类型

  • feat
    - New feature
  • fix
    - Bug fix
  • docs
    - Documentation only
  • refactor
    - Code change that neither fixes a bug nor adds a feature
  • perf
    - Performance improvement
  • test
    - Adding or fixing tests
  • chore
    - Maintenance tasks
  • feat
    - 新功能
  • fix
    - 修复Bug
  • docs
    - 仅文档更新
  • refactor
    - 既不修复Bug也不添加功能的代码变更
  • perf
    - 性能优化
  • test
    - 添加或修复测试
  • chore
    - 维护任务

Scope (optional)

范围(可选)

A noun describing the affected area:
fix(editor):
,
feat(sync):
,
docs(examples):
描述受影响区域的名词:
fix(editor):
,
feat(sync):
,
docs(examples):

Examples

示例

  • feat(editor): add snap threshold configuration option
  • fix(arrows): correct binding behavior with rotated shapes
  • docs: update sync documentation
  • refactor(store): simplify migration system
  • feat(editor): add snap threshold configuration option
  • fix(arrows): correct binding behavior with rotated shapes
  • docs: update sync documentation
  • refactor(store): simplify migration system

PR body

PR正文

Use this template:
md
<description paragraph>
使用以下模板:
md
<description paragraph>

Change type

Change type

  • bugfix
    |
    improvement
    |
    feature
    |
    api
    |
    other
  • bugfix
    |
    improvement
    |
    feature
    |
    api
    |
    other

Test plan

Test plan

  1. Step to test...
  2. Another step...
  • Unit tests
  • End to end tests
  1. Step to test...
  2. Another step...
  • Unit tests
  • End to end tests

Release notes

Release notes

  • Brief description of changes for users
undefined
  • Brief description of changes for users
undefined

Description paragraph

描述段落

Start with: "In order to X, this PR does Y."
  • Keep it specific - avoid vague phrases like "improve user experience"
  • Link related issues in the first paragraph
  • Don't expect readers to also read the linked issue
以“为了X,本PR实现了Y。”开头。
  • 内容要具体 - 避免“提升用户体验”这类模糊表述
  • 在第一段中关联相关议题(Issue)
  • 不要假设读者会同时阅读关联的议题

Change type

变更类型

  • Tick exactly one type with
    [x]
  • Delete unticked items
  • [x]
    勾选恰好一个类型
  • 删除未勾选的选项

Test plan

测试计划

  • List manual testing steps if applicable
  • Remove the numbered list if changes cannot be manually tested
  • Tick checkboxes for included test types
  • 如有需要,列出手动测试步骤
  • 如果变更无法手动测试,移除编号列表
  • 勾选已包含的测试类型对应的复选框

Release notes

发布说明

  • Write brief notes describing user-facing changes
  • Use imperative mood: "Add...", "Fix...", "Remove..."
  • Omit this section entirely for internal work (CI, tooling, tests, etc.) that has no user-facing impact
  • 编写描述用户可见变更的简短说明
  • 使用祈使语气:“添加...”, “修复...”, “移除...”
  • 对于无用户可见影响的内部工作(如CI、工具、测试等),完全省略此部分

API changes section

API变更部分

Include when changes affect
api-report.md
:
md
undefined
当变更影响
api-report.md
时需要包含:
md
undefined

API changes

API changes

  • Added
    Editor.newMethod()
    for X
  • Breaking! Removed
    Editor.oldMethod()
  • Changed
    Editor.method()
    to accept optional
    options
    parameter
undefined
  • Added
    Editor.newMethod()
    for X
  • Breaking! Removed
    Editor.oldMethod()
  • Changed
    Editor.method()
    to accept optional
    options
    parameter
undefined

Related issues

相关议题

Search for and link relevant issues that this PR addresses.
搜索并关联本PR解决的相关议题。

Important

重要提示

  • Never include "Generated with Claude Code" unless the PR directly relates to Claude Code
  • Never use title case for descriptions - use sentence case
  • Never put yourself as co-author of any commits
  • Always include an API changes section if the PR has changes to any api-report.md
  • 除非PR直接与Claude Code相关,否则绝不要包含“Generated with Claude Code”
  • 描述部分绝不要使用标题大小写,使用句子大小写
  • 绝不要将自己列为任何提交的合著者
  • 如果PR对任何api-report.md有变更,务必包含API变更部分