feat(studio): input + result dialogs for metadata-type actions#1838
Merged
Conversation
Metadata type-level actions (MetadataTypeActions) previously only fired an api
fetch + toast — no input dialog, unlike business-object actions. Add dialog
support by reusing the shared runtime dialog components:
- params declared as an array of ActionParam descriptors are now collected from
the user via ActionParamDialog before the request (the collected values are
the request body + ${param.X} token source); a static params object still
forwards as-is (backward compatible).
- actions declaring resultDialog render the API response in ActionResultDialog;
otherwise a success toast (now honoring successMessage/errorMessage).
- confirmText + auth-aware fetch + refreshAfter unchanged.
This lets type-level actions (e.g. a future datasource 'sync objects' action)
collect inputs and show rich results, matching business-object action UX.
Tests: no-params direct run, array-params dialog → body, resultDialog reveal.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
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.
Summary
Metadata type-level actions (
MetadataTypeActions, e.g. datasource "Test connection") previously only fired anapifetch + toast — no input dialog, unlike business-object actions. This adds dialog support by reusing the shared runtime dialog components:paramsdeclared as an array of ActionParam descriptors are now collected from the user viaActionParamDialogbefore the request (collected values become the request body +${param.X}token source). A staticparamsobject still forwards as-is — backward compatible.resultDialogrender the API response inActionResultDialog; otherwise a success toast (now honoringsuccessMessage/errorMessage).confirmText+ auth-aware fetch +refreshAfterunchanged.This lets type-level actions (e.g. a future datasource "sync objects" action) collect inputs and show rich results, matching business-object action UX — the prerequisite we identified for wiring datasource sync into Studio.
Verification
3 new unit tests (no-params direct run, array-params → dialog → body, resultDialog reveal); full metadata-admin suite (277) passes; type-checks. The existing no-params
test_connectionpath is unchanged. (Livedatasourcehas no runtime records in the showcase — read-only/code-defined — so the button isn't browser-reachable there; the new branches are covered by the unit tests.)🤖 Generated with Claude Code