Skip to content

feat(markdown): render Pikchr diagrams#821

Merged
matt2e merged 20 commits into
mainfrom
diagram-library
Jun 25, 2026
Merged

feat(markdown): render Pikchr diagrams#821
matt2e merged 20 commits into
mainfrom
diagram-library

Conversation

@matt2e

@matt2e matt2e commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Adds shared Pikchr diagram rendering for markdown, wires note/session prompts to include Pikchr grammar guidance, and covers diagram formatting/rendering with tests.

matt2e added 20 commits June 24, 2026 13:52
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
@matt2e matt2e requested review from baxen and wesbillman as code owners June 25, 2026 10:30

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ef9ab9d125

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

}

return {
html: renderPikchrPreview(renderedSvg),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve Pikchr dimensions when rendering previews

When pikchr-js returns an SVG without explicit width/height attributes (the fixture in these tests is one such SVG), this path discards the renderedPikchr.width/height values and renders only the sanitized SVG. Inline SVGs without dimensions fall back to browser default sizing, so small or non-default-size Pikchr diagrams in notes/sessions render at the wrong size instead of the dimensions computed by the renderer; pass those dimensions through or inject them into the sanitized SVG.

Useful? React with 👍 / 👎.

@matt2e matt2e merged commit 37d1727 into main Jun 25, 2026
6 checks passed
@matt2e matt2e deleted the diagram-library branch June 25, 2026 11:05
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.

1 participant