question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[classDef] Suggestion: extend classDef with default shape

See original GitHub issue

Is your feature request related to a problem? Please describe. I’m frustrated when I use a class (for example “:::redis” which gives it a red colour) I need to manually shape each node. Example:

graph TD
  classDef redis fill:#FF0000;
  database1[(database1)]:::redis

Describe the solution you’d like To simplify using a syntax where the classDef also contains the shape

graph TD
  classDef [(redis)] fill:#FF0000;
  database1:::redis

Describe alternatives you’ve considered Copy paste a lot

Additional context image

to:

image

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:2
  • Comments:16 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
GDFabercommented, Apr 19, 2020

I have not given this much thought by now, but this could be done by adding a new attribute shape to classDef as well as style which can also be used to apply styles to nodes. But it should use words as a value, not things like shape:[()] but shape:database. What do you think?

1reaction
sbarzowskicommented, Apr 19, 2020

Being able to specify shape in classDef would be really helpful – it would allow specifying semantic classes of nodes and styling them separately. This would be very useful when aiming for a consistent “language” across multiple diagrams.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - [classDef] Suggestion: extend classDef with default ...
[classDef] Suggestion: extend classDef with default shape. ... (for example ":::redis" which gives it a red colour) I need to manually shape each...
Read more >
How do I encapsulate an old-style class with a classdef class?
So it has a name--but how do I wrap a default constructor in an internal try-catch block to shove 'MATLAB:class:InvalidType' down a hole?...
Read more >
Is it allowed to extend the Shape class? - java - Stack Overflow
I assume you're talking about the javafx.scene.shape.Shape class. If that's correct, then the documentation 1 says that you should not extend ...
Read more >
WifiNetworkSuggestion.Builder - Android Developers
Specifies whether the suggestion represents a carrier merged network. ... If not set, defaults to false (i.e no app interaction required).
Read more >
All Classes and Interfaces (Java SE 17 & JDK 17)
This class provides default implementations for the JFC Action interface. ... The common interface extended by all annotation interfaces.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found