Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion TeXmacs/plugins/comment/progs/various/comment-menu.scm
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@
(dynamic (comment-color-menu type by val)))))

(tm-menu (focus-hidden-icons t)
(:require (any-comment-context? t)))
(:require (any-comment-context? t))
(dynamic (string-input-icon t 3)))

(tm-menu (focus-extra-icons t)
(:require (any-comment-context? t))
Expand Down
35 changes: 35 additions & 0 deletions devel/202_109.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# 202_109 Show name field in Comment plugin floating toolbar

### What
The `focus-hidden-icons` override for the Comment plugin had an empty body, which
suppressed all hidden child input widgets from the focus toolbar. Added
`(dynamic (string-input-icon t 3))` to show the author name (by) field at child
index 3, allowing users to modify the comment author name directly from the
floating toolbar.

### Why
The name (by field) of a comment could not be modified from the floating toolbar,
requiring users to use workarounds to change the comment author.

### How
In `TeXmacs/plugins/comment/progs/various/comment-menu.scm` (line 70-72), the
`focus-hidden-icons` menu for comments had an empty body that suppressed all
hidden child inputs from the toolbar. Added `(dynamic (string-input-icon t 3))`
to render the author name input widget:

```diff
(tm-menu (focus-hidden-icons t)
- (:require (any-comment-context? t)))
+ (:require (any-comment-context? t))
+ (dynamic (string-input-icon t 3)))
```

Child index 3 corresponds to the `by` (author name) field in the comment tag
structure: `(unique-id mirror-id type by time src body)`.

## How to test
1. Open Mogan and ensure the `comment` style package is loaded
2. Insert an unfolded comment via `Insert -> Note -> Unfolded comment`
3. Click on the comment so the focus toolbar appears at the top
4. Verify that a "By:" input field is now visible in the floating toolbar
5. Change the name in the input field and confirm the change is applied to the comment