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

Fixed styling for lines for ELK flowchart #4844

Merged

Conversation

itsalam
Copy link
Contributor

@itsalam itsalam commented Sep 15, 2023

📑 Summary

  • Added nodeSpacing for line length (note that config seems to be overwritten to default values due to a race condition that elk triggers)
  • Inserts specified title as intended
  • Applies styling from the db object
  • Fixed a bug where db object returned null due to importing syntax convention.

Screenshot 2023-09-15 133039

Resolves #4813

📏 Design Decisions

Removed excessive padding, as on render the padding is for an empty graph and the intended graph is inserted below it.
As edgeNodeBetweenLayers already existed as a parameter, it seems like it is the most suitable parameter for adjusting line length. Also re-added working test suites to the elk flowchart to slowly introduce a working test suite.

📋 Tasks

Make sure you

@netlify
Copy link

netlify bot commented Sep 15, 2023

Deploy Preview for mermaid-js ready!

Name Link
🔨 Latest commit 90e134c
🔍 Latest deploy log https://app.netlify.com/sites/mermaid-js/deploys/65fea54b58f5740008801552
😎 Deploy Preview https://deploy-preview-4844--mermaid-js.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@sidharthv96 sidharthv96 left a comment

Choose a reason for hiding this comment

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

Can you also check if we can add the line length property working in elk too? (Can go in a different PR if the changes are big, no need to block this one.)

flowchart
A --> B
A ---> C
A ----> D
Loading
flowchart-elk
A --> B
A ---> C
A ----> D
Loading

@sidharthv96
Copy link
Member

image
image
image

When comparing the images from the issue and your final image, I see a few minor issues.

  1. Title is not centered. (needs to be fixed)
  2. The arrows overlap (Will be fixed if you sync with develop) image

Copy link
Member

@sidharthv96 sidharthv96 left a comment

Choose a reason for hiding this comment

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

Please center the title.

@itsalam itsalam force-pushed the bug/4813_Fix_Elk_title_arrow_styling branch from 8601e9c to e7e91a6 Compare September 19, 2023 17:29
@itsalam
Copy link
Contributor Author

itsalam commented Sep 19, 2023

Hi @sidharthv96,

Thanks for getting back to me, had to tinker around a bit, since the Elk function doesn't state its bounds right away, but I think the fixes to the title rendering function and the elk rendering order should make the title consistent.

@codecov
Copy link

codecov bot commented Sep 19, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 44.79%. Comparing base (725b618) to head (90e134c).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #4844   +/-   ##
========================================
  Coverage    44.79%   44.79%           
========================================
  Files           25       25           
  Lines         5353     5353           
  Branches        27       27           
========================================
  Hits          2398     2398           
  Misses        2954     2954           
  Partials         1        1           
Flag Coverage Δ
unit 44.79% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@itsalam
Copy link
Contributor Author

itsalam commented Oct 24, 2023

@sidharthv96, are we good to go?

@huynhicode
Copy link
Member

huynhicode commented Oct 24, 2023

Hi @itsalam, @sidharthv96 is currently on vacation.

It looks like there is a linting issue in your PR. Can you see if running pnpm -w run lint:fix fixes the issue?

Also, there is a merge conflict that needs to be resolved.

@itsalam itsalam force-pushed the bug/4813_Fix_Elk_title_arrow_styling branch from 2503929 to a3bd4c4 Compare October 24, 2023 23:42
@itsalam
Copy link
Contributor Author

itsalam commented Oct 24, 2023

Hi there @huynhicode,

Yeah, I had earlier trouble with the pre hook commit linting and @sidharthv96 suggested skipping them. Found a workaround that should pass for now, the changes are going through now. Feel free to write back if theres anything else.

@itsalam itsalam force-pushed the bug/4813_Fix_Elk_title_arrow_styling branch from 04617eb to 6d2904c Compare October 26, 2023 00:38
@sidharthv96
Copy link
Member

The E2E tests are failing for ELK. @itsalam can you please fix that?

@github-actions github-actions bot added the Type: Bug / Error Something isn't working or is incorrect label Nov 25, 2023
@martin-schaefer
Copy link

Is anybody still working on that? Would be so glad if the elk renderer supports the styling of links.

* develop: (517 commits)
  chore: Minor fixes
  chore: Build docs
  Use develop as base on develop branch.
  Update renovate json
  update link
  update announcement and blog pages
  Remove `--force` flag
  Tweak editor.bash
  update link
  chore: update browsers list
  Update integrations-community: add Drupal and module.
  Support Firefox
  Address review comments
  Change run symbol
  feat: Make the examples interactive in the documentation site.
  Add langium
  chore: update browsers list
  chore(deps): update all patch dependencies
  chore(deps): update all minor dependencies
  Update keywords and description
  ...
* develop:
  Fix flowchart-elk render test
  chore: Add example page link in index
@sidharthv96 sidharthv96 merged commit 0edef7b into mermaid-js:develop Mar 23, 2024
19 checks passed
Copy link

mermaid-bot bot commented Mar 23, 2024

@itsalam, Thank you for the contribution!
You are now eligible for a year of Premium account on MermaidChart.
Sign up with your GitHub account to activate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug / Error Something isn't working or is incorrect
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Elk Rendering for Flowcharts does not support Title and arrow styling
4 participants