Chore: Add families handling to create instances - #1994
Open
iLLiCiTiT wants to merge 4 commits into
Open
Conversation
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.
Changelog Description
Create instances have families that can be tracked and it is possible to listen to changes.
Additional info
CreatedInstance object now have
familiesattribute stored under"families"key on the instance. It does allow to trigger value changes so a plugin can listen to the changes and show/hide attributes based on families.This PR is preparation for other features, like #1818 .
Added helper decorator
refresh_instance_attributesto easily trigger refresh of attribute definitions in most of the simple cases.Testing notes:
Validate code changes.
Changing families in any way shape or form does trigger and value changed event for
"families"key on an instance.This PR should not break integrations where families were already filled during create phase!