Skip to content

Conversation

@skydoves
Copy link
Owner

@skydoves skydoves commented Jan 9, 2026

Add anchorParent and prevent measure for Constraints.Infinity (#920)

Summary by CodeRabbit

  • New Features
    • Added optional anchor parent customization for balloon composables, giving you control over where balloon content is anchored. Falls back to the default anchor point if not specified.

✏️ Tip: You can customize this high-level summary in your review settings.

@skydoves skydoves self-assigned this Jan 9, 2026
@skydoves skydoves merged commit 41ef710 into main Jan 9, 2026
4 of 5 checks passed
@skydoves skydoves deleted the fix/anchor-parent branch January 9, 2026 23:24
@coderabbitai
Copy link

coderabbitai bot commented Jan 9, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

The Modifier.balloon API has been extended with an optional anchorParent parameter to allow customization of the parent ViewGroup for the invisible anchor view. The implementation now dynamically determines the parent container, updating measurement and layout logic to handle unbounded constraints robustly.

Changes

Cohort / File(s) Summary
API Update
balloon-compose/api/balloon-compose.api
Public function signature updated to include new android.view.ViewGroup parameter in the balloon function, shifting parameter order while preserving return type and overall arity.
Implementation
balloon-compose/src/main/kotlin/com/skydoves/balloon/compose/BalloonModifier.kt
Added optional anchorParent parameter to Modifier.balloon function. Replaced decorView usage with dynamic parentView variable logic. Updated DisposableEffect dependencies and measurement constraints handling to accommodate the new parent view determination.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🎈 A flexible anchor finds its home,
No longer bound to decor's dome,
With parentView to guide the way,
Balloon composables dance and sway,
Layout logic blooms today! 🐰✨

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f6e634f and 038f7d4.

📒 Files selected for processing (2)
  • balloon-compose/api/balloon-compose.api
  • balloon-compose/src/main/kotlin/com/skydoves/balloon/compose/BalloonModifier.kt

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants