v1.3.0: scorecard + mobile fix, fold in PRs, esbuild + nix flake#29
Merged
Conversation
Polishes the plugin to clear the community-plugin-page scorecard (60% HealthFair/ReviewCaution) and resolve the open issue/PR backlog. Rendering - Drop `Buffer` (Node-only, threw on mobile) for chunk-safe browser base64 (0x8000-byte chunks, then btoa). Fixes #8. - Drop `dest.innerHTML = result` (the headline scorecard flag). Desktop now fetches the SVG via `request()`, parses with DOMParser, and appends the parsed <svg> so in-SVG links / imagemaps stay clickable (#9). On mobile (`Platform.isMobile`) or on any parse failure, fall back to <img src=krokiUrl>. If Kroki returns a non-SVG body (e.g. a syntax error), the error text is rendered inline in a .kroki-error block instead of a broken-image icon. Folded-in PRs - @from_file:<vault-relative path> include keyword (PR #25), via getAbstractFileByPath + instanceof TFile + cachedRead (no minAppVersion bump). Missing file -> inline .kroki-error. - Per-diagram PNG download + niolesk Edit links (PR #20), built with DOM helpers, styled in styles.css. - New diagram types DBML, Symbolator, TikZ (PR #23) + kroki-test.md examples; replace the broken UMlet example with a working modern-schema one (<diagram program="umletino"> / <id>UMLClass</id>). Wrap the TikZ example in \documentclass{standalone} + \begin{document}. - Browser base64 (PR #26) -- superseded by the chunk-safe implementation. Per-type header inputs - The legacy single 'header' setting (inherited from upstream obsidian-plantuml, never actually applied here) was the wrong shape: each of the four languages that accept top-of-source directives (PlantUML, C4-PlantUML, Structurizr, Mermaid) has its own syntax, and the other ~25 types break on any prelude. - Replace it with settings.headers: Record<kroki, string>, populated via a dedicated full-width textarea inside each supported diagram type's own settings card. Per-type placeholder + help text. - Diagram types not in HEADER_SUPPORTED_TYPES show no header field and receive no prepend. - loadSettings migrates the legacy 'header' value into headers.plantuml on first load and drops the old field. Settings tab - Setting.setHeading() instead of raw createEl("h3") / <p>. - New 'White background' toggle adding .kroki-bg-white (#2 -- helps with transparent SVGs on dark themes). - Per-type inline header textarea (full-width, vertically resizable, monospaced) inside each supported diagram type's card. - Remove all console.log; remove dead img/useMap code; remove the unused 'toggle' field that was being persisted into data.json. Styles - New CSS: .kroki-diagram (centered, max-width:100% -- #7), .kroki-bg-white, .kroki-actions, .kroki-error, .kroki-header-row, .setting-item.kroki-with-header (flex-wrap to let the header row sit full-width). Build + dev shell - rollup -> esbuild (esbuild.config.mjs); delete rollup.config.js. - Bump deps: typescript@5, @types/node@22, eslint@8 + @typescript-eslint@7, pako@2, tslib, esbuild, builtin-modules. - Modernise tsconfig.json: target ES2018, strictNullChecks, isolatedModules, skipLibCheck. - Add Nix flake dev shell (flake.nix + flake.lock + .envrc) with Node 22 via `nix develop`. CI / release workflows - main.yml + publish.yml: actions/checkout@v4, actions/setup-node@v4 with Node 22, npm (not yarn), softprops/action-gh-release@v2. Drop the deprecated actions/create-release@v1 + actions/upload-release-asset@v1 and the ::set-output usage. - publish.yml now uploads only main.js / manifest.json / styles.css (no zip -- Obsidian doesn't need it). - main.yml also runs npm run build so type errors fail CI. Docs - README: new 'Supported diagram types' table near the top (all 29 types, linked to their upstream projects, with notes for the three default-disabled types). - README + kroki-test.md: note that diagramsnet requires a self-hosted Kroki with the yuzutech/kroki-diagramsnet companion (public kroki.io returns 503), and that mermaid / plantuml are disabled by default to avoid clashing with Obsidian / the PlantUML plugin. - README: explain the per-type inline header inputs. Version - manifest.json + package.json -> 1.3.0. - versions.json adds "1.3.0": "0.13.25" (minAppVersion unchanged). Closes #2, #7, #8, #9. Supersedes PRs #20, #23, #25, #26.
This was referenced May 14, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
v1.3.0: scorecard + mobile fix, fold in PRs, esbuild + nix flake
Polishes the plugin to clear the community-plugin-page scorecard
(60% HealthFair/ReviewCaution) and resolve the open issue/PR backlog.
Rendering
Buffer(Node-only, threw on mobile) for chunk-safe browserbase64 (0x8000-byte chunks, then btoa). Fixes Diagrams don’t render on Obsidian mobile #8.
dest.innerHTML = result(the headline scorecard flag).Desktop now fetches the SVG via
request(), parses with DOMParser,and appends the parsed so in-SVG links / imagemaps stay
clickable (obsidian internal links not working for graphviz #9). On mobile (
Platform.isMobile) or on any parsefailure, fall back to
Folded-in PRs
getAbstractFileByPath + instanceof TFile + cachedRead (no
minAppVersion bump). Missing file -> inline .kroki-error.
DOM helpers, styled in styles.css.
examples; replace the broken UMlet example with a working
modern-schema one ( / UMLClass).
Wrap the TikZ example in \documentclass{standalone} + \begin{document}.
Per-type header inputs
obsidian-plantuml, never actually applied here) was the wrong shape:
each of the four languages that accept top-of-source directives
(PlantUML, C4-PlantUML, Structurizr, Mermaid) has its own syntax,
and the other ~25 types break on any prelude.
via a dedicated full-width textarea inside each supported diagram
type's own settings card. Per-type placeholder + help text.
and receive no prepend.
headers.plantuml on first load and drops the old field.
Settings tab
.
with transparent SVGs on dark themes).
monospaced) inside each supported diagram type's card.
unused 'toggle' field that was being persisted into data.json.
Styles
.kroki-bg-white, .kroki-actions, .kroki-error, .kroki-header-row,
.setting-item.kroki-with-header (flex-wrap to let the header row
sit full-width).
Build + dev shell
@typescript-eslint@7, pako@2, tslib, esbuild, builtin-modules.
isolatedModules, skipLibCheck.
Node 22 via
nix develop.CI / release workflows
with Node 22, npm (not yarn), softprops/action-gh-release@v2.
Drop the deprecated actions/create-release@v1 +
actions/upload-release-asset@v1 and the ::set-output usage.
(no zip -- Obsidian doesn't need it).
Docs
types, linked to their upstream projects, with notes for the three
default-disabled types).
Kroki with the yuzutech/kroki-diagramsnet companion (public kroki.io
returns 503), and that mermaid / plantuml are disabled by default to
avoid clashing with Obsidian / the PlantUML plugin.
Version
Closes #2, #7, #8, #9. Supersedes PRs #20, #23, #25, #26.