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

Allow the user to override all Mermaid string-specific word wrap preferences using the VSCode-native word wrap preference. #243

Open
RokeJulianLockhart opened this issue Feb 4, 2024 · 4 comments

Comments

@RokeJulianLockhart
Copy link

RokeJulianLockhart commented Feb 4, 2024

20240204T124756GMT

Just do what every other renderer does — adhere to the text wrap preference: if wrap is enabled, wrap it. If not, display scrollbars. Regardless, never automatically, much less without the ability to not, reduce the size of the text! I have a smartphone and tablet with VS Code on it too - how am I meant to even use this on them? Consider the accessibility disadvantage of not doing so, which is that a great many people won't even be able to read that.

I hope we don't have to wait on mermaid-js/mermaid#1860 (comment), because I'm proposing that the system-defined/VSCode-exposed font size is always used.

@mjbvz
Copy link
Owner

mjbvz commented Feb 6, 2024

Please share an example diagram as copiable text

@RokeJulianLockhart
Copy link
Author

RokeJulianLockhart commented Feb 6, 2024

#243 (comment)

@mjbvz,

```mermaid
flowchart TD

n1["`Law`"] --> |<i>Hierarchy| s3

s1 --> |Votes| n1
s2 --> |Votes| n1
s5 --> |Votes| n1
s8 --> |Votes| n1

subgraph s10["`**Nation 1**
	An external placeholder nation which exists to demonstrate that legally, alternate nations are able to exist outside the bounds of Nation 0. However, whether any alternative nation(s) should exist should be considered carefully.

	A sensible reason for such a nation to exist is physics constraints so severe that due to lack of ability to contact and/or provide physical assistance to the nation, it must govern itself. Expected inability to *ever* contact the other nation is a situation in which this applies, perhaps if it is travelling into space at a relevant pace and to a relevant eventual distance.`"]
end

s10 -.- |<i>Hierarchy| s3

subgraph s3["`**Nation 0**
	This is the nation which this document describes. It should be the most powerful nation economically and militarily in order to prevent invasion, in order to sustain its meritocratic and just institutions.`"]

    subgraph s1["`**Administration Authority**
		Provides administration to its ultimately separate subordinates.`"]

	    n3["`**Rank 0 Administration Officer**
			This role is the highest authority - the head of state.`"]

		n3 --> |<i>Hierarchy| s9

		subgraph s9["`**Administration Innovation Authority**
			Innovates methods of improvement of administration of its subsidiaries.`"]

		end
	end

	s1 --> |<i>Hierarchy| s4

	subgraph s4["`**Product and Service Improvement Authority**
		Provides competition against, and mutually advantageous co-operation with, private organizations.`"]

		subgraph s6["`**Public Service Authority**
			To ensure healthy competition, a singular public entity would be established to compete with private companies. Subordinate entities would be created in a federal manner to compete in specific sectors such as food, clothing, and basic digital devices. The more specific the need, the more entities would be the entity's parent, unless its purview does not fit into the systems of the existent entities, in which case it could without problem be subservient solely to the ultimate parent despite being niche.

			This system aims to enhance affordability, quality, and customer service by fostering market competition, because whereas the private system when comprised of small companies is incapable of *not* innovating in the short term in order to survive, the government would take the role of traditional private monopolies, yet would instead use that power to slowly enhance the quality of its development systems and products by utilizing the innovations of the private sectors. It *would* improve due to its federal structure - accountability goes up the chain to the head of state, and consolidates those with similar interests into groups able to demonstrate their competence yet managed by those with broader visions. It's the standard system of competing interests, but properly managed.`"]

			subgraph s2["`**Waste Management**
				Provides waste management services.`"]

				n6["Rank 1 Waste Collector"]
				n7["Rank 1 Waste Disposer"]

			end

			subgraph s5["`**Fire Management**
				Provides waste management services.`"]

				n8["`Rank 1 Firefighter`"]
				n9["`Rank 1 `"]

			end

			subgraph s8["`**Law Enforcement**
				Enforces law.`"]

				n10["`Rank 1 Patroller`"]
				n11["Rank 1 "]

			end
		end
	end
end
```

image

@RokeJulianLockhart
Copy link
Author

RokeJulianLockhart commented Feb 25, 2024

#243 (comment)

@RokeJulianLockhart, that method forces wrapping, so it still doesn't allow this extension to adhere to the word wrap preference, although it's a stopgap:

image

@RokeJulianLockhart RokeJulianLockhart changed the title Use word wrap preference rather than force uselessly small text. Allow the user to override all Mermaid string-specific word wrap preferences using the VSCode-native word wrap preference. Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants