Extension talk:Mermaid

Jump to navigation Jump to search

About this board

Mediawiki 1.35 with mermaid 3.0.0 displays blank page

2
Ahmad.enisyst (talkcontribs)

I am running MW 1.35 and installed Mermaid 3.0.0 and used the following syntax from example, A blank page is rendered, i also tried using the dev-master instead of 3.0.0 still nothing, i tried version 2.2.0, and then there is just a loading gif :

{{#mermaid:sequenceDiagram participant Alice participant Bob

 Alice->John: Hello John, how are you?
 loop Healthcheck
      John->John: Fight against hypochondria
 end
 Note right of John: Rational thoughts 
prevail...
   John-->Alice: Great!
   John->Bob: How about you?
   Bob-->John: Jolly good!

}}

Frosty9191 (talkcontribs)

I'm getting the same issue, lots of loading gifs and blanks.

Reply to "Mediawiki 1.35 with mermaid 3.0.0 displays blank page"

Getting "...\mediawiki\extensions\Mermaid\src\ServiceWiring.php: Class 'Mermaid\Config' not found"

2
Javier.Farachi (talkcontribs)

HI! After installing Mermaid extension, tried include this in a page:


{{#mermaid:sequenceDiagram participant Alice participant Bob

 Alice->John: Hello John, how are you?
 loop Healthcheck
      John->John: Fight against hypochondria
 end
 Note right of John: Rational thoughts 
prevail...
   John-->Alice: Great!
   John->Bob: How about you?
   Bob-->John: Jolly good!

}}


and get this error:

[3f6e033d4535e9168d66d42b] /index.php?title=...&action=submit Error from line 35 of ...\mediawiki\extensions\Mermaid\src\ServiceWiring.php: Class 'Mermaid\Config' not found


Thanks in advance! :)

Javi

TheTomFinke (talkcontribs)

Probably the wrong and naive approach, but i dont have much experience in php and i got it to work

i just added

require_once('Config.php');

require_once('MermaidConfigExtractor.php');

to Mermaid/src/ServiceWiring.php, underneath the use statements

Reply to "Getting "...\mediawiki\extensions\Mermaid\src\ServiceWiring.php: Class 'Mermaid\Config' not found""

Rendering in some mobile browsers

1
Polymath uk (talkcontribs)

I have just tested the rendering of diagrams in various browsers and using all of the three default mediawiki themes. All seem to work fine on desktop browsers, (Sea Monkey, Dissenter, Brave, Opera, Chrome, etc).

I have had less success with mobile browsers. Chrome and clones (eg Kiwi, etc), Firefox are fine, but there is an issue with Brave. It renders some (eg graph boxes) as large with small text - ie the boxes are not sized to fit the text. I have tried applying em font sizes but this does not make a difference

{{#mermaid:graph TB

classDef default fill:#f9f,stroke:#333,stroke-width:4px,font-size:1.0em;

sq[Square shape] --> ci((Circle shape))

classDef green fill:#9f6,stroke:#333,stroke-width:2px,font-size:1.0em;

class sq,e green

}}

Reply to "Rendering in some mobile browsers"
130.76.24.15 (talkcontribs)

I've tried the example for the Mermaid documentation, with the mediawiki call, but it does not seem to work. I am using v3. All other types seem to work. Anyone else having issues?


{{#mermaid:journey

title My working day

section Go to work Make tea: 5: Me

Go upstairs: 3: Me

Do work: 1: Me, Cat

section Go home

Go downstairs: 5: Me

Sit down: 5: Me

}}

Polymath uk (talkcontribs)

There is an error in your syntax somewhere because this doesn't work on my site either. This does though:

{{#mermaid:graph TB

classDef default fill:#f9f,stroke:#333,stroke-width:4px,font-size:1.0em;

sq[Square shape] --> ci((Circle shape))

classDef green fill:#9f6,stroke:#333,stroke-width:2px,font-size:1.0em;

class sq,e green

}}

Reply to "User Journey Example?"

Use CSS to set "minimum width" of gantt tasks in pixels?

2
Revansx (talkcontribs)

Issue - Short tasks (duration << X axis range) do not render visibly when displayed on gantt charts with long (timespan >> task width).

Possible solution #1 - modify mermaid.js to "catch" tasks with "width=0" and add "1" to the width

Possible solution #2 - Use CSS to set "minimum-width" of tasks.


What to do?


Note: MW 1.34 w/ Mermaid v2.2.0

Revansx (talkcontribs)

I've played with the task elements in the browser's developer's tools and it would be ideal if Mermaid detected tasks with 'width="0"' and bumped them to 'width="1"'. Is that a mermaid.js feature or is that something that can be done in the Mediawiki Extension:Mermaid ?

Reply to "Use CSS to set "minimum width" of gantt tasks in pixels?"

Globally change flowchart theme in Common.css?

1
Yevvieart (talkcontribs)

Instead of defining class and linkstyle per chart, I'd prefer to change the way all charts display as default on my wiki. Could anyone point me to what css class and variables i'd have to use to enforce it?

Reply to "Globally change flowchart theme in Common.css?"

Is it possible to make gantt tasks clickable?

1
Revansx (talkcontribs)

running MW 1.34 + Mermaid 2.2.0

mermaid.js allows gantt chart tasks to be clickable [1], however, this breaks mermaid gantt charts in MW 1.34. Can someone comment on how hard this would be to make functional in Mediawiki? My desire is to call the {{#formlink:form=MyForm|target=TaskPagename|popup|reload}} parser function from Page Forms, but I would be content with just standard wiki page links, or even full URLs if need be. Thanks!

[1] https://mermaid-js.github.io/mermaid/#/gantt?id=interaction

Reply to "Is it possible to make gantt tasks clickable?"

Mermaid CSS issue with Metrolook Skin

1
Revansx (talkcontribs)
  • Mermaid 2.2.0
  • MW 1.34.1
  • Skin:Metrolook 7.0 alpha 2 (118084b) 16:20, 23 April 2020

The SVG elements generated by Mermaid are hard-coded with height=100% in the SVG element. This is not a problem in Vector but for whatever reason there is an issue with value of "height" when using the Metrolook Skin. With a height value of 100% from Mermaid the SVG is always 100% of the screen height which produces lots of unwanted white-space above and below the SVG. I have been able to fix this by adding the following CSS to Mediawiki:Common.css:

svg { height:auto }

but I wanted to share this with the Mermaid folks in case:

  1. Other people are having this issue or
  2. The mermaid maintainers think changing the current "height=100%" SVG attribute to "height=auto".

Thanks!

- Revansx (talk) 01:04, 13 May 2020 (UTC)

Reply to "Mermaid CSS issue with Metrolook Skin"

Git graph and Class diagrams???

2
Summary by Kghbln

No, due to issue 39.

Revansx (talkcontribs)
Kghbln (talkcontribs)

No, because this requires Mermaid 8.4.0 while the extension ships Mermaid 8.0.0. Pull requests welcome: issue 39.

Installing on a non-Internet facing server

2
Squeak24 (talkcontribs)

Hi All

I was wondering if there is anyway of installing this extension without the use of Composer? The server I am working on is behind a firewall and only available to users on the local Intranet.

I would take the server offline and install it on an Internet facing machine, but due to the size of the Wiki, I know this will take time, not sure if this down time will be acceptable.

I need to put this ideally on two different Wikis I have on the one server.

Any help is appreciated.

Gary

Kghbln (talkcontribs)

The only way is to install it on an internet facing machine and move over the files afterwards. I think it should work for this extension without including MediaWiki itself in the process. Not 100% sure though.

Reply to "Installing on a non-Internet facing server"