Skip to content

Add feedback for why users cant vote#74

Open
pikachu0542 wants to merge 7 commits intodevfrom
why-cant-i-vote
Open

Add feedback for why users cant vote#74
pikachu0542 wants to merge 7 commits intodevfrom
why-cant-i-vote

Conversation

@pikachu0542
Copy link
Member

@pikachu0542 pikachu0542 commented Feb 13, 2026

What

Add alerts that tell the user why they are unable to vote. Specifically, this adds:

  • An alert for if the user has already voted
  • An alert for if the user is not active or didnt meet gatekeep
  • An alert for if there was a database error

Why

When you cant vote in a poll, it just automatically redirects you to the results screen, without giving you any indicator of why you were sent to the results.

Test Plan

  • Create a poll without gatekeep and verify you can vote on it
    • Either be an active member or set the dev force active flag to test this
  • Create a poll with gatekeep and ensure you are allowed (either by meeting gatekeep or waived) and ensure you can vote
  • Create a poll with gatekeep where you dont meet gatekeep, ensure you cant vote and an appropriate alert is shown and is closable
    • If needed, test this by adding return 4 as the first line of canVote func
  • Ensure that you cannot vote in polls if you are not an active member and the appropriate alert displays and can be closed
    • Test this by putting return 3 as the first line of canVote function
  • Vote in a poll, then go back to that poll and ensure that the alert saying you already voted appears and is closable
  • Ensure that the appropriate alert appears and is closable if there is a database error
    • Simulate this by adding return 1 as the first line of canVote func

Env Vars

no changes

Checklist

  • Tested all changes locally

@pikachu0542 pikachu0542 self-assigned this Feb 13, 2026
@pikachu0542 pikachu0542 added the enhancement New feature or request label Feb 13, 2026
@pikachu0542 pikachu0542 linked an issue Feb 13, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Give feedback when you cannot vote

1 participant