ADFA-3952 | Add dedicated text box for dropdown titles#1294
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
ChangesDropdown Widget Creation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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
`@cv-image-to-xml/src/main/java/org/appdevforall/codeonthego/computervision/domain/xml/WidgetFactory.kt`:
- Around line 58-63: The parsed attributes for the spinner can still contain
"android:text" from the original dropdown annotation, causing a duplicate title
when you clear box.text for the spinner; after computing baseParsedAttrs (from
parsedAttrsOverride or FuzzyAttributeParser.parse) remove the "android:text"
entry (e.g., baseParsedAttrs.remove("android:text")) before creating spinnerBox
and calling createSimpleWidget(spinnerBox, ...), so the spinner uses only the
cleared text field and not the inherited attribute.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: a2bfecb5-7f17-486c-bca9-a0f516bdb0d7
📒 Files selected for processing (1)
cv-image-to-xml/src/main/java/org/appdevforall/codeonthego/computervision/domain/xml/WidgetFactory.kt
Extract labels from dropdown boxes and render them as separate title widgets.
0d328ac to
c6a9416
Compare
Description
This PR fixes the issue where dropdown titles were missing in the generated XML. The logic now extracts text from boxes labeled as "dropdown", cleans up common UI arrow symbols, and creates a separate
TextViewwidget to serve as a title appearing immediately before the dropdown widget itself.Details
WidgetFactory.ktto replace single-widget creation with a list-based creation method (createWidgetsForBox).extractDropdownTitleusing regex to strip decorative characters (arrows, "v" markers) from the raw text.TextViewwith standard margins when a title is detected.Screen.Recording.2026-05-12.at.12.12.54.PM.mov
Ticket
ADFA-3952
Observation
The
createWidgetsForBoxmethod is designed to be extensible if other widget types require multi-part generation in the future. The title extraction includes a check to ensure the label "dropdown" itself isn't used as the title text.