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

In a Flowchart the conditions wrap and markdownAutoWrap do not work + Subgraph type ignores wrappingWidth condition #6110

Open
meeuwtjes opened this issue Dec 4, 2024 · 0 comments
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@meeuwtjes
Copy link

Description

In a Flowchart I want to have a fontawesome icon + label + an optional extra icon as a label in a node, subgraph and subnode
In the default configuration setting the labels are wrapped.
Setting the configuration options wrap = false, markdownAutoWrap = false does not help
For the (sub)nodes it helps to increase wrappingWidth to a large number
But the subgraph is ignoring this option

Steps to reproduce

See my Code sample:

  1. Set options
    wrap: false
    markdownAutoWrap: false
    wrappingWidth: 1 (or remove this option)
  2. Check out the result => All labels are still wrapped (Bug 1)
  3. Set or add option wrappingWidth: 900
  4. Check out the result => Only subgraph label is still wrapped (Bug 2)

Screenshots

Bug1:
image

Bug2:
image

Code Sample

---
config:
  wrap: false
  markdownAutoWrap: false
  flowchart: 
    nodeSpacing: 20
    rankSpacing: 20
    subGraphTitleMargin: 
      top: 5
      bottom: 60
    wrappingWidth: 1000
title: My Example with labels that are wrapped
---
flowchart LR
G1["fa:fa-minus My_node_with_a_long_label fa:fa-unlock"]
G2[fa:fa-minus My other node with a long label fa:fa-unlock]
subgraph SG["fa:fa-plus My_subgraph_with_long_label fa:fa-lock"]
SG1("fa:fa-link A_very_long_sublabel_as_you_can_see")
SG2("fa:fa-tools A smaller sublabel")
end

Setup

  • Mermaid version: 11.4
  • Browser and Version: Chrome, Edge, Firefox

Suggested Solutions

Bug 1: wrap and markdownAutoWrap should not wrap the labels when set to false (I don't know what the difference is between the two options)

Bug 2: option wrappingWidth should also work for subgraph types

Additional Context

No response

@meeuwtjes meeuwtjes added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Dec 4, 2024
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

1 participant