Ensure modified methods updated after changing a method from the modeling panel#2929
Ensure modified methods updated after changing a method from the modeling panel#2929
Conversation
starcke
left a comment
There was a problem hiding this comment.
Looks good, happy to go with this as a bugfix - but I wonder if we can streamline the modeled and modified method calls?
| activeState.databaseItem, | ||
| msg.method, | ||
| ); | ||
| this.modelingStore.addModifiedMethod( |
There was a problem hiding this comment.
It seems we often have to call addModifiedMethod(s) after methods like updateModeledMethod and addModeledMethods. I wonder if we can move the call to update the modified methods inside the store so that the caller does not have to remember to call both functions?
There was a problem hiding this comment.
Yes I'd definitely like to move towards that, it's a good idea. In general I can see a few simplifications/improvements we could make around the modeling store. But I think of this as v1, with a lot of features currently in flux, so I'd rather wait a bit before tidying things up. Basically let it evolve a bit and then come back and address some tech debt once we have a fuller picture of its use.
Small change to make sure we update the modified methods state when the modeled method gets updated. If we don't do that we can end up in a situation where the state/UI is out of date. For example the following bug exists in the current code:
At this point the second method should be marked as modeled, but it isn't.
Checklist
N/A:
ready-for-doc-reviewlabel there.