Polls #77

Closed
opened 2026-02-18 21:10:24 +00:00 by hodlbod · 2 comments
Owner

Add nostr polls as a content type alongside classifieds, threads, etc. This issue is mainly for designing how the poll card and detail page work.

Add nostr polls as a content type alongside classifieds, threads, etc. This issue is mainly for designing how the poll card and detail page work.
hodlbod added this to the Future milestone 2026-02-18 21:10:24 +00:00
hodlbod added the easy label 2026-04-01 17:19:12 +00:00
hodlbod removed this from the Future milestone 2026-04-02 18:57:08 +00:00
hodlbod added this to the Current milestone 2026-04-02 19:09:04 +00:00
hodlbod added design and removed easy labels 2026-04-02 19:09:11 +00:00
hodlbod changed title from Polls to Design Polls 2026-04-02 19:13:25 +00:00
hodlbod changed title from Design Polls to Polls 2026-04-02 19:24:53 +00:00
Contributor

Hi @hodlbod.

Since yesterday, I was trying to implemented this Polls option in accordance with this issue As of now, I've implemented initial Poll support for Flotilla as a first-class content type.

What I've done till now:

  • Added poll parsing and result helpers for NIP-88 poll events.
  • Added poll-specific rendering for full and minimal content views.
  • Added a poll detail page with live vote/result display.
  • Added a poll creation modal so users can publish polls from the compose menu.
  • Wired polls into shared content-kind routing, space navigation, recent activity, and sync paths.
  • Added poll response publishing support for voting.

Approach

I followed the same pattern used for threads, classifieds, goals, and calendar events:

  • treat polls as a closed content type with its own event kind
  • render them through dedicated components instead of generic note content
  • expose them in space navigation and recent activity
  • keep publish logic in the command layer, not inside UI components

NIP-88 behavior covered

  • Poll events use kind: 1068
  • Options are read from option tags
  • Poll type defaults to single choice and supports multiple choice
  • Poll end time is supported through endsAt
  • Votes are published as kind: 1018 poll response events referencing the poll event

Validation

  • Ran pnpm run check
  • Result: clean, with 0 errors and 0 warnings

If you want, I can also add poll editing support or improve the results view with per-option percentages and voter breakdowns.

Hi @hodlbod. Since yesterday, I was trying to implemented this Polls option in accordance with this issue As of now, I've implemented initial Poll support for Flotilla as a first-class content type. ### What I've done till now: - Added poll parsing and result helpers for NIP-88 poll events. - Added poll-specific rendering for full and minimal content views. - Added a poll detail page with live vote/result display. - Added a poll creation modal so users can publish polls from the compose menu. - Wired polls into shared content-kind routing, space navigation, recent activity, and sync paths. - Added poll response publishing support for voting. ### Approach I followed the same pattern used for threads, classifieds, goals, and calendar events: - treat polls as a closed content type with its own event kind - render them through dedicated components instead of generic note content - expose them in space navigation and recent activity - keep publish logic in the command layer, not inside UI components ### NIP-88 behavior covered - Poll events use `kind: 1068` - Options are read from `option` tags - Poll type defaults to single choice and supports multiple choice - Poll end time is supported through `endsAt` - Votes are published as `kind: 1018` poll response events referencing the poll event ### Validation - Ran `pnpm run check` - Result: clean, with 0 errors and 0 warnings If you want, I can also add poll editing support or improve the results view with per-option percentages and voter breakdowns.
hodlbod added this to the Spaces and Rooms project 2026-04-02 19:45:17 +00:00
Author
Owner

To anyone here because polls were the Summer of Bitcoin competency test, please feel free to choose any other issue of non-trivial size to work on. However, you can still open a PR for this one if you prefer (it just won't be merged).

To anyone here because polls were the Summer of Bitcoin competency test, please feel free to choose any other issue of non-trivial size to work on. However, you can still open a PR for this one if you prefer (it just won't be merged).
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: coracle/flotilla#77