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

Global Bindings can be broken by deleting and re-updating #75

Open
quigleyj-mavenomics opened this issue Nov 25, 2019 · 0 comments
Open
Labels
bug Something isn't working parts Issues with Parts, Bindings, or the PartManager

Comments

@quigleyj-mavenomics
Copy link
Member

Bindings are normally two-way- a change to one side of the binding will flow to the other. However, deleting and re-adding a global may break this.

(note- this repro is somewhat fragile- the "Any" type seems important)

  1. Create an empty dashboard
  2. Add a LabelPart, bind an option to a global "Foo"
  3. Create a global "Foo" with type Any and some value like "bar", and hit "Apply"

At this point, the LabelPart will still be in a "Fresh" state, which is wrong. It must be in an "Error" state, since the global it was bound to no longer exists. Continuing on...

  1. Delete the global and hit Apply.
  2. Create a new global "Foo" with type Any and a different value like "baz", and hit apply

At this point, the LabelPart won't update with the new value of Foo- likely because it was never checked to see if any missing globals could be bound, since it was still "fresh"

  1. Duplicate the LabelPart- observe that the duplicate is bound correctly
  2. Refresh the old/stale LabelPart and notice that the global updates, as does the other part
  3. Change the value of the global and notice that only the duplicated LabelPart updates

There's 3 bugs here but they may all have the same root cause:

  • Global deletion doesn't mark bound options as errors
  • Re-adding a deleted global doesn't re-bind previously bound options
  • A global update is accepted by the framework regardless of whether the option was really 2-way-bound
@quigleyj-mavenomics quigleyj-mavenomics added bug Something isn't working parts Issues with Parts, Bindings, or the PartManager labels Nov 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working parts Issues with Parts, Bindings, or the PartManager
Projects
None yet
Development

No branches or pull requests

1 participant