-
Notifications
You must be signed in to change notification settings - Fork 455
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
feat(imageIdSpecificStateManager): add set
imageIdToolState function
#1341
feat(imageIdSpecificStateManager): add set
imageIdToolState function
#1341
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1341 +/- ##
==========================================
+ Coverage 19.53% 19.58% +0.05%
==========================================
Files 286 286
Lines 10120 10128 +8
Branches 2065 2066 +1
==========================================
+ Hits 1977 1984 +7
- Misses 6930 6931 +1
Partials 1213 1213
Continue to review full report at Codecov.
|
…ctions There is currently no function to consume the same output from getImageIdToolState, which is the state of a specific tool for the given imageId. addElementToolState requires a single item input, and without replace, requires both a clear step and an iteration over all items to add into the tool's id-specific state.
cd05ac4
to
3650e05
Compare
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.
This seems perfectly in line with the existing methods, and I'm sure there are plenty of other teams who could benefit from this.
@dannyrb ? |
Can we call it |
replace
imageIdToolState functionset
imageIdToolState function
@swederik renamed functions. Once the test pass I'll merge it. |
🎉 This PR is included in version 5.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
A function to replace the tool-specific tool state in the imageId toolstate global manager.
What is the current behavior? (You can also link to an open issue here)
There is currently no function to consume the same output from
getImageIdToolState()
, (an object like{'data':[...]}
) which is the state of a specific tool for the given imageId.addElementToolState()
requires a single item input,and without a replace function, requires both a
clearImageIdToolState()
step and an iteration over all items to add into the tool's id-specific state, or restoring the ENTIRE imageId tool state manager with data from ALL tools.What is the new behavior (if this is a feature change)?
New function on the
globalImageIdToolStateManager
object.Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
No
Other information: