-
-
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
feat: Add packet diagram #4839
feat: Add packet diagram #4839
Conversation
✅ Deploy Preview for mermaid-js ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## next #4839 +/- ##
==========================================
- Coverage 44.50% 44.38% -0.13%
==========================================
Files 25 25
Lines 5206 5227 +21
Branches 25 25
==========================================
+ Hits 2317 2320 +3
- Misses 2888 2906 +18
Partials 1 1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Sorry for making all comments in this review request changes
. Some of them are just comments, but the review got so big that I couldn't separate them.
There's two files I haven't fully review db.ts
and renderer.ts
. I'll review them when I've time.
And please mock the packet renderer in __mocks__
and here packages/mermaid/src/mermaidAPI.spec.ts
.
Thanks for the detailed review @Yokozuna59 ! |
* next: (193 commits) Update all patch dependencies Fix docs Update packages/mermaid/src/docs/community/questions-and-suggestions.md Update packages/mermaid/src/diagrams/class/classRenderer-v2.ts update edge ids draw top actors with lines first followed by messages Bump GitHub workflow actions to latest versions Update docs Documentation: clarify sentence Fix lint Fix typo fix typo Add new Atlassian integrations chore(deps): update all patch dependencies Update demos/sequence.html chore: release v10.6.1 fix fix fix: render the participants in same order as they are created fix(flow): fix invalid ellipseText regex ...
Moved some types around Removed unnecessary params Co-authored-by: Reda Al Sulais <[email protected]> Co-authored-by: Alois Klink <[email protected]>
Move populate into parser Co-authored-by: Reda Al Sulais <[email protected]>
Co-authored-by: Reda Al Sulais <[email protected]>
* next: fix text-decoration for abstract attibutes ci(pr-labeler): add required `template` option ci(pr-labeler): replace TimonVS/pr-labeler-action style(pr-labeler): format .github/pr-labeler.yml docs(ci/pr-labeler): warn about security issues ci(release-draft): handle new release-drafter name ci(release-drafter): remove unused `branch` config ci(pr-labeler): limit GITHUB_TOKEN permissions ci(release-draft): limit GITHUB_TOKEN permissions
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.
It would be better if add another image for the diagram with title in PR description.
I'm not sure about this, but shouldn't the title be at the top of the diagram, or it expected to be at the bottom?
And two more things:
And please mock the packet renderer in
__mocks__
and herepackages/mermaid/src/mermaidAPI.spec.ts
.
And maybe add some test cases in packages/parser/tests for packet diagram.
Co-authored-by: Reda Al Sulais <[email protected]>
@Yokozuna59 @aloisklink @nirname Are the files except |
Looking at #3808, I believe all of these diagram mocks are only being used for the following test: mermaid/packages/mermaid/src/mermaidAPI.spec.ts Lines 698 to 746 in d7f59c1
But it sounds like the mocks are mainly there to force mermaid/packages/mermaid/src/diagram-api/types.ts Lines 91 to 104 in d7f59c1
It seems safe to me, but if you think it's high risk, you could make the change in a separate PR so we could more easily revert it? |
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, thanks!
Just a minor question: when will we drop v10
? This is the first diagram; we only have a language parser for it, so users can't use it (unless they use the preview link).
@Yokozuna59 we're planning to release v11 soon. The plan is to merge your Pie PR first, update this one as necessary, then start the release process (testing, docs, etc). |
* next: (316 commits) Lint Remove echo RefTest Echo event Update cypress Fix applitools Fix applitools docs: fix lint docs: move community to Discord Swap condition blocks to avoid using negation Reposition const declaration to ideal place Change repetitive values into consts docs: fix swimm link Fix Update Browserslist Use pnpm/action-setup@v2 Fix lint Cleanup e2e.yml Ignore push events on merge queue Remove :: Remove :: ...
📑 Summary
Adds packet diagram
Resolves #948
TODO:
📏 Design Decisions
The syntax was adapted from the existing one at http://blockdiag.com/en/nwdiag/packetdiag-examples.html#structure-of-tcp-header
📋 Tasks
Make sure you
MERMAID_RELEASE_VERSION
is used for all new features.next
branch