Skip to content

Enhanced Graph 1.2.1

Choose a tag to compare

@github-actions github-actions released this 10 Oct 02:35
· 25 commits to main since this release

A fix release for types, colour and labels, all reported from a second vault.

The legend showed one colour and the graph drew another

A legend row's dot came from a hash of the type's name, while the node beside it was drawn
from the vault's per-type colour: concept appeared with a green dot next to blue nodes.
The built-in graph's legend was never given the colour table the canvas was using — one
missing argument. Both now read from the same source.

The same hash explains two types sharing a colour: it collides, and connection and
question collided in a real vault.

What is checked now, rather than assumed: every legend row's dot is compared against the
colour of a node of that type. The old checks compared a function's output with itself,
which is why both sides looked correct while the screen disagreed.

A type keeps its colour

A type's colour used to be recomputed from the sorted list of types, so the set changing
moved the colours: measured, adding one type repainted 13 of 13 existing types when it
sorted first, and 3 of 13 when it sorted last.

Each type is now given a free colour the first time it appears, stored in the vault's
settings, and keeps it. A type that disappears releases its colour; one that comes back is
treated as a new type, so the palette does not fill up with pages that no longer exist.
Deleting typeColorAssignments from the settings starts over.

The ramp itself is also ordered better. Assignment walks the ramp, so a vault uses a prefix
of it, and the first five entries used to be five reds — the closest pair within any prefix
was ΔE 19.0. Farthest-point ordering lifts the first five to ΔE 38.5 while leaving the
22-colour minimum at 19.0. Colours change once on upgrade, then stay put.

A type is shown the way the note writes it

Rows, the hover card, the right-click menu, the status line and the exported report all
showed the plugin's own word for a type: a note with type: synthesis was labelled 综述, and
paper was shown as paper · source. Every surface now shows the declared string, and the
22 translated type names are gone from the interface strings entirely, so nothing can
translate a type again. A note with no type at all still shows the type the plugin inferred.

npm run audit:colors

New, and it is what made the first bug findable. Against any vault it prints, per declared
type: the label, the legend swatch, the colour its nodes are drawn in, what an older build
would have drawn, and the analysis type. It reads the colours stored in the vault's own
data.json, so it reports what the plugin is using rather than a second opinion.

Also fixed

The test suite failed about one full run in four with four uncaught document is not defined
errors: an enhancer's safety-net timer outlived its test environment. Tests now record every
enhancer they start and stop it afterwards; five consecutive full runs are clean.