You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(usvgr): name the clip path and mask in the zero-sized element warnings - #22
The clip path and mask warnings now say which clip path or mask they are about, same as the filter one.
Before:
Clipping of zero-sized shapes is not allowed.
Masking of zero-sized shapes is not allowed.
After:
Clip path 'porthole' cannot be applied to a zero-sized element (it uses objectBoundingBox units). Skipped.
Mask 'fade' cannot be applied to a zero-sized element (its content uses objectBoundingBox units). Skipped.
Only the text changes. My test file renders the same picture as before.
All tests pass (cargo test --release, 1705 integration tests).
I used Claude Code to help investigate and draft this. I checked the before and after output and ran the tests on my machine.
Summary by CodeRabbit
Bug Fixes
Warnings for clip paths and masks that cannot be applied to zero-sized elements now identify the affected item and clarify that it was skipped.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Advanced
Run ID: 39f787f9-8501-45fa-94b3-221bbe19d9ee
📥 Commits
Reviewing files that changed from the base of the PR and between 0a18b63 and 416641b.
📒 Files selected for processing: 2
crates/usvgr/src/parser/clippath.rs
crates/usvgr/src/parser/mask.rs
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
📝 Walkthrough
Warnings for clip paths and masks that use objectBoundingBox units now identify the affected element when its bounding box is zero-sized. Both parsers keep their existing return behavior.
Changes: Zero-sized bounding-box warnings
Layer / File(s)
Summary
Update clip-path and mask warnings crates/usvgr/src/parser/clippath.rs, crates/usvgr/src/parser/mask.rs
The clip-path warning identifies the clip-path element and says it is skipped. The mask warning identifies the mask and says it cannot be applied. Both keep the existing return behavior.
This change makes skipped clip-path and mask warnings identify the affected element without changing rendering behavior. No actionable merge-blocking risk remains.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files.
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Title check
The title clearly and concisely describes the main change: naming the clip path and mask in zero-sized element warnings.
Description check
The description explains the motivation, shows the warning text changes, states that rendering behavior is unchanged, and reports successful tests. It also documents a meaningful improvement and does …
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
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.
Follow-up to #20.
The clip path and mask warnings now say which clip path or mask they are about, same as the filter one.
Before:
After:
Only the text changes. My test file renders the same picture as before.
All tests pass (
cargo test --release, 1705 integration tests).I used Claude Code to help investigate and draft this. I checked the before and after output and ran the tests on my machine.
Summary by CodeRabbit