Skip to content
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

Unclear difference between short direct and indirect lines in jj log graph #1252

Open
samueltardieu opened this issue Feb 14, 2023 · 3 comments
Labels
🐛bug Something isn't working

Comments

@samueltardieu
Copy link
Collaborator

samueltardieu commented Feb 14, 2023

In the repository available here, I was surprised by the difference in the output of the two jj log commands:

$ jj log -T 'change_id.shortest() " [" branches "] " commit_id.shortest()'
@  muuq [] fdc3
o          vtrk [] 079e
├─┬─┬─┬─╮
o │ │ │ │  nzun [issue-10331] e4e5
│ o │ │ │  yvls [issue-10304] 657e
├─╯ │ │ │
│   o │ │  mylus [issue-10339] 48a0
├───╯ │ │
│     o │  kloo [issue-10296*] c97d
├─────╯ │
│       o  lxxxv [issue-10241*] 9324
├───────╯
o  uoru [auto* master*] 6356
│
~
$ jj log -T 'change_id.shortest() " [" branches "] " commit_id.shortest()' -r master:issue-10304
o  yvls [issue-10304] 657e
o  qlnw [] e9d
o  nkqk [] 1fec
o  xwost [] c231
o  uoru [auto* master*] 6356
│
~

The first command makes it look like master is a parent of issue-10304, while the second one shows that this is not the case, there are three extra commits in the middle. The first output is confusing.

@samueltardieu samueltardieu added the 🐛bug Something isn't working label Feb 14, 2023
@martinvonz
Copy link
Owner

I don't know how we would present that more clearly. That little line segment (─╯) seems too short that coloring it differently would make it clear enough. I think part of the problem is also that the line then merges into the leftmost line, which is a direct line between nzun and uoru. Maybe we could decide not let direct/parent and indirect/ancestor edges share a line. I don't know how much that would complicate the graph, but maybe it's worth it. Maybe @markbt has thoughts? Has this come up at Meta?

@martinvonz
Copy link
Owner

Maybe this is also a good place to mention the related problem of making dashed lines clearer when they're a single row high. Maybe a different glyph or a different color would help there.

@joyously
Copy link

For accessibility reasons, relying on color to convey information is not a good idea (7% of men are red-green color blind).
Also, are there two sets of default colors, one for dark mode and one for light mode? I saw a question in another project about how the default colors were not legible in their terminal with their choice of a solarized color scheme.

@martinvonz martinvonz changed the title Confusing output Unclear difference between short direct and indirect lines in jj log graph Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants