Implement missing values component #123
Merged
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.
This PR implements the version of the missing value component we have discussed in #58. The component does not detect or create missing values, it only does two things:
Writing to
missingColumnValues
in the store via thesetMissingColumnValues
mutation was not reactive, because Vue doesn't track indexed changes to Objects (see https://v2.vuejs.org/v2/guide/reactivity.html). I have replaced the store logic with anObject.assign
statement. This will continue to work with the partial updates we are receiving from the annotation tab,Example:
Another thing I did here is to give the missing Value Component direct access to the store state. This is different from what we do for the other components and what was previously done, where we give only the pages (e.g. annotation) access to the store and then provide/inject or prop-chain the information down to the components. Two reasons why I did it this way here:
valueDescription
)none of the other components needs access to this information so provide / inject seems a bit overkill. similarly so would be propsedit: I just realized that this is not true. Other components will need this as well. So yeah, maybe we should use provide / injectBut open to change to props or provide / inject.
Sidenotes:
Resolves #58