Skip to content

Fix Mermaid v10 API usage in WordPress architecture plugins - #299

Merged
makr-code merged 7 commits into
developfrom
copilot/fix-mermaid-graph-conversion
Jan 8, 2026
Merged

makr-code merged 7 commits into
developfrom
copilot/fix-mermaid-graph-conversion

Conversation

Copilot AI commented Jan 8, 2026 •

Copy link
Copy Markdown
Contributor

Three WordPress plugins were using deprecated Mermaid v9 API (querySelector), causing diagrams to fail rendering with Mermaid v10+ loaded from CDN.

Changes

  • API migration: Updated mermaid.run() calls from querySelector: '#id' to nodes: [element]
  • Loading race condition: Added promise-based waitForMermaid() with 5s timeout in architecture-diagrams plugin
  • Re-rendering: Clear data-processed attribute before each render
  • Error handling: Added .catch() handlers with user-visible error messages

Example

Before:

mermaid.run({ querySelector: '#ad-mermaid-diagram' });

After:

mermaid.run({ nodes: [$container[0]] })
    .catch((error) => {
        console.error('Mermaid rendering error:', error);
        this.showError('Failed to render diagram: ' + error.message);
    });

Files affected

  • architecture-diagrams-wordpress/ (v1.0.0 → v1.0.1)
  • release-timeline-wordpress/
  • feature-matrix-wordpress/
Original prompt

das wordpress themis plugin zur architectur funktioniert nicht. der graph code wir von mermaid nicht umgewandelt in grafk


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI self-assigned this Jan 8, 2026
Copilot AI changed the title [WIP] Fix issue with Mermaid graph conversion in Themis plugin Fix Mermaid v10 API usage in WordPress architecture plugins Jan 8, 2026
Copilot AI requested a review from makr-code January 8, 2026 21:31
@makr-code
makr-code marked this pull request as ready for review January 8, 2026 21:32
@makr-code
makr-code merged commit c7c0e34 into develop Jan 8, 2026
@makr-code makr-code added this to the v1.0.2 milestone Mar 11, 2026
Copilot AI added a commit that referenced this pull request May 20, 2026
- Add RerouteSerializeFn tests (stub #252)
- AstVisitorFn bridge: TensorAwareQueryOptimizer (stub #275)
- ExactSimilarityFn bridge: TensorFingerprintGraph (stub #276)
- [[deprecated]] attribute: ggmlCorePtrs (stub #277)
- RpcPhase2Fn bridge: DistributedTransactionManager (stub #279)
- AuthorizeFn bridge: RopeApiHandler RBAC (stub #280)
- HttpPostFn bridge: AIPluginGenerator (stub #282)
- HTToTTFn bridge: HTTrain (stub #286)
- ModelPathProviderFn bridge: LoRATrainingService (stub #289)
- AllReduceCpuFn bridge: DistributedTrainer (stub #290)
- NlpContextFn bridge: AdaptiveShardRouter (stub #291)
- StringArrayFn bridge: PropertyGraphManager (stub #292)
- SchemaInspectorFn/SchemaValidatorFn: ImportApiHandler (stub #294)
- Lz4CompressFn/Lz4DecompressFn: SecureTransportClient (stub #295)
- SpamKeywordsProviderFn: FeedbackStore (stub #296)
- MODIFY path fix: FeedbackStore validateWithPlugin (stub #297)
- shared_ptr ResponseBuffer RAII: Http2Session (stub #298)
- ModelPathProviderFn: ThemisHelpLoRA Config (stub #299)
- IngestExternalFileFn: BackupManager (stub #300)
- StatsQueryFn: RopeApiHandler (stub #307)
- Update STUB_INVENTORY.md: 272->292 resolved, 44->24 active

Co-authored-by: Copilot <[email protected]>

Co-authored-by: makr-code <[email protected]>
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.

2 participants