Skip to content

Support multi-select polls#33105

Open
bxdxnn wants to merge 1 commit intoelement-hq:developfrom
bxdxnn:feat/polls-max-selections
Open

Support multi-select polls#33105
bxdxnn wants to merge 1 commit intoelement-hq:developfrom
bxdxnn:feat/polls-max-selections

Conversation

@bxdxnn
Copy link
Copy Markdown

@bxdxnn bxdxnn commented Apr 10, 2026

I'm not a JavaScript/Web dev, please note that this PR is fully written by an LLM.

element-hq/element-meta#2694
element-hq/element-x-android#6477

Checklist

@bxdxnn bxdxnn requested a review from a team as a code owner April 10, 2026 19:06
@bxdxnn bxdxnn requested review from dbkr and t3chguy April 10, 2026 19:06
@github-actions github-actions bot added the Z-Community-PR Issue is solved by a community member's PR label Apr 10, 2026
@bxdxnn bxdxnn changed the title max_selections support Support multi-select polls Apr 11, 2026
Copy link
Copy Markdown
Member

@t3chguy t3chguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this vary from #32681

Also needs test coverage

Comment thread apps/web/res/css/views/dialogs/_PollCreateDialog.pcss Outdated
Comment thread apps/web/res/css/views/dialogs/_PollCreateDialog.pcss Outdated
@bxdxnn
Copy link
Copy Markdown
Author

bxdxnn commented Apr 13, 2026

How does this vary from #32681

Sorry for duplicating the work, I didn't check if there was already a PR for this.

This implementation is more consistent with the Android's implementation by using +/- buttons. The other PR seems to be simply using a text input.

A summary from an LLM:

Key Implementation Differences:

  1. Max selections UI:

  2. Edge case handling:

  3. Poll voting logic (MPollBody.tsx):

  4. collectUserVotes function:

  5. CSS: Current branch adds new styles in _PollCreateDialog.pcss for the button-based UI

The current branch appears to be an evolution of the #32681 with improved UX (buttons vs input) and better handling of edge cases.

@t3chguy t3chguy requested a review from a team April 14, 2026 14:03
@t3chguy
Copy link
Copy Markdown
Member

t3chguy commented Apr 14, 2026

Needs design review, I suggest including some screenshots to make their lives easier

Comment thread apps/web/res/css/views/dialogs/_PollCreateDialog.pcss Outdated
@bxdxnn bxdxnn force-pushed the feat/polls-max-selections branch from 155da34 to f238963 Compare April 14, 2026 20:22
@mxandreas
Copy link
Copy Markdown
Contributor

I checked this out quickly.

From visual design perspective, it looks "good enough" (considering it is more important to have this option than how aesthetic the configuration looks), but perhaps the + and - buttons should not be that much apart. cc @americanrefugee .

From functional point of view - if I created a poll with 2+ responses, I could still only vote for one. It did not seem like it was working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-Enhancement Z-Community-PR Issue is solved by a community member's PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants