Show validation results in the model editor#2997
Merged
robertbrignull merged 5 commits intomainfrom Oct 19, 2023
Merged
Conversation
5c2b456 to
fa185d9
Compare
fa185d9 to
0af77d0
Compare
Contributor
Author
|
I can add some tests, but this is the general idea of how the UI will look and behave. |
koesie10
approved these changes
Oct 19, 2023
Member
koesie10
left a comment
There was a problem hiding this comment.
LGTM, but adding a few tests and a story showing the validation errors would definitely be useful
| type Props = { | ||
| error: ModeledMethodValidationError; | ||
| setSelectedIndex: (index: number) => void; | ||
| setSelectedIndex?: (index: number) => void; |
Member
There was a problem hiding this comment.
It would be nice if we were able to highlight the model on which the error is located, but this can still be added in a follow-up PR if this is something that comes out of a design review.
Contributor
Author
There was a problem hiding this comment.
I've opened a separate issue for this so we don't forget it.
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.
Implements displaying validation in the model editor. Each validation result is added as a
span 5grid cell, so it sits underneath the modelings.I wasn't sure whether the validation errors should span the full width or sit only underneath the modelings. I went with just under the modelings, but changing this would be very easy to do now or in the future.
For now I've disabled the "click on error to highlight model" functionality. I think it's less useful here than it is for the method modeling panel because all the modelings are visible at once and it's not that the invalid bit is on a different page. If we want to we could add highlighting of individual modelings, but it would add a little complexity.
Screenshot:
Checklist
ready-for-doc-reviewlabel there.