fix(flowchart): warn when click event binding fails due to securityLevel#7553
fix(flowchart): warn when click event binding fails due to securityLevel#7553Vi-Ku wants to merge 1 commit intomermaid-js:developfrom
Conversation
Previously, when securityLevel was not set to "loose", the click directive in flowcharts would fail silently with no feedback. This made it very difficult for users to debug why their click callbacks were not working. Add a log.warn() message that clearly explains that click event bindings require securityLevel: "loose" and indicates which node was affected. Fixes mermaid-js#6809
✅ Deploy Preview for mermaid-js ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@mermaid-js/examples
mermaid
@mermaid-js/layout-elk
@mermaid-js/layout-tidy-tree
@mermaid-js/mermaid-zenuml
@mermaid-js/parser
@mermaid-js/tiny
commit: |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #7553 +/- ##
==========================================
- Coverage 3.34% 3.34% -0.01%
==========================================
Files 524 525 +1
Lines 55256 55269 +13
Branches 795 795
==========================================
Hits 1850 1850
- Misses 53406 53419 +13
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Summary
Fixes #6809
When
securityLevelis not set to"loose", theclickdirective in flowcharts silently fails without any feedback. Users see the "clickable" CSS class applied to nodes but the actualclickcallback never fires, making it very difficult to debug.Fix
Added a
log.warn()message insetClickFun()(inflowDb.ts) that informs the user when a click event binding is skipped due to the security level restriction. The warning message includes:securityLevelvaluesecurityLevel: "loose"is requiredExample Warning
Testing
The
logmodule from../../logger.jsis already imported and used elsewhere inflowDb.ts, so no new dependencies are introduced.