Skip to content

Offer TALA layout when bundled with d2, and fix edge fill in preview - #166

Open
KhaledQasim wants to merge 2 commits into
d2lang:masterfrom
KhaledQasim:feat/tala-layout
Open

KhaledQasim wants to merge 2 commits into
d2lang:masterfrom
KhaledQasim:feat/tala-layout

Conversation

@KhaledQasim

Copy link
Copy Markdown

Two small changes:

TALA in the layout picker. D2: Pick Layout only offered tala when a standalone d2plugin-tala binary was on PATH. Now that TALA ships bundled with d2, most users never saw the option. The picker now asks d2 via d2 layout, which lists every engine it can use (bundled or plugin), and keeps the PATH check as a fallback.

Preview rendering bug. The path { fill: ... } rule in previewPage.html, meant for the toolbar icons, also applied to the diagram's SVG. CSS beats SVG presentation attributes, so edges with fill="none" were painted solid, which broke the preview of any diagram with connections. The rule is now scoped to #toolbar path.

Tested with d2 v0.9.0: tala appears in the picker and previews render correctly.

The global `path { fill: ... }` rule in previewPage.html, added to color
the toolbar's zoom/refresh icons, also overrode the fill on the injected
D2 diagram's own paths. Since a CSS rule beats an SVG presentation
attribute, every edge (fill="none") got painted solid instead of staying
stroke-only, corrupting the preview of any diagram with connections.
TALA now ships bundled with d2, so the layout picker only offering it
when a standalone `d2plugin-tala` binary is on PATH hid it from most
users. Ask d2 directly via `d2 layout`, which lists every engine it can
use (bundled or plugin), and keep the PATH check as a fallback.
@KhaledQasim

Copy link
Copy Markdown
Author

Hello,
@alixander @samsonasu @rverchere @jogly

Any updates on this?

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