Standardize Diagram titles #3528
weedySeaDragon
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'd like to standardize and implement diagram titles for all diagrams
@knsv (and any others that should be notified):
These issues are about diagram titles:
And titles (and footers) are fairly standard features.
Gantt, pie, sequence, and journey are using
commonDb getDiagramTitle()
but each render them their own way.Proposed Conventions
parsing
setDiagramTitle()
insrc\commonDb.js
to set the diagram title from the parser.getDiagramTitle()
insrc\commonDb.js
to get the diagram title from the parser..jison
files use the same code to parse thetitle
keywordrendering: A common method for rendering the diagram title and supporing methods. This could include setting the
rect
element behind the text with the appropriate padding (# of pixels wider and taller than the diagram text). Would likely also include methods for horiztonally aligning an element within another element.diagramTitle
as the variable name in all...Renderer.xs
files to differentiate it from other uses oftitle
(e.g. class title, entity title, etc.)<g>
element so they're grouped and can be used togethertheming and styling: The diagram title would have the same set theme variables and CSS classes on all diagrams (not exactly sure which should be specified in the themeVariables vs. configurations):
rect
box behind the diagramTitletext
element should be ( horizontal and vertical "padding").<g>
that contains all diagramTitle elementstext
elementrect
that is behind the diagram titletext
elementImplementation
commonRendering.ts
file and add methods that can be usedLater, a
DiagramRenderer
class could use the strategy pattern to insert diagram titles (if a tittle keyword is parsed) in adraw
method.Once this is accomplished, then we could also implement common diagram footers (and any other common diagram elements) by using the conventions/methods established with the diagram title.
Questions
commonDb.js
do? (This is a limit of my js knowledge):Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions