-
-
Notifications
You must be signed in to change notification settings - Fork 310
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
Fix the error in text.bounds
when there is no root canvas
#2543
Conversation
WalkthroughThe changes update the Text component's visibility logic by modifying the _isTextNoVisible method to include a check for the existence of the root canvas. Additionally, a new test case has been added to verify accurate bounding box calculations for the Text component when no canvas is provided and after adjusting the UI transform size. Changes
Sequence Diagram(s)sequenceDiagram
participant T as Text Component
T->>T: _isTextNoVisible()
alt Root Canvas Missing
T->>T: Return not visible
else Root Canvas Exists
alt OverflowMode is "Truncate" and size.y <= 0
T->>T: Return not visible
else
T->>T: Return visible
end
end
Suggested labels
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🔇 Additional comments (2)
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2543 +/- ##
==========================================
+ Coverage 68.53% 68.59% +0.05%
==========================================
Files 961 961
Lines 100222 100219 -3
Branches 8572 8595 +23
==========================================
+ Hits 68691 68743 +52
+ Misses 31271 31216 -55
Partials 260 260
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
What is the current behavior? (You can also link to an open issue here)
What is the new behavior (if this is a feature change)?
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
Other information:
Summary by CodeRabbit