Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow customization of 0-size flow visibility #79

Open
nowthis opened this issue Jun 9, 2024 · 0 comments
Open

Allow customization of 0-size flow visibility #79

nowthis opened this issue Jun 9, 2024 · 0 comments

Comments

@nowthis
Copy link
Owner

nowthis commented Jun 9, 2024

Before b1af9c2, a 0-size flow in your inputs would result in an error message saying that you can't use 0 as a value, and those flows would not appear in the diagram at all.

Now that calculated flows can produce 0s, I had thought it would make sense to make such flows visible, primarily so you wouldn't wonder what happened to the line you had typed in.

However, in the few days since calculated flows have soft-launched, I've already been contacted about making 0-size flows disappear again.

  • I had not expected that anyone was relying on being able to include 0-flows in the input, never to be rendered, but I can see in hindsight that a reusable template of your typical flows could easily have some lines in it that you'd like to just not show every time. A [0] value would have been one way to achieve that effect.
  • (By the way: A workaround to produce similar behavior is to now use [] instead of [0]. A blank amount will mean, like the previous [0] did, that the flow will not appear at all in the diagram. Even better, SankeyMATIC won't call it an error any more.)

I think a more robust/complete solution for 0-size flows will be:

  1. Give the user an option somewhere to say whether they want 0-size flows to be visible in the diagram or not.
  2. If they are not visible, at least mention them in the Console output so that you can still be sure that they were noticed.
  3. At this time I'm thinking it would probably make more sense to have the default be to not have the 0-size flows be visible. I think that is what a new user would expect most of the time.

In addition, I think this presents an opportunity to handle flow-less Node declarations in a similar way.
Currently they just float in some unpredictable position by themselves.
I think it may be better to make them invisible by default (and log their existence) just like 0-size flows.

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

No branches or pull requests

1 participant