-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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 support for styling Journey Diagram title (color, font-family, and font-size) #6225
base: develop
Are you sure you want to change the base?
feat: Add support for styling Journey Diagram title (color, font-family, and font-size) #6225
Conversation
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
|
✅ Deploy Preview for mermaid-js ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
commit: |
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
Hi! I'm autofix.ci, a bot that automatically fixes trivial issues such as code formatting in pull requests. I would like to apply some automated changes to this pull request, but it looks like I don't have the necessary permissions to do so. To get this pull request into a mergeable state, please do one of the following two things:
|
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.
Please add visual tests that verify the parameters work.
…where within Co-authored-by: Shahir Ahmed <ahmeds@dickinson.edu>
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
@sidharthv96 We’ve implemented the requested changes: ✅ Optimized ✅ Added visual tests – We've included a test to verify that the User Journey Diagram title correctly applies the expected color, font family, and font size based on Let us know if you have any feedback! @pranavm2109 and I appreciate your guidance. |
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #6225 +/- ##
=======================================
Coverage 4.47% 4.48%
=======================================
Files 385 384 -1
Lines 54191 54186 -5
Branches 598 627 +29
=======================================
+ Hits 2425 2430 +5
+ Misses 51766 51756 -10
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Hey @sidharthv96, this PR is good to go—passes all GitHub Actions checks and CI/CD tests! |
📑 Summary
This PR introduces additional customization options for the title in Journey Diagrams. Users can now define
titleColor
,titleFontFamily
, andtitleFontSize
in thethemeVariables
configuration to style the title's color, font family, and font size. If these properties are not defined, they default totextColor
,"trebuchet ms, verdana, arial, sans-serif"
, and16px
, respectively. The feature includes corresponding updates in the rendering logic and documentation.Resolves #3508
📏 Design Decisions
New Theme Variables:
titleColor
: Sets the color of the Journey Diagram title. Defaults totextColor
.titleFontFamily
: Sets the font family for the title. Defaults to"trebuchet ms, verdana, arial, sans-serif"
.titleFontSize
: Sets the font size for the title. Defaults to16px
.Renderer Updates:
getConfig()
and applies them during rendering.Default Values:
packages/mermaid/src/themes/theme-default.js
:Documentation Updates:
packages/mermaid/src/docs/config/theming.md
to includetitleColor
,titleFontFamily
, andtitleFontSize
.📋 Tasks
Make sure you
MERMAID_RELEASE_VERSION
is used for all new features.pnpm changeset
and following the prompts. Changesets that add features should beminor
and those that fix bugs should bepatch
. Please prefix changeset messages withfeat:
,fix:
, orchore:
.Updated Documentation
File Updated:
packages/mermaid/src/docs/config/theming.md
Added the following rows to the Theme Variables table:
Example Configuration
Users can customize the Journey Diagram title using the following configuration:
With this configuration, the title "User Journey Example" will have a yellow color,
Arial
font, and20px
font size.