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

Adding trapezoid and inverse trapezoid vertex options. #741

Merged
merged 6 commits into from
Jun 29, 2019

Conversation

adamwulf
Copy link
Contributor

I added new vertex types for the flowchart - a trapezoid and upside-down trapezoid.

screen shot 2018-10-10 at 2 30 18 am

The syntax for the new vertex is:

A [/[text here]\]
B [\[text here]/]

The syntax isn't great, I had initially wanted it to be A /text here\ but since the slashes are also part of punctuation and text it caused some issues when building the parser. Maybe there's better options though.

@coveralls
Copy link

coveralls commented Oct 10, 2018

Pull Request Test Coverage Report for Build 788

  • 57 of 137 (41.61%) changed or added relevant lines in 7 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.6%) to 52.276%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/diagrams/info/parser/info.js 4 6 66.67%
src/diagrams/flowchart/parser/flow.js 45 79 56.96%
src/diagrams/flowchart/flowRenderer.js 0 44 0.0%
Files with Coverage Reduction New Missed Lines %
src/diagrams/flowchart/parser/flow.js 2 59.69%
Totals Coverage Status
Change from base Build 786: -0.6%
Covered Lines: 2276
Relevant Lines: 4303

💛 - Coveralls

@knsv
Copy link
Collaborator

knsv commented Jun 25, 2019

Hi @adamwulf ! Thanks for this PR and I am sorry for the slow response. We are trying to expand the team to get a more steady pace. I think this PR is worthwhile and I would like to merge it but... there a few conflicts. If you take a pull from master and resolve the conflicts I would gladly merge.

One more thing though... It would make a shorter syntax with

A [/text here\]
B [\text here/]

instad of

A [/[text here]\]
B [\[text here]/]

Is there a reason for the use of [ ] in the vertex?

@adamwulf
Copy link
Contributor Author

Awesome! I'll look into fixing the conflicts and post back when done. For the syntax, I'll try and change that as well. The reason it for the brackets is that the slashes are also part of punctuation and text groups, so it caused some issues when building the parser. i'll try and come up with something cleaner, or maybe someone with better parser foo can point me in the right direction.

@adamwulf
Copy link
Contributor Author

Just pushed up the merged version. Also cleaned up the syntax to be [/text\] and [\text/]. Once i figured out the parser, i added parallelograms too :) [/text/] and [\text\]

Screen Shot 2019-06-25 at 11 13 19 PM

@knsv knsv merged commit 03abeac into mermaid-js:master Jun 29, 2019
knsv added a commit that referenced this pull request Jun 29, 2019
@knsv
Copy link
Collaborator

knsv commented Jun 29, 2019

Thx! I have now merged your contribution and trapezoids are now supported in mermaid. Could you also add some examples in the docs so that people will know how to use them?

@adamwulf
Copy link
Contributor Author

Just posted a pull request to mermaidjs/mermaid-gitbook#49 :)

@adamwulf adamwulf deleted the flow/trapezoid branch June 29, 2019 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants