mirror of
https://github.com/google/blockly.git
synced 2026-04-29 16:40:13 +02:00
2.2 KiB
2.2 KiB
Code review guidelines
General principles
- Style: Suggest
npm run formatornpm run lint:fixfor formatting issues; do not comment on individual style nits. - Patterns: Enforce existing Blockly patterns and official docs over new conventions.
- Documentation: Prefer linking to Blockly Dev Docs over duplicating content in comments.
- TSDoc: Public APIs require TSDoc for behavior, params, and returns. Do not include implementation details or historical context unless essential.
Localization
- All user-visible strings must use
Blockly.Msg. - New strings must be added to
msg/messages.js,msg/json/qqq.json, andmsg/json/en.json. - Link this guide if strings are missing or misplaced.
- PRs that attempt to add translations for non-English strings should be redirected to TranslateWiki via the (translation guide).
Breaking changes
Policy
- A breaking change is any non-backwards-compatible change to public APIs, behavior, UI, or browser requirements.
- Avoid: Prefer deprecation with migration paths over removal.
- Compatibility: Must support Safari 15.4+, latest Chrome, and latest Firefox.
- Identification: Flag breaking changes unless all of the following are true:
- PR description explicitly notes it.
- Commit type includes
!(e.g.,feat!:). - Target branch is not
main.
Breaking
- Removing/renaming public methods, properties, or classes.
- Changing signatures or behavior of existing public methods.
- Adding required methods to public interfaces.
- New keyboard shortcuts or context menu items (potential developer conflicts).
- DOM restructures affecting external CSS/JS.
- Changes to build output/consumption (e.g., ESM-only).
- Changes that affect the output of serialization.
Non-breaking (do not flag)
- Additive changes (new methods/properties).
- Internal refactoring (including items marked
@internal). - Tooling/workflow changes.
- Changes to unreleased code (non-
mainfeature branches).