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 support for multiple tags #3801

Open
sjackson0109 opened this issue Nov 14, 2022 · 5 comments
Open

GitGraph support for multiple tags #3801

sjackson0109 opened this issue Nov 14, 2022 · 5 comments
Labels
fosshack Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request

Comments

@sjackson0109
Copy link

sjackson0109 commented Nov 14, 2022

Proposal

Am trying to demonstrate practicing different diagrams to my coleagues for wiki via code repo, using markdown with mermaid support.

I stumbled across an issue trying to add multiple tags to a feature release.

Issue: CANNOT USE MULTIPLE TAGS

my code:

gitGraph
    commit id: "ZERO"
    branch develop
    commit id:"A"
    checkout main
    commit id:"ONE"
    checkout develop
    commit id:"B"
    checkout main
    merge develop id:"Release 1.0" type:HIGHLIGHT tag: "SAML v2.0" tag: "OpenID v1.1"
    commit id:"TWO"
    checkout develop
    commit id:"C"

As you can see before adding the string `tag: "OpenID v1.1" to line 10 above, the diagram rendered perfectly.. except for the second ta...

image

Error:

Error: Parse error on line 10: ...HT tag: "SAML v2.0" tag: "OpenID v1.1" -----------------------^ Expecting 'EOF', 'NL', ';', got 'COMMIT_TAG'

It would be amazing to use multiple tags, stacked vertically!

(note: GitHub, GitLab and Azure DevOps all support multiple tags)

Example

No response

Screenshots

No response

@sjackson0109 sjackson0109 added Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request labels Nov 14, 2022
@sjackson0109
Copy link
Author

Tried all this with no luck:

  • Comma-separated list, encapsulated in quotes
  • Comma-separated list, without quotes
  • Brace separated array
  • multiple tag statements

@mtilda
Copy link

mtilda commented Jan 23, 2023

I would very much like this feature! I don't have capacity to work on this right now, but I can see where I would start...

This function creates the commit object, which could be refactored to accept multiple tags:

export const commit = function (msg, id, type, tag) {

This code renders tags, which could be refactored to render multiple tags or support new-line characters in tag names:


I can see how it would get tricky to render a multiline tag, as it might cause visual problems. I think supporting multiple tags is the way to go here.


Another consideration: if there are multiple tags on a commit, should the vertical distance between branches change to avoid overlapping?

@NicolasCwy
Copy link
Contributor

NicolasCwy commented Feb 10, 2024

Hi @sidharthv96 wanted to check since you tagged this as fosshack, does this mean this issue is open to PRs?

Edit: Will be giving this a shot!

@NicolasCwy
Copy link
Contributor

@sidharthv96 From what I understand, I would have to amend the gitGraph.jison file to support multiple tag to be parsed is that correct? If you could link me to any guides on where I can learn this, the JISON repo seems quite dead and the linked BISON docs are dead too, I'm assuming this is based off BISON from GNU?

@sidharthv96
Copy link
Member

I don't have any documentations, apart from the jison/bison repos. The grammar seems to be standard bison for most part.

We are actually migrating away from jison due to many issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fosshack Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants