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 branch labels overlap when setting rotateCommitLabel to false in TB orientation #4972

Open
rennerom opened this issue Oct 20, 2023 · 6 comments
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@rennerom
Copy link

rennerom commented Oct 20, 2023

Description

When I set the rotateCommitLabel to false in a TB oriented gitGraph, branch names can start to overlap.

Steps to reproduce

  1. create a gitGraph in TB orientation
  2. set rotateCommitLabels to false
  3. add a few commits to main
  4. create a new branch with a semi-longer branch name
  5. observe branch name overlap

Screenshots

image

Code Sample

%%{init: {'logLevel': 'debug', 'gitGraph': {'rotateCommitLabel':false }} }%%
    gitGraph TB:
        commit
        commit
        commit
        branch a-little-bit-longer
        commit

Setup

  • Mermaid version: 10.5.0
  • Browser and Version: Chrome Version 118.0.5993.72 (Official Build) (64-bit)

Suggested Solutions

No response

Additional Context

No response

@rennerom rennerom added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Oct 20, 2023
@itsayopapi
Copy link

@rennerom Can you please assign this issue to me if it is still available

@rennerom
Copy link
Author

Hey @itsayopapi, I don’t have permissions to assign issues, unless I’m misinterpreting your request. Otherwise let me know how else I can help.

@itsayopapi
Copy link

@rennerom I mean is it still possible for me to work on this issue?

@rennerom
Copy link
Author

@itsayopapi yes, the issue occurs, I just can't physically assign an issue to another GitHub user.

Looking through the open issues I see that folks commonly requests issues so they can contribute to the project. But as I'm not a member of the mermaid-js org I think you'll have to wait until one of them picks it up and decides what to do with it.

Good luck!

@huynhicode
Copy link
Member

Hi all!

We do not assign issues but leave them open for anyone to work on them.

Please raise a PR when ready and reference this issue.

Let us know if you have any questions! Thanks in advance for your contributions!

@jgreywolf jgreywolf added include roadmap items to add to roadmap for auto workflow and removed include roadmap items to add to roadmap for auto workflow labels Nov 16, 2023
@Dev-Dipesh
Copy link

Dev-Dipesh commented Jul 25, 2024

Faced the same issue today. I was playing with git-graph for a non-git-related use case. In the end what helped me was to use Left-Right and not disable the rotation.

%%{init: {
    'logLevel': 'debug',
    'theme': 'base',
    'gitGraph': {
        'showBranches': true,
        'showCommitLabel':true,
        'mainBranchName': 'Customer',
        'rotateCommitLabel': true
    }
}}%%
gitGraph LR:
   commit id: "App Launch"
   commit id: "Due Update?" type: HIGHLIGHT
   branch "Update"
   commit id: "Forded Update?"
   commit id: "Optional Update Deferred?"
   commit id: "Upgrade Done?"
   merge Customer
   checkout Customer
   commit id: "UPI Only?" type: HIGHLIGHT
   branch "UPI"
   commit id: "Yes UPI Only"
   commit id: "Same Device & Sim?"
   commit id: "Yes same"
   branch "MPIN or Biometric Auth"
   checkout "MPIN or Biometric Auth"
   commit id: "Authenticate 1"
   checkout "UPI"
   commit id: "Not Same"
   branch "Re-enable API"
   commit id: "TBD"
   checkout "UPI"
   commit id: "Not UPI only"
   merge "MPIN or Biometric Auth"
   checkout "MPIN or Biometric Auth"
   commit id: "Authenticate 2"
   merge Customer
   checkout "Customer"
   commit id: "Account Status?" type: HIGHLIGHT
   branch "Mobile Lock"
   commit id: "Locked"
   branch "Error"
   commit id: "Journey Failed"
   checkout "Mobile Lock"
   commit id: "Not Locked"
   merge "Customer"
   checkout "Customer"
   commit id: "Check Device id" type: HIGHLIGHT
   branch "Device ID Check"
   commit id: "Device ID and Mobile Number matched"
   checkout Customer
   merge "Device ID Check"
   checkout "MPIN or Biometric Auth"
   commit id: "Authenticate 3"
   checkout Customer
   merge "MPIN or Biometric Auth" tag: "User Authenticated"
   checkout "Device ID Check"
   commit id: "Not matched"
   branch "Device Re-registration"
   commit id: "Initialise Device Registration"
%%{init: {
    'logLevel': 'debug',
    'theme': 'base',
    'gitGraph': {
        'showBranches': true,
        'showCommitLabel':true,
        'mainBranchName': 'Customer',
        'rotateCommitLabel': true
    }
}}%%
gitGraph LR:
   commit id: "App Launch"
   commit id: "Due Update?" type: HIGHLIGHT
   branch "Update"
   commit id: "Forded Update?"
   commit id: "Optional Update Deferred?"
   commit id: "Upgrade Done?"
   merge Customer
   checkout Customer
   commit id: "UPI Only?" type: HIGHLIGHT
   branch "UPI"
   commit id: "Yes UPI Only"
   commit id: "Same Device & Sim?"
   commit id: "Yes same"
   branch "MPIN or Biometric Auth"
   checkout "MPIN or Biometric Auth"
   commit id: "Authenticate 1"
   checkout "UPI"
   commit id: "Not Same"
   branch "Re-enable API"
   commit id: "TBD"
   checkout "UPI"
   commit id: "Not UPI only"
   merge "MPIN or Biometric Auth"
   checkout "MPIN or Biometric Auth"
   commit id: "Authenticate 2"
   merge Customer
   checkout "Customer"
   commit id: "Account Status?" type: HIGHLIGHT
   branch "Mobile Lock"
   commit id: "Locked"
   branch "Error"
   commit id: "Journey Failed"
   checkout "Mobile Lock"
   commit id: "Not Locked"
   merge "Customer"
   checkout "Customer"
   commit id: "Check Device id" type: HIGHLIGHT
   branch "Device ID Check"
   commit id: "Device ID and Mobile Number matched"
   checkout Customer
   merge "Device ID Check"
   checkout "MPIN or Biometric Auth"
   commit id: "Authenticate 3"
   checkout Customer
   merge "MPIN or Biometric Auth" tag: "User Authenticated"
   checkout "Device ID Check"
   commit id: "Not matched"
   branch "Device Re-registration"
   commit id: "Initialise Device Registration"
Loading

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

No branches or pull requests

5 participants