Commit 4949b9e
Add node-specific "Add/View Comment" to game-tree node menu (#940)
Reworks PR #942 against the current architecture (post Electron 14->37
migration, PR #976). The original commits used setting.toggle(), which does
not exist on the renderer-side setting shims, so they were reverted and the
feature reimplemented here.
Per the PR discussion, the original global "Show Comments" toggle in the node
context menu (an out-of-place global action in a node-specific menu) is
replaced by a node-specific "Add/View Comment" item in the node menu's
Annotate submenu. Selecting it reveals the comment box (enabling Show
Comments mode, which aids feature discovery), navigates to the clicked node,
and enters edit mode with the comment field focused.
Also extracts getCommentMenuTemplate() (shared by the node menu's Annotate
submenu and the comment-box menu) and a focusCommentBox() helper (shared with
setMode), and toggles view.show_comments via setting.set/get directly.
Co-authored-by: Robert Christ <robert.christ@gmail.com>1 parent 2b1501e commit 4949b9e
1 file changed
Lines changed: 50 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
| 367 | + | |
373 | 368 | | |
374 | 369 | | |
375 | 370 | | |
376 | 371 | | |
377 | 372 | | |
378 | 373 | | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
379 | 402 | | |
380 | 403 | | |
381 | 404 | | |
| |||
2745 | 2768 | | |
2746 | 2769 | | |
2747 | 2770 | | |
| 2771 | + | |
| 2772 | + | |
2748 | 2773 | | |
2749 | 2774 | | |
2750 | 2775 | | |
| |||
2785 | 2810 | | |
2786 | 2811 | | |
2787 | 2812 | | |
| 2813 | + | |
| 2814 | + | |
| 2815 | + | |
| 2816 | + | |
| 2817 | + | |
| 2818 | + | |
| 2819 | + | |
| 2820 | + | |
| 2821 | + | |
| 2822 | + | |
| 2823 | + | |
| 2824 | + | |
2788 | 2825 | | |
2789 | 2826 | | |
2790 | 2827 | | |
2791 | 2828 | | |
2792 | 2829 | | |
2793 | 2830 | | |
| 2831 | + | |
| 2832 | + | |
| 2833 | + | |
| 2834 | + | |
| 2835 | + | |
| 2836 | + | |
2794 | 2837 | | |
2795 | 2838 | | |
2796 | 2839 | | |
| |||
2874 | 2917 | | |
2875 | 2918 | | |
2876 | 2919 | | |
2877 | | - | |
| 2920 | + | |
2878 | 2921 | | |
2879 | 2922 | | |
2880 | 2923 | | |
| |||
0 commit comments