Skip to content

v2.6.1 - edge-styler crash fix, selection fixes and TypeScript accuracy

Choose a tag to compare

@stevenweaver stevenweaver released this 20 Oct 00:26
7a1cfbc

What's Changed

Bug fixes

  • edge-styler no longer crashes after a selection change (branch click, node menu, brush). This had been present since 1.0.0. (#525, fixes #522 and #524)
  • Node <g> elements now get node-selected, node-collapsed and node-tagged classes on every update, and stale classes are removed. (#533)
  • The css-classes option and css() now apply only to the tree they are called on, instead of every tree on the page. (#533)
  • "Hide this subtree" now hides the whole subtree. Hiding a node through modifySelection(…, "notshown", …) hides its descendants too, instead of leaving them drawn with coordinates that grew on every update. (#533)
  • binary-selectable: true no longer throws on every selection change, and it honours mode. (#533)
  • multi-set selection membership is now keyed by node, so unnamed or duplicate-named nodes no longer share membership. (#533)
  • Removed a dead node_styler block from refresh(). (#528)

TypeScript

  • phylotree.d.ts now matches the runtime API: style_nodes/style_edges, the full set of render options including edge-styler, modifySelection's real signature, and a type-only TreeRender. It now type-checks with skipLibCheck: false. @types/d3 is now a dependency, because the declarations import d3's types. (#533)

Packaging and tooling

  • The package declares engines.node >= 20, which its commander@14 dependency already required. (#533)
  • dist/phylotree-menus.css is now included in the package. (#533)
  • prepublishOnly builds and tests before publishing. (#533)
  • yarn test, serve and the docs:* scripts now work on Windows. docs:watch and docs:validate work again. (#529, #531, #533)
  • CI runs on Windows as well as Linux, and type-checks the declarations. (#533)
  • Live demo: https://veg.github.io/phylotree.js/. Every pull request now gets a preview deploy. (#534, #535, #536)

Dependency updates

  • fast-xml-parser 5.5.7 → 5.7.0 (#516), fast-xml-builder → 1.3.1 (#517), markdown-it 14.2.0 (#518), js-yaml 4.3.0 (#519).
  • Earlier bumps since 2.6.0: rollup (#506), underscore (#507), fast-xml-parser (#511), flatted (#512), handlebars (#513), lodash (#514), follow-redirects (#515).

Behaviour changes to be aware of

  • Selected, collapsed and tagged nodes now actually receive their CSS classes, so the existing rules in phylotree.css start to apply.
  • Code that relied on one tree's css() restyling other trees no longer works that way.

Thanks to @YehyaBELHAMRA for the detailed reports and fixes behind #524–#532.

Full Changelog: v2.6.0...v2.6.1