-
Notifications
You must be signed in to change notification settings - Fork 27
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: relax diagnostic for special property #708
Conversation
🦋 Changeset detectedLatest commit: f3144a7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
if (!usedRequiredEl && altTypes) { | ||
// some property e.g `tooltip` can be used with both `aggregation binding info` or `property binding info`. Therefore `altTypes` is defined in design time. | ||
// if `altTypes` is present, check if any element is used. This is a very broad check to avoid false diagnostic. | ||
usedRequiredEl = element.elements[0]; |
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.
Does elements array always contain at least one element?
Maybe better here just exit the validation function with empty result?
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.
the exception is to check if there is at least one element present from either aggregation property binding
or property binding info
. If that element is not present, we still want to show diagnostic for mandatory property.
Issue: #707
Description
Some property e.g
tooltip
can be used with bothaggregation binding info
orproperty binding info
. Aggregation binding in this case requires mandatory property e.gpath
where property binding requires no mandatory property. Application user can decide to use eitheraggregation binding info
orproperty binding info
. This PR relax diagnostics check. If there is any element used, diagnostic for mandatory property is not checked.