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

New Diagram - Use case diagram #4268 #6141

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

Conversation

teyc
Copy link

@teyc teyc commented Dec 19, 2024

📑 Summary

Brief description about the content of your PR.

Creates Use Case diagrams

image

Here's the textual representation of the use case diagram above.

usecase-beta
      title Student Management System Use Cases

      actor Student
      actor Admin
      service Authentication
      service Grades as Grades Database
      service Courses

      systemboundary
        title Student Management System
        (Login) 
        (Submit Assignment)
        (View) as (View Grades)
        (Manage Users) 
        (Manage Courses)
        (Generate Reports)
        (View Grades) 
      end

      Student -> (Login) -> Authentication
      Student -> (Submit Assignment) -> Courses
      Student -> (View) -> Grades
      Admin -> (Login) -> Authentication
      Admin -> (Manage Users) -> Courses
      Admin -> (Manage Courses) -> Courses
      Admin -> (Generate Reports) -> Courses, Grades
      Admin -> (View) -> Grades

Resolves #4628

📏 Design Decisions

  • We use brackets to denote Use Cases, which are usually rendered inside an ellipse
  • We support the use of aliases via as
  • The actor and service declaration are optional. If we provide Admin -> (View) -> Grades, it implicitly assumes that Admin (being the first one) is the actor, while Grades (being the last) is the service.

📋 Tasks

Make sure you

  • 📖 have read the contribution guidelines
  • 💻 have added necessary unit/e2e tests. Test coverage is not picking up my usecase.spec.ts - why?
  • 📓 have added documentation. Make sure MERMAID_RELEASE_VERSION is used for all new features.
  • 🦋 If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

Copy link

changeset-bot bot commented Dec 19, 2024

⚠️ No Changeset found

Latest commit: cff19e6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

netlify bot commented Dec 19, 2024

Deploy Preview for mermaid-js ready!

Name Link
🔨 Latest commit cff19e6
🔍 Latest deploy log https://app.netlify.com/sites/mermaid-js/deploys/67660c44917d740008474647
😎 Deploy Preview https://deploy-preview-6141--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.

@github-actions github-actions bot added the Type: Enhancement New feature or request label Dec 19, 2024
Copy link

pkg-pr-new bot commented Dec 19, 2024

Open in Stackblitz

npm i https://pkg.pr.new/mermaid-js/mermaid@6141
npm i https://pkg.pr.new/mermaid-js/mermaid/@mermaid-js/layout-elk@6141
npm i https://pkg.pr.new/mermaid-js/mermaid/@mermaid-js/mermaid-zenuml@6141
npm i https://pkg.pr.new/mermaid-js/mermaid/@mermaid-js/parser@6141

commit: cff19e6

Copy link

codecov bot commented Dec 19, 2024

Codecov Report

Attention: Patch coverage is 0% with 524 lines in your changes missing coverage. Please review.

Project coverage is 4.44%. Comparing base (df636c6) to head (cff19e6).

Files with missing lines Patch % Lines
packages/mermaid/src/diagrams/usecase/usecaseDB.ts 0.00% 284 Missing ⚠️
.../rendering-util/rendering-elements/shapes/actor.ts 0.00% 80 Missing ⚠️
...es/mermaid/src/diagrams/usecase/usecaseRenderer.ts 0.00% 68 Missing ⚠️
packages/mermaid/src/diagrams/usecase/styles.ts 0.00% 28 Missing ⚠️
...es/mermaid/src/diagrams/usecase/usecaseDetector.ts 0.00% 20 Missing ⚠️
...ges/mermaid/src/diagrams/usecase/usecaseDiagram.ts 0.00% 17 Missing ⚠️
...id/src/rendering-util/rendering-elements/shapes.ts 0.00% 16 Missing ⚠️
...kages/mermaid/src/diagrams/usecase/usecaseUtils.ts 0.00% 8 Missing ⚠️
...s/mermaid/src/diagram-api/diagram-orchestration.ts 0.00% 2 Missing ⚠️
.build/jsonSchema.ts 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           develop   #6141      +/-   ##
==========================================
- Coverage     4.48%   4.44%   -0.05%     
==========================================
  Files          383     390       +7     
  Lines        54038   54557     +519     
  Branches       596     603       +7     
==========================================
  Hits          2425    2425              
- Misses       51613   52132     +519     
Flag Coverage Δ
unit 4.44% <0.00%> (-0.05%) ⬇️

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

Files with missing lines Coverage Δ
.build/jsonSchema.ts 0.00% <0.00%> (ø)
...s/mermaid/src/diagram-api/diagram-orchestration.ts 0.00% <0.00%> (ø)
...kages/mermaid/src/diagrams/usecase/usecaseUtils.ts 0.00% <0.00%> (ø)
...id/src/rendering-util/rendering-elements/shapes.ts 0.00% <0.00%> (ø)
...ges/mermaid/src/diagrams/usecase/usecaseDiagram.ts 0.00% <0.00%> (ø)
...es/mermaid/src/diagrams/usecase/usecaseDetector.ts 0.00% <0.00%> (ø)
packages/mermaid/src/diagrams/usecase/styles.ts 0.00% <0.00%> (ø)
...es/mermaid/src/diagrams/usecase/usecaseRenderer.ts 0.00% <0.00%> (ø)
.../rendering-util/rendering-elements/shapes/actor.ts 0.00% <0.00%> (ø)
packages/mermaid/src/diagrams/usecase/usecaseDB.ts 0.00% <0.00%> (ø)

@teyc teyc changed the title Feature/use case New Diagram - Use case diagram #4268 Dec 19, 2024
@teyc teyc marked this pull request as ready for review December 20, 2024 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Use Case diagram type
1 participant