Commit 7203869
Port v6 XML poll improvements to develop (#6468)
* Fix MessageListView rotation crash and custom messagesStart not being applied (#6438)
* Add configurable character limits and feature toggles for polls (#6435)
* Add configurable character limits and feature toggles for polls
Introduces PollsConfig to control poll feature availability and enforce character limits on questions and options. Poll features (multiple votes, anonymous voting, suggest options, add comments) can now be
hidden or preset with default values through ChatUI.pollsConfig or passed directly to CreatePollDialogFragment.
* addressing pr comments
* 1. Detekt - Fixed the MaxLineLength violation in PollsConfig.kt:23 by breaking the long comment line
2. Spotless - Applied formatting fixes (added license header to PollFeatureConfig.kt)
3. API Check - Regenerated the API dump file
* Update stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/feature/messages/composer/attachment/picker/poll/PollsConfig.kt
Co-authored-by: Gianmarco <47775302+gpunto@users.noreply.github.com>
* Apply suggestion from @gpunto
---------
Co-authored-by: Gianmarco <47775302+gpunto@users.noreply.github.com>
* Allow voters to suggest poll options in UI Components (#6439)
* Allow voters to suggest poll options in UI Components
* Use doAfterTextChanged
* Align Compose & XML option name trimming
* Apply optionTextLimit to suggest poll option dialog (#6446)
* Allow voters to add poll comments in UI Components (#6444)
* Allow voters to add poll comments in UI Components
* Add missing KDoc and default params
* Adjust poll comments commit to develop's APIs
- Use UiCommonR for stream_ui_poll_action_view_comments plural
- Update StateRegistry imports to client.api.state package
* Reformat
* Add default value to pollSuggestOptionTextStyle
* Init poll suggest option confirm button state from current input
* Validate poll text limits at PollsConfig construction
* Make SuggestPollOptionDialogFragment internal for consistency
* Reapply poll feature visibility on rotation in CreatePollDialogFragment
* Add MessageListViewModel test for suggesting a poll option
* Add CreatePollViewModel test for config propagation
---------
Co-authored-by: Ryan Hurst <106116154+ryanhurststrava@users.noreply.github.com>1 parent d103fc0 commit 7203869
36 files changed
Lines changed: 1840 additions & 17 deletions
File tree
- stream-chat-android-core/src/testFixtures/kotlin/io/getstream/chat/android
- stream-chat-android-ui-common
- api
- src
- main/kotlin/io/getstream/chat/android/ui/common/feature/messages/list
- test/kotlin/io/getstream/chat/android/ui/common/feature/messages/list
- stream-chat-android-ui-components
- api
- src
- main
- kotlin/io/getstream/chat/android/ui
- feature/messages
- composer/attachment/picker/poll
- list
- adapter
- viewholder/impl
- view
- internal
- internal/poll
- viewmodel/messages
- res
- layout
- values
- test/kotlin/io/getstream/chat/android/ui/viewmodels/messages
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
921 | 921 | | |
922 | 922 | | |
923 | 923 | | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
924 | 940 | | |
925 | 941 | | |
926 | 942 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
847 | 847 | | |
848 | 848 | | |
849 | 849 | | |
| 850 | + | |
850 | 851 | | |
851 | 852 | | |
852 | 853 | | |
| |||
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2433 | 2433 | | |
2434 | 2434 | | |
2435 | 2435 | | |
| 2436 | + | |
| 2437 | + | |
| 2438 | + | |
| 2439 | + | |
| 2440 | + | |
| 2441 | + | |
| 2442 | + | |
| 2443 | + | |
| 2444 | + | |
| 2445 | + | |
2436 | 2446 | | |
2437 | | - | |
| 2447 | + | |
2438 | 2448 | | |
2439 | 2449 | | |
2440 | 2450 | | |
| |||
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| 57 | + | |
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
| |||
1001 | 1003 | | |
1002 | 1004 | | |
1003 | 1005 | | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
1004 | 1021 | | |
1005 | 1022 | | |
1006 | 1023 | | |
| |||
1344 | 1361 | | |
1345 | 1362 | | |
1346 | 1363 | | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
1347 | 1368 | | |
1348 | 1369 | | |
1349 | 1370 | | |
| |||
0 commit comments