DRAFT: fix(core): Add non-cloneable attributes functionality #6375
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.
Even though the mirrored paths' Points are cloned, Uma displays warning messages for 2 points:
To fix this issue, this PR adds non-cloneable attributes (designated by having
noclone
in the key) that are filtered out during aclone()
operation. It also makes theplugin-mirror
'sdata-mirrored
attribute non-cloneable. The idea is that cloned Points should be considered to be fresh, new Points that haven't been mirrored before.(There are other ways this issue could be fixed, like renaming non-cloneable attributes to "get rid" of them while also preserving them. Or, setting
data-mirrored
count back to zero. But, I chose the method that has non-cloneable attributes that simply get omitted.)(There is another bug in
plugin-mirror
where it uses the non-existentpoint.name
in the warning message, resulting thePoint undefined
wording. But, I think I want to handle it in a separate PR.)Creating as a Draft PR for review, to see if the idea is okay. Also, I need to add tests for this new functionality.