-
-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request: define a user-level nomenclature that reflects what transient does from a user experience perspective #239
Comments
Yes, to lots of that. I am trying to take things a bit easy for a while and focus on important things in my live, see https://www.reddit.com/r/emacs/comments/11f7urf/thanks_for_your_support_and_patience/. Improving transient's documentation is something that will have to come later, but among the delayed work, it's one of the things I plan to tackle early when I return recharged. Also see the third-party resource mention on the first page of the manual. |
A major difficulty in writing an introduction for this package is that different users have vastly different levels of understanding and thus needs. The current description is being criticized as assuming too much prior understanding; while a future description will likely be perceived as way too verbose. (Edit: Another risk that comes with discussing everything in great detail upfront, is that that could lead to the impression of accidental complexity. I do not think that perception is/would be justified, the complexity is due to, and enables, the power and flexibility of the abstraction. But it certainly would be overwhelming to cover everything upfront. It is challenging to find the right balance between "lying for students/users" and describing every term and concept in great detail (and without assuming prior knowledge and reflection on similar concepts) as soon as it is first mentioned.) The current description was written with people in mind who already used the predecessor I.e., when it talks about prefix/infix/suffix commands, then it does this because it is important to understand that all these "things" are commands, and in what relation they stand to each other. In Obviously this should be rewritten now, but it isn't clear to me how to do that yet. Feedback can help--I will probably ask you to provide feedback on a draft or two. The current introduction begins with:
It is important to reflect on how these features are implemented at this point. Everything that follows depends on the reader understanding what those features do and how they are implemented. (Obviously I cannot expect that from every user of Transient/Magit, so this will have to be updated.) Speaking of feedback, please give it a try. Think about Emacs' "prefix commands/keys" and "prefix arguments" for a few minutes. Maybe even lookup the documentation. Then reread Transient's introduction. Does it make more sense now? Also, have you looked at the diagrams in "Comparison With Prefix Keys and Prefix Arguments"? Does the introduction make more sense after staring at those for a while?
I am afraid the answer to that is yes. E.g., "infix command" is precise; it describes that this is implemented as a command and "infix" means that it is invoked after the prefix command and before the suffix command. But it is assumes that reader makes a connection between Emacs' "prefix arguments" (implemented as commands) and Transient's "infix arguments" (also implemented as commands). "Modifier" on the other hand means everything and nothing. Finally, have you seen the link at the end of the description: https://github.com/positron-solutions/transient-showcase? Does that document make things clearer? I do intend to take inspiration from that. Ps: It might seem that I am too much focused on defending the existing documentation. That isn't my goal, I am aware it is no good, but writing this also helps me to reflect on how it could be improved and sharing those thoughts might or might not help others along the way. |
Hi Jonas, thanks for the detailed response. I'll do my best to add to it constructively. Reference to emacs documentation
Reference to other parts of the transient documentationThis ends up creating a bit of a catch-22 where I need to have read other parts of the transient documentation to read the introduction, which seems wrong. This being said, let's do it! Your requests for "look at X and see if it helps" -- it will be tricky for me to answer effectively, because I have now completed my own internal translation map to "menu", "modifier", and "command", so I will be exploring all of this as a completely theoretical comparison. Your best UX tests for this will come from folks who haven't built their own internal translation for what the manual means. Prefix keysA "prefix key" is basically any non-final key in a key chord.
Prefix argumentsA "prefix argument" is ... Actually called a "numeric argument" in the emacs documentation table of contents anyway.
it is what we do most often with So, in short:
I kind of imagine that maybe the first one is a transient prefix, and the second one is a transient infix, but then do you see how I'm confused when I try to figure out what a prefix is? Okay, so, moving on to your suggestion to go look at the comparison, in the transient documentation I discover MORE DOCUMENTATIONYou have links to emacs documentation here which I did not uncover when I searched the documentation that I opened! For reference, I opened this: https://www.gnu.org/software/emacs/manual/html_mono/emacs.html
Okay! This sentence is equally clear about the definition of a prefix key as the ones I found, but makes it more clear why you defined the "command that opens the menu" as a "prefix". I see that you actually referred to the Elisp manual, not the Emacs manual - I am looking at emacs as a user while you are looking at is as a coder, which is probably one of the first rifts in how we are looking at the world here.
Okay, well, again, looking at emacs through the lens of elisp vs the lens of a user changes what makes sense. Infix is precise, modifier means almost anythingFrom the Merriam Webster, "infix" means
So an infix is an affix
Now, at this point, it's getting pretty clear that you're not using "infix" under this lens, so you're using it under some other lens. I search the emacs lisp documentation for the word "infix" and I can only find "infix operator", by which I then suppose that, if So all of this leads me to a question: Where did you get the word "infix" from ? I can't figure it out and it is a large part of what confuses me to no end. I can't hang my thoughts on any mental model, so for me it's floating -- and "it's between the prefix and the suffix" doesn't help me because that doesn't give it meaning. "Modifier", on the other hand, which could mean anything, is at least a "thing" for my mental model to hang on to. A "modifier" modifies the executed command. Within the context of "a menu that pops up and lets you customize and execute a command", I think that, while "modifier" could mean almost anything, it ends up meaning just enough. Does the introduction make more sense after staring at those a while?No, unfortunately, because I think of the command loop as the place where I could call a Relative meanings?Maybe the difference here is one of absolutes. I don't believe that I need to define "absolutely new language" for transient, I think I need to define internally self-consistent language. As a car mechanic, I know what a wrench is, but I might ask for the tool that lets me remove the tire; asking for the wrench is the universal tool, and I need to know it's a wrench if I'm gonna work on more than just the tires, but if my only context is working on the tires, then the tool has such a restricted use that it's more useful to the context to define it within the context (hence : menu, command modifier, command). The internals of transient vs the externals of transientI think transient deserves a public-facing API that provides a clear and unambiguous context to its users. While I am clearly partial to the words it took me all of four seconds to come up with, I also gladly agree that they're probably not great :D I do think, however, that reserving a section of the documentation to the internal of transient would be very valuable (e.g. "under the hood, transient maps these keys to a keymap it creates for this specific menu", etc.) The special case of a command which is a menu (a suffix which is a prefix)This is of course not a special case at all, but I suspect we probably have to be able to pass state from one menu to the next, from one prefix to the next prefix through the suffix that summoned the prefix, along with of course whatever state was added by the infixes between the first prefix and the first suffix which set up the next prefix. Okay, I've been writing this for an hour and a half, my brain is dead, if I missed something, forgive me and please remind me of what it is you wanted me to reply to or explore that I didn't. And .... Please take care of yourself. |
Closing in favor of #127. |
I like transient. I think it's fantastic. I'm using it in one of my packages and proud to have it as a dependency.
(fallback request: please add a nomenclature page to the documentation so I can see all the new words I have to learn at once, instead of having to parse sentences with unknown words and have my brain forced to figure out a meaning when all the important words are words that don't have meaning for me)
(fallback-fallback request: create a new introduction that's an actual introduction to what transient does and rename the existing introduction to "lexicon ", or something like that)
This being said, every time I open the documentation, which ... isn't all that often, I have to relearn it, which, for me, is made more difficult by the language, which seems to be internal API language:
So basically reading documentation becomes a game of reading a sentence, making a list of the questions I need to answer in order to make sense of the sentence, and cycling through this until I can start popping the stack of questions to get back to what I was reading in the first place.
When I think about transient, I think of it in terms of:
So I think that, after reading the documentation for 15 minutes:
Of course this isn't perfect because everything can be defined in terms of everything else, so when I read something like:
I translate it to "I might be reading about modifiers and I might be reading about a function to be executed" and if this isn't correct, well, I need to read more documentation to correct it, but ....
Frankly, maybe I'm just stupid, but I think I shouldn't be struggling this much with understanding this many sentences of the documentation.
Hence my request.
So if I decided to rewrite the introduction with this new style of words, I would find something like this:
I think my translation is probably not perfect, but I think this makes it way easier to read and understand, without having to translate transient's internal language into what I want to do with it.
Anyway, thoughts? Would this kind of adjustment in the documentation break anything major and meaningful that I don't understand because, well, I don't understand the manual?
The text was updated successfully, but these errors were encountered: