jj icon indicating copy to clipboard operation
jj copied to clipboard

cli: use a different symbol for immutable nodes in log

Open zummenix opened this issue 1 year ago • 5 comments

This is a part of #3111. I've introduced a different symbol for immutable nodes. I'm not planning doing configurable node symbols in this PR (mentioned in the issue). And I'm not sure about coloring the commit id differently. I'm open to color suggestions :)

I didn't update tests because there are a lot of them failed and also to avoid opening a massive PR as a draft. I'll update them when the main part of the PR is resolved.

Here are some screenshots with different symbols I've tried:

diamond inside (PR) four pointed star
Screenshot 2024-03-06 at 22 26 27 Screenshot 2024-03-06 at 22 28 38
diamond · middle dot
Screenshot 2024-03-06 at 22 29 56 Screenshot 2024-03-06 at 22 31 09

Using jj log -r .. on the repo with revset-aliases.immutable_heads()="main@upstream | gh-pages@upstream" in the config.

While diamond symbols look great, with my vision I'd prefer or · because they are more distinct than the default node symbol.

Checklist

If applicable:

  • [ ] I have updated CHANGELOG.md
  • [ ] I have updated the documentation (README.md, docs/, demos/)
  • [ ] I have updated the config schema (cli/src/config-schema.json)
  • [ ] I have added tests to cover my changes

zummenix avatar Mar 06 '24 18:03 zummenix

Nice! FWIW, I much prefer BLACK FOUR POINTED STAR and DIAMOND over the other two; I think that MIDDLE DOT may not be good because the ASCII alternative, period, is already used period elsewhere in the DAG renderer, I think.

I would maybe also like to see some coloring on the node itself, but it may not be currently possible. It also may look bad. Either way I'm glad to see someone do this!

thoughtpolice avatar Mar 06 '24 18:03 thoughtpolice

I think the DIAMOND has the most contrast to the other symbols, and looks solid (immutable).

joyously avatar Mar 06 '24 18:03 joyously

I like 'diamond inside', it's stylistically similar to the circle of other commits yet different, and still carries some of the diamonds meaning of being solid/immutable (also gotta change the homework from git-branchless I guess haha).

Again (I will keep reminding about that xd) ideally we'd have it be configurable and discuss the default config, not the hardcoded symbols :)

necauqua avatar Mar 06 '24 22:03 necauqua

Again (I will keep reminding about that xd) ideally we'd have it be configurable and discuss the default config, not the hardcoded symbols :)

@necauqua I'm not particularly against configurable symbols, just don't want to do it here and so far I'm happy with the current choice :)

zummenix avatar Mar 07 '24 03:03 zummenix

My preferred symbol for immutable commits would be the diamond git-branchless uses. But landing any variant works for now.

PhilipMetzger avatar Mar 07 '24 21:03 PhilipMetzger

I'm closing this. There is a greater interest in using templating to customize the graph symbols (#3260). Additionally, I believe that in the long term, it would be more preferable. Thank you all for all your feedback!

zummenix avatar Mar 12 '24 15:03 zummenix