fix(slides): detect image text occlusion#1984
Conversation
📝 WalkthroughWalkthroughThe XML overlap lint now models inline font sizes, text padding and alignment, image transparency, and image-text occlusion. Overflow behavior and regression tests were updated, while several whiteboard-specific tests and fixtures were removed. ChangesText overlap linting
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant SlideXML
participant lint_slide
participant OcclusionCheck
participant Issues
SlideXML->>lint_slide: extract ordered shapes and images
lint_slide->>OcclusionCheck: analyze image-text intersections
OcclusionCheck->>Issues: report occlusion diagnostics
Issues-->>lint_slide: return slide issues
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@skills/lark-slides/scripts/xml_text_overlap_lint.py`:
- Around line 694-696: Update estimate_text_line_count_for_text to calculate
usable width by subtracting element["paddingLeft"] and element["paddingRight"]
from element["width"], clamping the result to at least 1, and use that width
when computing wrapped line counts.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 2a237418-f60f-4f1c-8d57-5a30238ef98f
📒 Files selected for processing (2)
skills/lark-slides/scripts/xml_text_overlap_lint.pyskills/lark-slides/scripts/xml_text_overlap_lint_test.py
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@3906e50ad1014fb06c7f1091faa0875a13dc3033🧩 Skill updatenpx skills add larksuite/cli#feat/detect_image_conver_text -y -g |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1984 +/- ##
=======================================
Coverage 75.05% 75.05%
=======================================
Files 901 901
Lines 95391 95391
=======================================
Hits 71591 71591
Misses 18307 18307
Partials 5493 5493 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
Improve Slides XML linting to detect image layers that may occlude text content.
Changes
Testing
xml_text_overlap_lint_test.py.Summary by CodeRabbit
New Features
Bug Fixes
Tests