-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
fix: LEAP-1651: Properly update meta text for regions #6726
base: develop
Are you sure you want to change the base?
Conversation
Meta text is saved in regions by Normalization mixin and it's serialized into every result of this region. When we update the meta text we should get this value again from region, not previously stored one in result. So the priority of sources for meta value was changed. Plus "control meta" was removed.
✅ Deploy Preview for label-studio-docs-new-theme ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for heartex-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
It was a model field, so controlled state went through MST update anyway. And it's saved to actual meta in two places, so we can just get the real value there and make input uncontrolled.
/git merge
|
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.
Nice cleanup and context, this will help a lot in furthering our code cleanups!
area.meta is always there, at least as an empty object, so we have to check keys.
Meta text is saved in regions by Normalization mixin and it's serialized into every result of this region. When we update the meta text we should get this value again from region, not previously stored one in result.
So the priority of sources for meta value was changed. Plus "control meta" was removed.
normInput
is also removed, it was an excess field.PR fulfills these requirements
Change has impacts in these area(s)
Describe the reason for change
Meta text was not saved during annotation update, because the old saved value took precedence in serialization.
Does this PR introduce a breaking change?
It changes behaviour of meta data saving, but that's a rare feature with two data fields saved, easy to track.
What level of testing was included in the change?