-
Notifications
You must be signed in to change notification settings - Fork 12
Add PR review norms for the mobile team #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
shubham1g5
wants to merge
2
commits into
master
Choose a base branch
from
review_norms_mobile
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| # Mobile Team — PR Review Norms | ||
|
|
||
| > These norms were agreed on collaboratively by the team. The goal is to make reviews faster, more consistent, and less draining — without sacrificing code quality. | ||
|
|
||
| --- | ||
|
|
||
| ## Comment Labels | ||
|
|
||
| Use these prefixes to set expectations upfront so the author knows exactly what they're dealing with. | ||
|
|
||
| | Label | Meaning | | ||
| |---|---| | ||
| | **`Nit:`** | Small, nit-picky comment. Fine to merge without addressing. Reviewer is OK with the author resolving it on GitHub without making the corresponding change. | | ||
| | **`Blocking:`** | Must be addressed before merge. Reviewer feels strongly about this one. | | ||
| | *(no label)* | Default — somewhere in between. Use judgement. | | ||
|
|
||
| **Example:** | ||
| ``` | ||
| Nit: cboIt → comboItem, easier to read at a glance | ||
|
|
||
| Blocking: !! removed on topBarErrorViewController — we rely on fail-fast behaviour here, please revert | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## When to Raise a Comment | ||
|
|
||
| - **Pattern-level feedback → always raise it.** Structural issues (bad abstractions, duplicate utilities, unsafe null handling) compound over time and are worth the conversation. | ||
| - **Statement-level style → only if there's a concrete reason.** Ask yourself: would this genuinely confuse a future reader, or am I just preferring my own style? | ||
| - **Before leaving a nit, ask: does this actually matter?** If the answer is no, consider skipping it. | ||
| - **Would this still bother me a year down the line?** If not, it's probably a nit at most. | ||
|
|
||
| --- | ||
|
|
||
| ## How to Leave a Comment | ||
|
|
||
| - **If you're unsure, ask a question — don't make a demand.** `"What do you think about extracting this into a helper?"` lands better than `"Extract this into a helper"`. | ||
| - **One resolved reply is enough — don't escalate small things.** If the author gives a reasonable explanation, accept it and move on. | ||
| - **For complex disagreements, reach out directly.** A 5-minute call resolves what 10 back-and-forth comments can't. Don't let a PR thread become a debate. | ||
|
|
||
| --- | ||
|
|
||
| ## Things We've Agreed Are Worth Raising | ||
|
|
||
| These came up repeatedly in our PRs and the team agreed they're fair game regardless of label: | ||
|
|
||
| - **Naming clarity** — names that are too generic, abbreviated, or misleading (e.g. `cboIt` → `comboItem`) | ||
| - **Magic values** — hardcoded values that should reference named constants or colour resources | ||
| - **Repeated or inline logic** — copy-pasted blocks or complex lambdas that deserve a named method | ||
| - **Duplicate utilities** — if something already exists in the codebase, point it out | ||
| - **Null safety (`!!`)** — we use the fail-fast approach; removing `!!` without discussion should be flagged | ||
| - **TODO hygiene** — every TODO needs either a Jira ticket reference or a sentence explaining the deferral | ||
| - **strings.xml discipline** — only user-visible strings belong there | ||
|
|
||
| --- | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think these norms should be developer-agnostic (i.e. they should 100% apply to open source developers as well). Can we remove the mention of Jira tickets here in favor of just "a sentence explaining the deferral"?