Apply option text limit to suggest poll option dialog#6446
Conversation
PR checklist ✅All required conditions are satisfied:
🎉 Great job! This PR is ready for review. |
SDK Size Comparison 📏
|
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThis PR adds input length validation to the poll option suggestion dialog. It imports ChangesPoll Option Input Validation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 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 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 |



Goal
Apply
PollsConfig.optionTextLimitto the "Suggest an option" dialog so the configured character limit is enforced there too, not only insideCreatePollDialogFragment.Implementation
SuggestPollOptionDialogFragmentnow installs anInputFilter.LengthFilteron the option input whenChatUI.pollsConfig.optionTextLimitis set and positive.Testing
ChatUI.pollsConfig = PollsConfig(optionTextLimit = 10), open a poll that allows suggesting options, tap "Suggest an option", and verify the input cannot exceed 10 characters.ChatUI.pollsConfigleft at its default (optionTextLimit = null), verify the input accepts arbitrarily long text as before.Summary by CodeRabbit