docs(android): Consolidate snapshot annotation options into one table#18640
Open
runningcode wants to merge 1 commit into
Open
docs(android): Consolidate snapshot annotation options into one table#18640runningcode wants to merge 1 commit into
runningcode wants to merge 1 commit into
Conversation
The @Preview attributes, the @SentrySnapshot annotation, and the diffThreshold were documented across separate subsections, so there was no single place to see every option that shapes a snapshot. Replace the group/name/tags subsections with one reference table covering all @Preview attributes plus @SentrySnapshot's diffThreshold, including how each is recorded in the snapshot metadata. Also document two behaviors verified against the generated Paparazzi test: wallpaper is ignored during rendering, and backgroundColor affects rendering but isn't recorded in metadata. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
| Look at this example preview: | ||
| For example, this preview: | ||
|
|
||
| ```kotlin |
Contributor
There was a problem hiding this comment.
Bug: The description for diffThreshold is ambiguous, suggesting an inclusive threshold (>=) while the actual behavior is exclusive (>), creating an inconsistency with other documentation.
Severity: LOW
Suggested Fix
Update the description for diffThreshold to explicitly state that the share of changed pixels must be "greater than" or "exceed" the value to be reported as changed. This will align it with the actual behavior and other documentation.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: docs/platforms/android/snapshots/index.mdx#L252
Potential issue: The new documentation for `diffThreshold` describes it as the "Minimum
share of changed pixels...required to report," which implies an inclusive comparison
(>=). This contradicts the actual behavior and existing documentation across multiple
files, which state that a snapshot is reported as changed only when the share of changed
pixels "exceeds" or is "greater than" the threshold (>). This ambiguity could cause
users to misconfigure the threshold, expecting a change to be reported at the exact
threshold value when it will not be.
Did we get this right? 👍 / 👎 to inform future reviews.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
DESCRIBE YOUR PR
Consolidates the Android snapshot annotation docs into a single reference table. Previously the
@Previewattributes, the@SentrySnapshotannotation, anddiffThresholdwere documented across separate subsections (group,name, and a tag-mapping table), so there was no single place to see every option that shapes a snapshot.group/name/Tagssubsections with one "Preview Annotation Reference" table covering all 13@Previewattributes plus@SentrySnapshot'sdiffThresholdwallpaperis ignored during rendering, andbackgroundColoraffects rendering but isn't recorded in metadataIS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes:
🤖 Generated with Claude Code