Skip to content

[202_109] allow the comment author name to be modified directly from floating toolbar#2902

Open
1sh-repalto wants to merge 2 commits intoMoganLab:mainfrom
1sh-repalto:1sh-repalto/202_109/fix-comment-name-in-floating-toolbar
Open

[202_109] allow the comment author name to be modified directly from floating toolbar#2902
1sh-repalto wants to merge 2 commits intoMoganLab:mainfrom
1sh-repalto:1sh-repalto/202_109/fix-comment-name-in-floating-toolbar

Conversation

@1sh-repalto
Copy link
Contributor

Fixes #2714
In the Comment plugin, the name cannot be modified in the floating toolbar

Summary

Allow the comment author name (by field) to be modified directly from the floating toolbar by showing a text input widget

Developer document: devel/202_109.md

Issue Found

In comment-menu.scm, the focus-hidden-icons menu override for comment contexts had an empty body, which completely suppressed all hidden child input widgets from the focus toolbar. This prevented users from modifying the author name when clicking on a comment tag.

;; Before: empty body — no hidden child inputs shown
(tm-menu (focus-hidden-icons t)
  (:require (any-comment-context? t)))

Changes

Added (dynamic (string-input-icon t 3)) to the focus-hidden-icons override in TeXmacs/plugins/comment/progs/various/comment-menu.scm to render a text input widget for child index 3 (the by/author name field).

;; After: shows the author name input in the toolbar
(tm-menu (focus-hidden-icons t)
  (:require (any-comment-context? t))
  (dynamic (string-input-icon t 3)))

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
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Comment 插件在焦点工具栏无法修改人名

1 participant