Commit Graph

7 Commits

Author SHA1 Message Date
sam e12716722a remove shape stuff 2026-05-11 14:49:11 +07:00
Chad Curtis 6f2b51197f Add option filter bars to poll voters modal with scrollable overflow and accent divider 2026-04-04 03:23:39 -05:00
Chad Curtis 00c801e9dc Add poll voter interactions, kind 1018 vote rendering, and DRY activity card refactor
Poll voters:
- Clickable voter avatar stack + vote count on polls (before and after voting)
- Voters modal showing each voter with avatar, name, option, and nevent link
- Extract VoterAvatarsButton to DRY the avatar stack pattern

Kind 1018 vote rendering:
- Register in PostDetailPage as compact activity card with parent poll ancestor
- Register in NoteCard with threaded + normal variants (user avatar, not icon)
- Register in CommentContext with Vote icon, 'a vote' label, and rich hover showing voter + option
- Extract usePollVoteLabel hook to DRY vote label resolution across 3 call sites

ActivityCard refactor:
- Extract shared ActivityCard and ActorRow from NoteCard
- Refactor reaction (kind 7), repost (kind 6/16), zap (kind 9735), and poll vote (kind 1018)
- Reuse ActivityCard in PostDetailPage for vote detail view
- Net ~250 line reduction in NoteCard
2026-04-04 03:09:20 -05:00
Chad Curtis 47e7d05cb9 Add poll voter avatars, voters modal, and kind 1018 vote detail view
- Show clickable voter avatar stack + vote count on polls (both before and after voting)
- Clicking opens a voters modal listing each voter with avatar, name, voted option, and link to their vote nevent
- Extract VoterAvatarsButton to DRY the avatar stack pattern
- Register kind 1018 in PostDetailPage so vote nevents render as compact activity cards (avatar + 'voted' + label)
- Parent poll appears as threaded ancestor above the vote card
- Use PostActionBar for vote detail action buttons
2026-04-04 02:42:19 -05:00
Alex Gleason d64b19ae1f Fix poll results not showing after voting until page refresh 2026-03-25 21:42:29 -05:00
Chad Curtis a8b8243868 Use NoteContent for rich text rendering in polls and fix word-break overflow 2026-02-19 17:10:23 -06:00
shakespeare.diy ff38bb14bc Render polls, geocaches, and color moments per their NIP specs
- PollContent (kind 1068 / NIP-88): Shows question, options with
  selectable vote UI, tallied results with percentage bars, poll type
  badge (single/multi), expiry status. Fetches kind 1018 vote events,
  deduplicates per pubkey, and allows voting when logged in.

- GeocacheContent (kind 37516 / NIP-GC): Shows cache name, type badge,
  size badge, D/T difficulty pips (1-5), description, image, and
  ROT13-decoded hint toggle. Supports verified cache indicator.

- ColorMomentContent (kind 3367 / Espy NIP): Renders color palettes
  with all 6 layout modes (horizontal, vertical, grid, star,
  checkerboard, diagonalStripes). Emoji overlay with adaptive
  light/dark text based on palette luminance. Click-to-copy hex
  swatches. Name display above palette.

- NoteCard now dispatches to the correct content component based on
  event.kind (1, 1068, 3367, 34236, 37516).

- Replaced VinesPage/useStreamVines with generic KindFeedPage/useStreamKind.
  All kind-specific routes (/vines, /polls, /treasures, /colors) use
  the same generic streaming page parameterized by kind number.

- Centralized extra-kind definitions in lib/extraKinds.ts. All feeds
  (home, search, profile, hashtag) respect feed settings for which
  extra kinds to include.

Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
2026-02-17 05:24:01 -06:00