Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow more than 4 choices on polls #172

Open
elboletaire opened this issue Jul 24, 2024 · 0 comments
Open

Allow more than 4 choices on polls #172

elboletaire opened this issue Jul 24, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@elboletaire
Copy link
Member

elboletaire commented Jul 24, 2024

This is a complicated issue and it requires adding pagination to our polls due to the farcaster limitation of 4 buttons.

Since we can only show 4 buttons on screen, allowing more than 4 choices forces us to use a button to get to the next page of choices. The first page could always show 3 choices (the 4th would be the next button); subsequent pages may have a maximum of two or three choices, depending on the total amount of choices. So if we have a poll with 6 choices, we'd have two different frames to render the choices:

Frame1:

  • Choice1
  • Choice2
  • Choice3
  • Next page

Frame2:

  • Previous page
  • Choice 4
  • Choice 5
  • Choice 6

If we have anything over 6 choices, note intermediate pages will require a "next" and "previous" buttons, limiting the total number of choices/buttons to two.

Note this limitation also limits what we're rendering on screen: the first frame would only show options A, B, C, while the second frame would be showing D, E and F options (both rendered and as butttons).

The changes are mostly backend changes, but the frontend will probably require changes too, since the letters are currently hardcoded based on the question index (and it's limited up to the letter F if I recall correctly).

Also, since we would not be limiting the maximum number of choices, in this flow scenario may be a good idea to have a "confirmation frame", showing you exactly the option you did chose with a confirm and a back button (i.e. You selected D: Choice 4, with the action buttons)

@elboletaire elboletaire added the enhancement New feature or request label Jul 24, 2024
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

No branches or pull requests

1 participant