-
Notifications
You must be signed in to change notification settings - Fork 7
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
Implement missing values discrete #132
Conversation
- discrete values component now has an extra UI element (red button) for each unique value that can label this value as "missing" - so far it doesn't do anything beyond being visible
- discrete value component can now emit an event when the "missing value" button is clicked to ask that the corresponding value be labeled as missing - the event is forwarded up to the annotation page - on the annotation page, a new method addMissingValue handles the event and saves the information to the global store
- only display unique values to be annotated that are not missing values - designating a value as missing now removes it from the list of values to be annotated and will
- annotation status will be true only when all unique values are mapped to a value that is not null and - if any non-mapped values are labeled as missing.
A number of things have changed in order to have a reactive annotation state check that can handle these cases: - an unannotated value has been declared missing - a unique value has been annotated Changes: - the valueMapper initialization has to happen during the "created" lifecycle stage so that we can use the valueMapping property in a computed prop - the button status is now computed property - this change allows us to scrap the previous watcher hack for the relevantColumn Property - in order to merge new annotations with the valueMapper property while not breaking reactivity, we have to do a deep merging of the objects. This is now done inside the updateMapping method
- discrete values component now has an extra UI element (red button) for each unique value that can label this value as "missing" - so far it doesn't do anything beyond being visible
- discrete value component can now emit an event when the "missing value" button is clicked to ask that the corresponding value be labeled as missing - the event is forwarded up to the annotation page - on the annotation page, a new method addMissingValue handles the event and saves the information to the global store
- only display unique values to be annotated that are not missing values - designating a value as missing now removes it from the list of values to be annotated and will
- annotation status will be true only when all unique values are mapped to a value that is not null and - if any non-mapped values are labeled as missing.
A number of things have changed in order to have a reactive annotation state check that can handle these cases: - an unannotated value has been declared missing - a unique value has been annotated Changes: - the valueMapper initialization has to happen during the "created" lifecycle stage so that we can use the valueMapping property in a computed prop - the button status is now computed property - this change allows us to scrap the previous watcher hack for the relevantColumn Property - in order to merge new annotations with the valueMapper property while not breaking reactivity, we have to do a deep merging of the objects. This is now done inside the updateMapping method
- discrete values component now has an extra UI element (red button) for each unique value that can label this value as "missing" - so far it doesn't do anything beyond being visible
- only display unique values to be annotated that are not missing values - designating a value as missing now removes it from the list of values to be annotated and will
A number of things have changed in order to have a reactive annotation state check that can handle these cases: - an unannotated value has been declared missing - a unique value has been annotated Changes: - the valueMapper initialization has to happen during the "created" lifecycle stage so that we can use the valueMapping property in a computed prop - the button status is now computed property - this change allows us to scrap the previous watcher hack for the relevantColumn Property - in order to merge new annotations with the valueMapper property while not breaking reactivity, we have to do a deep merging of the objects. This is now done inside the updateMapping method
…e' into implement-missing-values-discrete
I did a bit of a funny with my rebasing (picked master instead of the previous feature branch this was based off of). So for now, ignore the commit history of this branch. I will probably do another rebase to clean this up before we merge it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few code cleanup items to attend, and my one question on the multi-level Object.assign
. Other than that, I tested and it works as described in the writeup.
You're clear to merge once (and if) you're addressing the |
This PR implements the interface and logic to declare missing values in the discrete-values component (atm used for the sex category).
Criteria from the issue were:
Accept when:
when that happens, the mapping of the value should be empty and the annotation status should be consider incompleteThe main addition here was making the state check for the "save annotation" button a computed property and turn all of its dependencies (e.g.
this.valueMapping
) reactive.Resolves #120