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

GitGraph orientation example is broken in docs #4885

Closed
sneakers-the-rat opened this issue Sep 29, 2023 · 1 comment · Fixed by #4897
Closed

GitGraph orientation example is broken in docs #4885

sneakers-the-rat opened this issue Sep 29, 2023 · 1 comment · Fixed by #4897
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@sneakers-the-rat
Copy link

Description

In the documentation, the GitGraph Orientation example showing how to make a graph run TB (which is sort of confusing to me, since to me it seems like that should be LR) does not actually run TB

https://mermaid.js.org/syntax/gitgraph.html#orientation-v10-3-0

Steps to reproduce

Screenshots

Screen Shot 2023-09-28 at 5 17 59 PM

Code Sample

N/A

Setup

  • Mermaid version: Website! Can't tell!
  • Browser and Version: Firefox 118.0.1

Suggested Solutions

No response

Additional Context

No response

@sneakers-the-rat sneakers-the-rat added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Sep 29, 2023
@guypursey
Copy link
Contributor

The documentation is very confusing... I thought that actually every diagram except the one in your screenshot was the wrong way around.

LR (or leaving blank) means the branches should run from left to right like this:

gitGraph LR:
    commit
    branch develop
    checkout develop
    commit id:"hello"
    commit id:"world"
    checkout main
    commit
    cherry-pick id:"hello"
Loading

TB means they should run top to bottom, alongside each other like this:

gitGraph TB:
    commit
    branch develop
    checkout develop
    commit id:"hello"
    commit id:"world"
    checkout main
    commit
    cherry-pick id:"hello"
Loading

The words "lined horizontally" and "lined vertically" are confusing since they could be interpreted either way.

I'd be happy to update the wording in the documentation if I could work out why all the graphs are rendering in TB mode instead of just the one that's supposed to.

guypursey added a commit to guypursey/mermaid that referenced this issue Oct 3, 2023
Attempt to make the documentation around left-right and top-down orientation clearer than it currently is, addressing issue mermaid-js#4885.
guypursey added a commit to guypursey/mermaid that referenced this issue Oct 4, 2023
Attempt to make the documentation around left-right and top-down orientation clearer than it currently is, addressing issue mermaid-js#4885.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants