Show whether changes to a method are saved or not#2611
Merged
robertbrignull merged 5 commits intomainfrom Jul 18, 2023
Merged
Conversation
robertbrignull
commented
Jul 14, 2023
| !externalApiUsage.supported || | ||
| (modeledMethod && modeledMethod?.type !== "none"); | ||
| (modeledMethod && modeledMethod?.type !== "none") || | ||
| modifiedSignatures.has(externalApiUsage.signature); |
Contributor
Author
There was a problem hiding this comment.
This change is attempting to mitigate a but where when you change a method from "modeled" to "unmodeled" and then save it'll temporarily show as "modeled by codeql or another pack". This bug appears on main as well and is in fact more noticeable there. I'm going to look into this and I'm hoping to address it separately.
koesie10
reviewed
Jul 18, 2023
Member
koesie10
left a comment
There was a problem hiding this comment.
Changes look good to me, just some comments about the organization of the code
koesie10
approved these changes
Jul 18, 2023
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.
This PR replaces the checkbox on each method row with an icon that shows whether that method is modelled, whether there have been any changes to that row, and whether those changes are saved or not.
Screenshot:

Implementing this involved changing how we track changes, to track individual methods instead of entire models. Thankfully this was fairly easy to implement and I think actually made things a little clearer overall. I haven't tried to remember what the original state was, so if you make a change and then revert it then the method will still show as changed and unsaved, but I think this behaviour is acceptable here.
Checklist
ready-for-doc-reviewlabel there.