Skip to content

Conversation

@XUEWUQIUSHUANG
Copy link
Collaborator

@XUEWUQIUSHUANG XUEWUQIUSHUANG commented Nov 21, 2024

doc(Mermaid): Add doc for Mermaid component

Summary of the changes (Less than 80 chars)

简单描述你更改了什么, 不超过80个字符;如果有关联 Issue 请在下方填写相关编号

Description

doc(Mermaid): Add doc for Mermaid component

Regression?

  • Yes
  • No

[If yes, specify the version the behavior has regressed from]

[是否影响老版本]

Risk

  • High
  • Medium
  • Low

[Justify the selection above]

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • Merge the latest code from the main branch

Summary by Sourcery

Documentation:

  • Add documentation for the Mermaid component, detailing its usage, attributes, and methods.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Nov 21, 2024

Reviewer's Guide by Sourcery

This PR adds documentation and localization support for a new Mermaid component, which is a tool for creating diagrams using Markdown-inspired text definitions. The implementation includes adding new localization strings, menu entries, and sample code demonstrating basic and styled usage of the component.

Class diagram for the new Mermaids component

classDiagram
    class Mermaids {
        - MermaidType _options
        - Dictionary<MermaidType, string> data
        + AttributeItem[] GetAttributes()
        + MethodItem[] GetMethods()
    }
    class AttributeItem {
        + string Name
        + string Description
        + string Type
        + string ValueList
        + string DefaultValue
    }
    class MethodItem {
        + string Name
        + string Description
        + string Parameters
        + string ReturnValue
    }
    Mermaids --> "1" AttributeItem
    Mermaids --> "1" MethodItem
    class MermaidType {
        <<enumeration>>
        None
        Flowchart
        SequenceDiagram
        ClassDiagram
        StateDiagram
        ErDiagram
        Journey
        Gantt
        Pie
    }
    Mermaids --> "1" MermaidType
    class MermaidDirection {
        <<enumeration>>
        TB
        BT
        LR
        RL
    }
Loading

File-Level Changes

Change Details Files
Added localization support for the Mermaid component
  • Added Mermaid-related text entries in both English and Chinese
  • Added component descriptions and UI text for basic usage and styling examples
src/BootstrapBlazor.Server/Locales/en-US.json
src/BootstrapBlazor.Server/Locales/zh-CN.json
Integrated Mermaid component into the navigation system
  • Added Mermaid component to the menu items list
  • Added Mermaid card to the components page
  • Updated docs.json to include Mermaid component routing
src/BootstrapBlazor.Server/Extensions/MenusLocalizerExtensions.cs
src/BootstrapBlazor.Server/Components/Pages/Coms.razor
src/BootstrapBlazor.Server/docs.json
Created Mermaid component documentation and examples
  • Implemented a sample page with basic usage examples
  • Added various diagram type demonstrations including flowcharts, sequence diagrams, and more
  • Created a styled example showing custom diagram formatting
  • Added component attributes and methods documentation
src/BootstrapBlazor.Server/Components/Samples/Mermaids.razor
src/BootstrapBlazor.Server/Components/Samples/Mermaids.razor.cs

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@bb-auto
Copy link

bb-auto bot commented Nov 21, 2024

Thanks for your PR, @XUEWUQIUSHUANG. Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@bb-auto bb-auto bot requested a review from ArgoZhang November 21, 2024 10:39
sourcery-ai[bot]
sourcery-ai bot previously approved these changes Nov 21, 2024
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @XUEWUQIUSHUANG - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟡 Complexity: 1 issue found
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@XUEWUQIUSHUANG
Copy link
Collaborator Author

@microsoft-github-policy-service agree

@codecov
Copy link

codecov bot commented Nov 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (b2a6183) to head (c98339b).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #4711   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          620       620           
  Lines        27382     27382           
  Branches      3923      3923           
=========================================
  Hits         27382     27382           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@ArgoZhang ArgoZhang merged commit 70eb2c3 into main Nov 22, 2024
5 checks passed
@ArgoZhang ArgoZhang deleted the doc-mermaid branch November 22, 2024 00:20
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.

3 participants