-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Validate screen relationship datasource settings #15439
Conversation
QA Wolf here! As you write new code it's important that your test coverage is keeping up. |
d4ebf7b
to
679ef33
Compare
679ef33
to
92606c6
Compare
@@ -0,0 +1,74 @@ | |||
import { makePropSafe } from "@budibase/string-templates" |
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 has been moved from packages/builder/src/components/design/settings/controls/DataSourceSelect/DataSourceSelect.svelte
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.
LGTM!
@@ -24,3 +24,18 @@ export type InsertAtPositionFn = (_: { | |||
value: string | |||
cursor?: { anchor: number } | |||
}) => void | |||
|
|||
export interface UIBinding { |
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.
🙏
Description
Adding validation for relationship fields in datasource selectors. Follow up of #15433
Before
If a component was referencing an element it did not exist on the component chain, it would not complain. It would just return no rows.
Screen.Recording.2025-01-27.at.10.58.32.mov
The same would happen if the relationship were dropped
![image](https://private-user-images.githubusercontent.com/15987277/406873798-4656186e-d4d7-4845-b70e-1dd75a37765b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxMDY2NjksIm5iZiI6MTczOTEwNjM2OSwicGF0aCI6Ii8xNTk4NzI3Ny80MDY4NzM3OTgtNDY1NjE4NmUtZDRkNy00ODQ1LWI3MGUtMWRkNzVhMzc3NjViLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDEzMDYwOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTlkMDRhNjE5MDJiZTcyZDg3M2Q2MTU3MmFlNWQ0NTliMzgyNzJkZmQxNmJhMzA4YTQ4NjY0YjY2NDc4MzZmY2YmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.1xEHCNd2XymR_bDfyY3_BdfcClD9nCYL9jA5dL-x84w)
After
The component using the invalid datasource will complain (either because of a wrong component tree or a dropped relationship)
Screen.Recording.2025-01-27.at.11.05.33.mov
Launchcontrol
Validation relationship fields in datasource settings in components.