[#188045959] Sampler changes to use attr and collection IDs to send data to CODAP#144
Open
[#188045959] Sampler changes to use attr and collection IDs to send data to CODAP#144
Conversation
… may have been changed. Make names less mutable. Only changes the title prop when user changes variable name.
lublagg
reviewed
Sep 17, 2024
| const attrKey = _this.findKeyById(id); | ||
| // update the device name if the user has changed it in the codap table | ||
| if (attrKey === "output" && _this.attrMap["output"].name !== attrName) { | ||
| if (attrKey === "output" && _this.attrMap.items["output"].name !== attrName) { |
Contributor
There was a problem hiding this comment.
Should this check if _this.attrMap.items["output"].title is not equal to attrName (since the title property changes but not the name property?
| if (getDatasetResult && !getDatasetResult.success) { | ||
| if (deviceName && deviceName !== _this.attrMap.items["output"].name) { | ||
| _this.deviceName = deviceName; | ||
| _this.attrMap.items["output"].name = deviceName; |
Contributor
There was a problem hiding this comment.
Same question here about checking title vs name.
Contributor
There was a problem hiding this comment.
Actually, nevermind. I see we would be creating the new attribute with the new deviceName.
I do wonder if it would be better to always keep the name of this attribute 'output' and only change the title to the deviceName, though.
| attrs: [{name: deviceName,title: deviceName}] | ||
| name: _this.collectionMap.items.name, | ||
| parent: _this.collectionMap.samples.id, | ||
| attrs: [{title: deviceName}] |
Contributor
There was a problem hiding this comment.
Should this attr have a name property also?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Changes sending data to CODAP using attr IDs and collection IDs which may have been changed.
Make names less mutable. Only changes the title prop when user changes variable name.