Commit dcf8f55
authored
Unify note actions across thread view and add poll support (#269)
* feat: unify note actions across thread view and add poll support
Create shared NoteActionBar component that composes existing action
primitives (NoteTotalLikes, NoteRepost, NoteTotalZaps, NoteTotalComments,
ZapModal) into one reusable bar with variant support.
Thread view changes:
- Main note, parent notes, replies, and nested replies all use
NoteActionBar — adds missing Repost and fixes Zap wiring
- Replace ThreadCommentActions with NoteActionBar throughout
- Move main note action bar outside flex justify-between wrapper
so dropdowns render correctly
- Remove page-level ZapModal and dead zapModal state
Poll support in thread view:
- Add PollDisplay rendering for kind 1068 events across all note
surfaces (main, parent, reply, nested reply)
- Change text-only poll layout from vertical stack to 2-column
grid for a compact, scannable quad layout
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: address Copilot review feedback on unified note actions
- Move PollDisplay out of <a> tag for parent notes so poll buttons
don't trigger navigation instead of voting
- Add kind 1068 to fetchParentThread kinds filter so poll parent
notes are actually fetched from relays
- Declare reactive variables (isCompact, isFull, iconWrapClass,
zapWrapClass) with explicit let before reactive assignment
- Handle zap-complete event from ZapModal with optimisticZapUpdate
+ fetchEngagement so zap totals update after modal zap
- Remove unused fetchEngagement import from [nip19] page1 parent 37db8d3 commit dcf8f55
File tree
4 files changed
+233
-66
lines changed- src
- components
- routes/[nip19]
4 files changed
+233
-66
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
231 | | - | |
232 | | - | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| 237 | + | |
237 | 238 | | |
238 | 239 | | |
239 | | - | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
240 | 245 | | |
241 | 246 | | |
242 | 247 | | |
| |||
245 | 250 | | |
246 | 251 | | |
247 | 252 | | |
248 | | - | |
| 253 | + | |
249 | 254 | | |
| 255 | + | |
250 | 256 | | |
251 | 257 | | |
252 | 258 | | |
253 | 259 | | |
254 | 260 | | |
| 261 | + | |
255 | 262 | | |
256 | 263 | | |
257 | 264 | | |
| |||
262 | 269 | | |
263 | 270 | | |
264 | 271 | | |
265 | | - | |
| 272 | + | |
266 | 273 | | |
267 | 274 | | |
268 | 275 | | |
| |||
514 | 521 | | |
515 | 522 | | |
516 | 523 | | |
517 | | - | |
| 524 | + | |
518 | 525 | | |
519 | 526 | | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
520 | 548 | | |
521 | 549 | | |
522 | 550 | | |
| 551 | + | |
523 | 552 | | |
524 | | - | |
| 553 | + | |
| 554 | + | |
525 | 555 | | |
526 | | - | |
527 | | - | |
528 | | - | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
529 | 559 | | |
530 | 560 | | |
531 | | - | |
| 561 | + | |
532 | 562 | | |
533 | 563 | | |
534 | | - | |
| 564 | + | |
| 565 | + | |
535 | 566 | | |
536 | 567 | | |
537 | 568 | | |
| |||
546 | 577 | | |
547 | 578 | | |
548 | 579 | | |
| 580 | + | |
549 | 581 | | |
550 | 582 | | |
551 | 583 | | |
552 | 584 | | |
553 | 585 | | |
554 | 586 | | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
555 | 592 | | |
556 | 593 | | |
557 | 594 | | |
| |||
583 | 620 | | |
584 | 621 | | |
585 | 622 | | |
586 | | - | |
587 | | - | |
588 | | - | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
589 | 629 | | |
| 630 | + | |
590 | 631 | | |
591 | 632 | | |
592 | 633 | | |
| |||
607 | 648 | | |
608 | 649 | | |
609 | 650 | | |
610 | | - | |
| 651 | + | |
| 652 | + | |
611 | 653 | | |
612 | 654 | | |
613 | 655 | | |
614 | 656 | | |
615 | 657 | | |
616 | 658 | | |
617 | 659 | | |
| 660 | + | |
| 661 | + | |
618 | 662 | | |
619 | 663 | | |
620 | 664 | | |
| |||
624 | 668 | | |
625 | 669 | | |
626 | 670 | | |
627 | | - | |
| 671 | + | |
628 | 672 | | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
629 | 682 | | |
630 | 683 | | |
0 commit comments