Skip to content

ref(settings): migrate integration org settings#110666

Merged
TkDodo merged 48 commits intomasterfrom
tkdodo/ref/de-948-migrate-integration-org-settings
Mar 18, 2026
Merged

ref(settings): migrate integration org settings#110666
TkDodo merged 48 commits intomasterfrom
tkdodo/ref/de-948-migrate-integration-org-settings

Conversation

@TkDodo
Copy link
Collaborator

@TkDodo TkDodo commented Mar 13, 2026

This PR adds a mapping layer for when the backend sends a json structure, so that we can render form fields with the new scraps form system based on them.

A lot of field types are supported out of the box, and this PR also adds 3 custom fields for the following field types:

  • choice_mapper
  • project_mapper
  • table

The BackendJsonFormAdapter is then used for organizationIntegration.

@linear-code
Copy link

linear-code bot commented Mar 13, 2026

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 13, 2026
Copy link
Member

@natemoo-re natemoo-re left a comment

Choose a reason for hiding this comment

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

🥔 Great work!

case 'string':
case 'text':
case 'url':
case 'email':
Copy link
Member

Choose a reason for hiding this comment

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

Should we use z.email()? Not sure how strict our validation is currently.

return z.boolean();
case 'string':
case 'text':
case 'url':
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Comment on lines +294 to +297
value={fieldApi.state.value}
onChange={fieldApi.handleChange}
placeholder={field.placeholder}
disabled={field.disabled}
Copy link
Member

@natemoo-re natemoo-re Mar 17, 2026

Choose a reason for hiding this comment

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

Would be nice to preserve types for url and email here for browser suggestions?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Member

@natemoo-re natemoo-re Mar 17, 2026

Choose a reason for hiding this comment

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

[Praise] These are well done!

mutationFn: (data: Record<string, unknown>) =>
fetchMutation({method: 'POST', url: integrationEndpoint, data}),
onSuccess: () => {
return queryClient.invalidateQueries({
Copy link
Member

Choose a reason for hiding this comment

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

Seems like a reasonable trade-off. It'd be nice to add your comment here as an inline comment for future visitors!

Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

@TkDodo TkDodo merged commit bf3c94b into master Mar 18, 2026
64 checks passed
@TkDodo TkDodo deleted the tkdodo/ref/de-948-migrate-integration-org-settings branch March 18, 2026 11:37
JonasBa pushed a commit that referenced this pull request Mar 18, 2026
This PR adds a mapping layer for when the backend sends a json
structure, so that we can render form fields with the new scraps form
system based on them.

A lot of field types are supported out of the box, and this PR also adds
3 custom fields for the following field types:

- choice_mapper
- project_mapper
- table

The `BackendJsonFormAdapter` is then used for `organizationIntegration`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants