-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
fix: render the participants in same order as they are created #5017
fix: render the participants in same order as they are created #5017
Conversation
✅ Deploy Preview for mermaid-js ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #5017 +/- ##
============================================
+ Coverage 42.94% 80.06% +37.12%
============================================
Files 23 164 +141
Lines 4972 13862 +8890
Branches 21 698 +677
============================================
+ Hits 2135 11099 +8964
+ Misses 2836 2611 -225
- Partials 1 152 +151
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@sidharthv96 let me know if you have any concerns with this change |
d06bb05#diff-1f8b0d46157ff209384aa6d146c2542142552e50ed6257ab525b1b789f5a0cde seems to have multiple places where @ad1992, a bit more descriptive commit messages than |
Are you referring to the individual commit messages in PR ? The main commit message communicates what is fixed in this PR (As shown in PR title). |
Oops sorry just noticed that individual commits are merged as well so all, will make sure the individual commits are descriptive as well. |
We are not that strict with the commit messages. Squashing is usually left to the PR author's will without any interference while merging, unless there are lots of small, related commits in the PR. :) |
I see got it :) Also regarding |
That's a problem @ad1992. |
The unit tests won't find issues like these sadly. And our visual tests run only before release. So that's why all the tests passed. |
Hmm interesting, this issue wasn't there in previous versions so probably something changed post that which is breaking it. will check |
I have pushed the fix and rendering the top actor with lines first which is intuitive as those are the first shapes to be drawn. However in the same PR d06bb05 where ordering was changed, the top actors were pushed after messages as well which I have reverted here. Let me know if this works well. I matched with the diagrams in the mermaid docs and they look good. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thank you! Any tentative date for the next release? |
We're planning on making the next release a v11/major release, so it might take a bit longer than usual unfortunately. Assuming nothing changes, we're hoping it will be out before the end of the year 🤞 |
Thanks for the update @aloisklink! I can see there is a v10 milestone so checking if there is any plan of v10 minor version before v11 ? |
It looks like there might be a v10.6.2 patch release and this PR is in it: #5103 🤞 You should be able to use a release candidate pre-release version already by adding |
@ad1992 there was a regression #5188 (comment). Do you think the fix will be easy? |
@sidharthv96 give me some time, I will look into it and confirm |
So I looked into this and the changes which were made in the d06bb05 does make sense, during actor creation and destroy its very tricky to determine the position of actors, I tried various ways but one or other is failing some case hence i think the author rendered the messages first and updated the position of actors in my intention was to make the DOM rendering same as order of creation (which was earlier) but that looks hard and might increase complexities unnecessarily. Hence I would try to go the other way around and change the API instead so we can expose the x/y coords and dimensions as well via the
Mainly the above I have a lot of more API ideas to make the API better which I would like to discuss as well. |
📑 Summary
Until v10.2.4, the order of DOM nodes was fine - which means that participant actors were rendered in same order as creation. However in d06bb05 the order was reversed using
.lower()
which is confusing, hence I am reverting to the previous behaviour.I am not sure if the change was intentional but I hope this won't break any behaviour and tests are passing
Additionally I have added one more example in docs with actor symbols for sequence diagram as there were none with actor symbols.
Resolves #4946
📏 Design Decisions
Keeping the order same as creation simplifies and makes it more intutive
📋 Tasks
Make sure you
MERMAID_RELEASE_VERSION
is used for all new features.develop
branchI tried to add a unit test but unfortunately this is dependent on
D3.js
hence its not working out, I will need to mock the implementation oflower
correctly to make it work.