Subject: Re: bug#57113: 29.0.50; Confusing icon customization interface

From: Mauro Aranda <[email-masked]>
Date: Mon, 6 Nov 2023 08:12:06 -0300

Po Lu <[email-masked]> writes:

 > Do "M-x customize-icon RET outline-open RET".
 >
 > You will see the following interface:
 >
 > INS DEL List:
 >             Choice: Value Menu Colorful Emojis
 >             Repeat:
 >             INS DEL String: 🔽
 >             INS
 >             Plist:
 >             INS
 > INS DEL List:
 >             Choice: Value Menu Monochrome Symbols
 >             Repeat:
 >             INS DEL String:  ⯆
 >             INS
 >             Plist:
 >             INS
 > INS DEL List:
 >             Choice: Value Menu Text Only
 >             Repeat:
 >             INS DEL String:  close
 >             INS
 >             Plist:
 >             INS
 > INS
 >     State : STANDARD.
 >
 > How to use this interface is not clear at all.  What does the first
 > level labeled "repeat" mean?  Why does it have multiple items, when it
 > is intended to represent a single icon?  What does it mean if I click
 > "INS"?  And if I click "DEL"?
 >
 > Ignoring that, the individual items in the list are also badly
 > organized.  There is a menu of choices that seem to indicate the types
 > of the items in the value list (why it is a list is also unclear.)
 >
 > Unfortunately, there is no help text in the menu explaining what the
 > individual icons mean, or what to do with the text or plist fields field
 > provided underneath.  The fields also don't update in response to
 > changes to the type, which doesn't make sense unless selecting "Images"
 > will automagically transform an Emoji symbol into an image.
 >
 > The labels on the various fields should also be more informative than
 > "Repeat", "String" and "Plist"; those only tell you what the fields are,
 > and not what the fields do.

I tried to improve the tags for the custom-icon widget.  See the
attached patch.

I'm willing to work on this, so any feedback is appreaciated. Thanks.
From 168bb6380938b7e28116fdf3ec7429751b30484d Mon Sep 17 00:00:00 2001
From: Mauro Aranda <[email-masked]>
Date: Mon, 6 Nov 2023 08:04:41 -0300
Subject: [PATCH] Improve tags in custom-icon widget

* lisp/cus-edit.el (custom-icon-value-create): Give more informative
tags.  (Bug#57113)
---
 lisp/cus-edit.el | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 4b8de6b9468..bebb2f6f681 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -5477,12 +5477,22 @@ custom-icon-value-create
 	 (symbol (widget-get widget :value))
 	 (tag (widget-get widget :tag))
 	 (type '(repeat
-                 (list (choice (const :tag "Images" image)
+                 :tag "Specifications by type"
+                 (list :tag "Single specification"
+                       (choice :tag "Type"
+                               (const :tag "Images" image)
                                (const :tag "Colorful Emojis" emoji)
                                (const :tag "Monochrome Symbols" symbol)
                                (const :tag "Text Only" text))
-                       (repeat string)
-                       plist)))
+                       (repeat :tag "Alternatives"
+                               (string :tag "File or text"))
+                       (plist :tag "Extra properties"
+                              :key-type (choice
+                                         (const :tag "Face" :face)
+                                         (const :tag "Height" :height)
+                                         (const :tag "Width" :width)
+                                         (const :tag "Rotation" :rotation)
+                                         (symbol :tag "Key"))))))
 	 (prefix (widget-get widget :custom-prefix))
 	 (last (widget-get widget :custom-last))
 	 (style (widget-get widget :custom-style))
-- 
2.34.1