Skip to content
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

Merged
merged 5 commits into from
Jan 27, 2025

Conversation

adrinr
Copy link
Collaborator

@adrinr adrinr commented Jan 27, 2025

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

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
image

Launchcontrol

Validation relationship fields in datasource settings in components.

Copy link

linear bot commented Jan 27, 2025

Copy link

qa-wolf bot commented Jan 27, 2025

QA Wolf here! As you write new code it's important that your test coverage is keeping up.
Click here to request test coverage for this PR!

@github-actions github-actions bot added firestorm Data/Infra/Revenue Team size/m labels Jan 27, 2025
@adrinr adrinr force-pushed the BUDI-8986/validate-screen-datasources branch from d4ebf7b to 679ef33 Compare January 27, 2025 09:55
@adrinr adrinr force-pushed the BUDI-8986/validate-screen-datasources branch from 679ef33 to 92606c6 Compare January 27, 2025 10:11
@@ -0,0 +1,74 @@
import { makePropSafe } from "@budibase/string-templates"
Copy link
Collaborator Author

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

@adrinr adrinr marked this pull request as ready for review January 27, 2025 10:12
@adrinr adrinr changed the title Budi 8986/validate screen datasources Validate screen relationship datasource settings Jan 27, 2025
Copy link
Contributor

@deanhannigan deanhannigan left a 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 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏

@adrinr adrinr merged commit 303beec into master Jan 27, 2025
20 checks passed
@adrinr adrinr deleted the BUDI-8986/validate-screen-datasources branch January 27, 2025 12:03
@github-actions github-actions bot locked and limited conversation to collaborators Jan 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
firestorm Data/Infra/Revenue Team size/m
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants