GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Upgrade plotly/d3-sankey to 0.12.3 by adamreeve · Pull Request #7830 · plotly/plotly.js

Conversation

@adamreeve

@adamreeve adamreeve commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Related to #7689

This pulls in various improvements and new features from upstream d3-sankey.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
adamreeve added 3 commits June 9, 2026 10:14
@adamreeve
Upgrade @plotly/d3-sankey to 0.12.3
457d6d9
@adamreeve
Update sankey baseline images
d12f46b
@adamreeve
Add draftlog entry
07fa77f
@adamreeve

adamreeve commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Marking as draft for now due to failing Jasmine test (https://github.com/plotly/plotly.js/actions/runs/27172958527/job/80215928449?pr=7830)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@adamreeve
adamreeve marked this pull request as draft June 8, 2026 23:19
@camdecoster camdecoster added this to the v4.0.0 milestone Jun 8, 2026
@camdecoster
camdecoster changed the base branch from master to v4.0 June 8, 2026 23:30
@camdecoster

camdecoster commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

I changed the base branch to v4.0 since this will be a breaking change.

adamreeve reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@camdecoster

camdecoster commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Let me know if you need help with the tests. Those sankey ones are pretty brittle.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@camdecoster

camdecoster commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

One last point that I found while testing things:

In @plotly/[email protected], calling sankey.nodePadding() after running the layout returned the effective (post-clamp) padding value. In 0.12.3 the getter returns the user-configured value instead, because upstream split the
internal state into separate dy (configured) and py (effective) variables.

This silently breaks the warning at src/traces/sankey/render.js#L76-L78:

if (sankey.nodePadding() < nodePad) {
    Lib.warn('node.pad was reduced to ', sankey.nodePadding(), ' to fit within the figure.');
}

After the upgrade, sankey.nodePadding() always equals nodePad, so the comparison is never true and the warning never fires. The layout itself still clamps correctly - only the diagnostic is affected.

Options to address the issue:

  • Remove the warning entirely
  • Derive the effective padding from the laid-out node positions (e.g. measure the gap between consecutive nodes in the densest column)
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@adamreeve

adamreeve commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

Options to address the issue:

Remove the warning entirely
Derive the effective padding from the laid-out node positions (e.g. measure the gap between consecutive nodes in the densest column)

Deriving the padding sounds fairly complicated just for the sake of a warning, but maybe we could expose the effective node padding with a new method in the sankey library to keep this behaviour.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@camdecoster

camdecoster commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

I'll file an issue and we can punt for now. It's not critical.

adamreeve reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@camdecoster camdecoster mentioned this pull request Jun 9, 2026
[BUG]: Sankey warning breaks in @plotly/d3-sankey v0.12.3 #7832
Open
camdecoster added 4 commits June 25, 2026 16:42
@camdecoster
Merge remote-tracking branch 'origin/v4.0' into d3-sankey-update
64df9c3
@camdecoster
Linting/formatting
d7231f6
@camdecoster
Update sankey tests to match new version of d3-sankey and be less bri…
41445c8
…ttle
@camdecoster
Comment out test instead of disabling with xit
6e72095
@camdecoster
camdecoster marked this pull request as ready for review June 26, 2026 18:56
@camdecoster
Update draftlog
6961619
camdecoster
camdecoster approved these changes Jun 26, 2026
View reviewed changes
@camdecoster
camdecoster merged commit b77a6f4 into plotly:v4.0 Jun 26, 2026
84 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@adamreeve

adamreeve commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for fixing the tests! Sorry I've been busy lately and hadn't got around to this

camdecoster reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@camdecoster

camdecoster commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

No worries. That's collaboration!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@adamreeve
adamreeve deleted the d3-sankey-update branch June 26, 2026 22:31
@adamreeve adamreeve mentioned this pull request Jun 29, 2026
feat: Allow fixing the vertical order of Sankey links, nodes #7873
Merged
This was referenced Aug 24, 2026
fix(sankey): derive effective node.pad clamp from layout geometry #7977
Closed
fix(sankey): restore node.pad clamp warning broken by d3-sankey v0.12 #7986
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@camdecoster camdecoster camdecoster approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

v4.0.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@adamreeve @camdecoster
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.