-
Notifications
You must be signed in to change notification settings - Fork 377
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
FR: Make node symbols in graphs configurable #3260
Comments
Support for this was added in #3263. I'm not sure if that means we should close and open a new bug about adding template support for the node (seems like something we want, right?) |
Templater support will help to colorize node symbols without adding too many options, yes. One problem we'll need to figure out is that the elided node has no template context (= |
After continuing work on #3234 I was thinking that it actually would be nice if users could configure any node symbol for any revset ( |
Oh, that has come up before but I had forgotten. I agree!
We talked on Discord a bit about templating the node symbol. I think it would be nice if one could e.g. To support revsets, I suppose we would add a new revset function. Maybe something like Maybe we should even allow templating the working copy differently? It's currently hard-coded as "@". The reason for that is of course that "@" has special meaning in revsets. But maybe we can still let users override the graph node if they really want to, hopefully after they've learned what the "@" symbol means. |
Maybe for elided nodes there should be their own template that would allow to style the text label On somewhat unrelated note:
Is this something that could be of interest? Is it doable in the current architecture? I imagine, configurable node symbols could fit nicely there with the graph position set in a template alias. There is another FR of mine (#3183) about allowing padding and truncation of "fields" in templates which if implemented, would allow to properly prepare "columns" to the left of the graph. |
Oh, that seems like a good idea! That avoids both the hacks for elided nodes and makes it possible to set the text, as you say.
Maybe :) I'm not convinced it's worth the added complexity (to the user and in the code).
I suppose the easiest solution would be to have separate templates for "left of graph" and "right of graph". The user would need to specify the width of the left side (or we can have templates for it and just let it get rendered uglily if the user doesn't specify a fixed-width template). The graphlog code gets a multi-line description and renders the graph and the descriptions together. We could write that to a buffer and split it up on newlines and combine it with the left side. |
Yeah, I agree, it's hard to justify the added complexity. |
I believe the FR is completed |
Is your feature request related to a problem? Please describe.
It would be nice to be able to customize the symbols in the
jj log
,jj obslog
, andjj op log
. One reason is that different users have different fonts installed, or maybe they use a font size where some symbols look too similar.Describe the solution you'd like
Maybe we can use templating to customize the graph symbols, so the user can choose a different graph symbol depending on anything related to the commit. Maybe they want a different symbol for hidden commits, for example.
Describe alternatives you've considered
Have a config value for each kind of symbol.
Additional context
Mentioned in #3111 (comment)
The text was updated successfully, but these errors were encountered: