Skip to content

renderdag: emit link_line for same-column named parents#1293

Closed
geraschenko wants to merge 2 commits into
facebook:mainfrom
geraschenko:anton/min_row_height_1
Closed

renderdag: emit link_line for same-column named parents#1293
geraschenko wants to merge 2 commits into
facebook:mainfrom
geraschenko:anton/min_row_height_1

Conversation

@geraschenko
Copy link
Copy Markdown
Contributor

@geraschenko geraschenko commented Apr 26, 2026

Fixes #1292

The actual fix is the 3-line change to eden/scm/lib/renderdag/src/render.rs. Everything else is adding a new test fixture (BASIC_DISCONNECTED) and test (basic_disconnected_min_row_height_1) which demonstrates the issue.

Before / After (box_drawing, min_row_height=1) for new BASIC_DISCONNECTED fixture (dag: "A B-C", heads ["A", "C"]):

Before:
o  C
o  B
o  A

After:
o  C
│
o  B
o  A

With `min_row_height(1)`, connected and disconnected same-column adjacent nodes render identically, with no `│` between connected nodes. See facebook#1292.

Before / After (box_drawing, min_row_height=1) for new `BASIC_DISCONNECTED` fixture (`dag: "A B-C"`, heads `["A", "C"]`):
```
Before:
o  C
o  B
o  A

After:
o  C
│
o  B
o  A
```
@meta-cla
Copy link
Copy Markdown

meta-cla Bot commented Apr 26, 2026

Hi @geraschenko!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@meta-cla
Copy link
Copy Markdown

meta-cla Bot commented Apr 26, 2026

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@meta-cla meta-cla Bot added the CLA Signed label Apr 26, 2026
@quark-zju
Copy link
Copy Markdown
Contributor

Hi, I think it's better to put a blank line instead adding an vertical edge:

o  C 
o  B

o  A

The format (no vertical lines) is inherited from hg's "experimental.graphshorten=True" feature, which uses this dense format:

  $ sl log -G -T '{rev}\n' --config 'experimental.graphshorten=True'
  @  9
  o  8
  │ o  7
  │ o  6
  ╭─┤
  │ o  5
  o │  4
  │ o  3
  o │  2
  ├─╯
  o  1
  o  0

Could you change it to use blank line?

@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented May 28, 2026

This pull request has been imported. If you are a Meta employee, you can view this in D106722405. (Because this pull request was imported automatically, there will not be any future comments.)

@geraschenko geraschenko force-pushed the anton/min_row_height_1 branch from 79d3490 to ce87558 Compare May 28, 2026 23:22
@facebook-github-tools
Copy link
Copy Markdown

@geraschenko has updated the pull request. You must reimport the pull request before landing.

@geraschenko
Copy link
Copy Markdown
Contributor Author

I've updated the PR based on the discussion on discord (starting at https://discord.com/channels/1042527964224557107/1042527965256364157/1509570566812598463). There are two modes for indicating disconnection, using either vertical space (default, a blank line is added when consecutive nodes in the same column are not connected) or horizontal space (when stagger_disconnected_nodes is true, consecutive disconnected nodes are not allowed to be in the same column).

@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented May 29, 2026

@quark-zju merged this pull request in 658d950.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

renderdag: same-column connected nodes indistinguishable from disconnected ones with min_row_height=1

2 participants