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

Streamlining and enhancing diagram rendering across various diagram types #5604

Open
wants to merge 265 commits into
base: develop
Choose a base branch
from

Conversation

knsv
Copy link
Collaborator

@knsv knsv commented Jun 28, 2024

📑 Summary

There is noticeable duplication in functionality among different diagram types. Several graph-based diagrams share common features in rendering, but these are implemented separately in each diagram type.

This PR introduces a Unified Layout Engine: Implement a singular layout engine for all graph-based diagrams.

Benefits:

  • Facilitates the introduction of new layout algorithms universally across all graph-based diagrams.
  • Enhances consistency in diagram layouts.
  • Standardizes interaction, styling, and class handling across diagrams.
  • Enables shape reusability between different diagram types.
  • Simplifies introduction of additional layout engines
  • New layout engines will work for all diagrams using this way of rendering

Resolves #5237

📏 Design Decisions

Describe the way your implementation works or what design decisions you made if applicable.

📋 Tasks

Make sure you

knsv and others added 30 commits April 26, 2024 15:00
* develop: (462 commits)
  Update packages/mermaid/src/diagrams/sequence/parser/sequenceDiagram.jison
  fix: Simplify actor type of activeStart and activeEnd
  chore(deps): update all patch dependencies
  chore: Fix typo
  chore(deps): update all patch dependencies
  chore: remove repetitive words
  Update stateDiagram.md
  Update stateDiagram.md
  fix: simply from and to in message to string type
  docs: Add quadrant point styling
  feat: Change precedence of styling
  chore(deps): update all minor dependencies
  chore(deps): update all patch dependencies
  fix: eslint ignore, type definition
  chore(deps): update all patch dependencies
  fix: Remove `ImperativeState` type restriction.
  📝🐛 fix schema link
  update latest news section
  Changes to rendering/gitGraph.spec.js - Added additional rendering test functionality for recognizing 'switch' as an alias to 'checkout'.
  1. Changes to gitGraph.jison - Updated the regex to allow either 'checkout' or 'switch' 2. Changes to gitGraphParser.spec.js - Additional test coverage added for the changes made to the parser. 3. Changes to gitGraphParserV2.spec.js - Additional test coverafe added for the changes made to the parser. 4. Changes to gitgraph.md - Updated documentation to let users know that checkout/switch can be used interchangeably.
  ...
…aid-js/mermaid into 5237-unified-layout-common-renderer
knsv and others added 17 commits July 2, 2024 10:38
…anup

* 5237-unified-layout-common-renderer: (36 commits)
  5237 New default width for flowchart edges
  #5237 Fix for rough styling of regular states and dividers in state diagrams
  chore: Remove "sideEffects: false"
  Added test for divider alignment
  Remove logs
  chore: Fix eslint errors
  chore: eslint autofix
  chore: Cleanup tsconfig
  chore: Fix lint
  Apply suggestions from code review
  chore: Remove extra words from cspell
  chore: Log granular rebuild times
  fix: Message wrap
  fix: Message wrap
  chore: Use `??` instead of `||`
  chore: Organise imports
  chore: Remove unused variables
  chore: Remove cross-env from eslint
  chore: Cleanup rules
  chore: Fix eslint issues
  ...
…aid-js/mermaid into 5237-unified-layout-common-renderer
…aid-js/mermaid into 5237-unified-layout-common-renderer
…anup

* 5237-unified-layout-common-renderer:
  #5237 Fix fir subgraphs with elk
  #5237 Fix for diamond intersections with ELK, tweak
  #5237 Fix for diamond intersections with ELK
  fix for note with a composite state
  #5237 Handling of subgraphs using elk
  #5237 Handling of subgraphs using elk
  Fix fro direction in layout data

---

### elk.nodePlacement.strategy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@knsv @ashishjain0512 Shouldn't these configs be proper objects?
Otherwise it will be very confusing, as we already support some configs in nested fashion.

config:
  elk:
    mergeEdges: true
    nodePlacement:
      strategy: SIMPLE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make common layout and render engines that can be used by many diagrams
5 participants