Skip to content

Made moderateScale safe for Android#701

Merged
abhijithsheheer merged 2 commits into
mainfrom
fix-moderate-scale
Jun 18, 2026
Merged

Made moderateScale safe for Android#701
abhijithsheheer merged 2 commits into
mainfrom
fix-moderate-scale

Conversation

@abhijithsheheer

Copy link
Copy Markdown
Contributor

No description provided.

@abhijithsheheer abhijithsheheer self-assigned this Jun 18, 2026
@abhijithsheheer abhijithsheheer added frontend Deals with React/JS code majorly. It can also include UI fixes without the help of the UI team. patch Releases small requests or bug fixes. labels Jun 18, 2026

@neeto-bugwatch neeto-bugwatch Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 NeetoBugWatch Review

I've analyzed your pull request and found some potential improvements that might be worth considering. Please review the specific line comments below for helpful suggestions.

💡 To trigger a re-review of this PR, add a comment with neeto-bugwatch-run on its own line (not inside a code block or blockquote).

Note

Verdict: Observations - 1 comment worth a look, none blocking

Note: 1 low-severity finding were kept in metrics and not posted.

Click to copy prompt for AI agent
Verdict: comment

The following are code review comments from an AI reviewer that only has access
to the PR diff, not the full codebase. Treat every comment as a hypothesis,
not a fact. For each comment:

1. Investigate the verification questions against the full codebase first.
2. Go beyond the provided questions. Use your full codebase access to ask your
   own questions, check related code paths, and consider edge cases that the
   reviewer could not have seen from the diff alone.
3. Only implement the suggested fix if your investigation confirms the issue is real.
4. If the issue is not real, skip it entirely. Do not implement speculative fixes.

Prioritize by severity (critical > major > minor > trivial) and confidence score.
Only attend to comments with confidence below 0.5 if your investigation proves them valid.

[
  {
    "file_path": "src/utils/scale.js",
    "line_number": 4,
    "comment": "The new `moderateScale` utility introduces `Math.round`. While rounding to integers is generally safer for layout dimensions in React Native to avoid sub-pixel rendering artifacts (which can cause thin lines or unexpected gaps), it may cause slight visual regressions or 'jitter' in animations that previously relied on fractional values. Since this utility is now used globally across almost all components (Button, Input, Slider, etc.), it's important to ensure no critical UI layouts (like fixed-size grids or perfectly aligned icons) break due to the rounding logic.",
    "confidence": 0.9199999999999999,
    "severity": "minor",
    "suggested_fix": "Monitor UI components that use small scaling factors or rely on precise sub-pixel alignment. If specific components require non-rounded values, consider allowing an optional parameter to skip rounding or verify if `Math.floor` or `Math.ceil` would be more appropriate for specific layout constraints.",
    "verification_questions": [
      "Are there any existing snapshot tests that show a significant change in component dimensions?",
      "Does the rounding cause any visible 'shimmer' or 'jitter' in components using `moderateScale` during layout animations?",
      "Are there cases where a rounded value might resolve to 0 when a fractional value would have been non-zero (e.g., very small borders)?"
    ],
    "raw_confidence": 0.8,
    "specialists_agreeing": 2,
    "judge_decision": "keep"
  }
]

Comment thread src/utils/scale.js
@abhijithsheheer abhijithsheheer merged commit a242d58 into main Jun 18, 2026
@abhijithsheheer abhijithsheheer deleted the fix-moderate-scale branch June 18, 2026 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Deals with React/JS code majorly. It can also include UI fixes without the help of the UI team. patch Releases small requests or bug fixes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant