Repository navigation
fix(designer-v2): show relative path parameters when running with a payload - #9704
Mohammad Malik (mohammad-malik) wants to merge 3 commits into
Conversation
…ayload
Request triggers with a relative path such as /subscription/{subscriptionId}
did not collect those parameters in the run-with-payload popover, and the
popover grew up underneath the Workflow, Code, and Run history switcher.
Show one value field per path parameter and append the resolved path to the
run URL. Limit the popover height so it stays below the view switcher.
🔒 AI Validation PendingThis PR is from an external contributor. AI validation will be performed after manual review. Maintainers: Add the |
There was a problem hiding this comment.
🟡 Changes recommended
Required invocation-path segments can be omitted, and parameter names matching inherited Object properties can crash the popover before users enter values.
2 open issues
What changed in this PR
Addresses #8555 by adding Request-trigger relative path inputs to designer-v2’s Run with payload popover and limiting its height to avoid covering the view switcher.
Changes:
- Collects path parameter values and applies them to published, draft, and callback run URLs.
- Adds a scrollable popover with height calculated from the designer surface.
- Adds localized labels and unit tests for parameter handling, run integration, and layout.
| File | Description |
|---|---|
Localize/lang/strings.json |
Adds relative-path labels and translation context. |
libs/logic-apps-shared/src/intl/src/compiled-lang/strings.json |
Adds compiled localized strings. |
libs/designer-v2/src/lib/ui/FloatingRunButton/styles.tsx |
Styles parameter rows and scrollable popover content. |
libs/designer-v2/src/lib/ui/FloatingRunButton/relativePath.ts |
Extracts parameter names, resolves values, and updates run URLs. |
libs/designer-v2/src/lib/ui/FloatingRunButton/payloadPopoverLayout.ts |
Calculates available popover height. |
libs/designer-v2/src/lib/ui/FloatingRunButton/payloadPopover.tsx |
Adds parameter inputs, validation, and height constraints. |
libs/designer-v2/src/lib/ui/FloatingRunButton/index.tsx |
Connects trigger templates and entered values to run requests. |
libs/designer-v2/src/lib/ui/FloatingRunButton/__tests__/relativePath.spec.ts |
Tests template parsing, encoding, and URL substitution. |
libs/designer-v2/src/lib/ui/FloatingRunButton/__tests__/payloadPopoverLayout.spec.ts |
Tests height calculation and missing-anchor handling. |
libs/designer-v2/src/lib/ui/FloatingRunButton/__tests__/payloadPopover.spec.tsx |
Tests parameter rendering, required values, and submission. |
libs/designer-v2/src/lib/ui/FloatingRunButton/__tests__/floatingRunButton.spec.tsx |
Tests resolved path inclusion in published run requests. |
Review effort: Balanced
| }, [onSubmit, method, headersValue, queriesValue, bodyValue, relativePathParameterNames, relativePathValues, setOpen]); | ||
|
|
||
| const runDisabled = useMemo(() => !!bodyError || !method, [bodyError, method]); | ||
| const relativePathIncomplete = relativePathParameterNames.some((name) => !(relativePathValues[name] ?? '').trim()); |
There was a problem hiding this comment.
Fixed in 492ee78. Values are now read through getRelativePathValue, which uses Object.hasOwn. Validation, the input value and the submitted map all go through it. Added tests for constructor, toString and __proto__.
| */ | ||
| export function appendResolvedRelativePath(url: string, template: string | undefined, values: Record<string, string> | undefined): string { | ||
| const resolved = resolveRelativePath(template, values); | ||
| if (!resolved || !url || url.includes(resolved)) { |
There was a problem hiding this comment.
Fixed in 492ee78. I removed the whole-URL check. Each run starts from a fresh callback URL, so there was no duplicate to guard against. Added a test where /{id} with subscriptions now resolves to /run/subscriptions.
…s append the path Path parameter names such as constructor, toString or __proto__ read inherited Object members, so the run popover crashed on .trim(). Read values through Object.hasOwn in validation, input binding and the submitted parameter map. Drop the whole-URL substring guard in appendResolvedRelativePath. A value like "subscriptions" already appears in every ARM run URL, so the guard skipped a required path and the run went to /run.
|
Both review threads are addressed in 492ee78. Could a maintainer add the |
…oad-relative-path-5214

Fixes #8555
Commit Type
Risk Level
What & Why
The Run with payload popover in the new designer never showed relative path parameters for a Request trigger, so a path such as
/subscription/{subscriptionId}had nosubscriptionIdinput. The same popover also grew upward underneath the Workflow, Code, and Run history switcher.The popover now renders one value field per relative path parameter and sends the resolved path on the run URL. Its height is limited to the space below the view switcher.
Impact of Change
relativePathParameters.Test Plan
pnpm run test:lib(12/12 tasks, designer v2 3573 tests) and the Floating Run Button unit tests (67 passed). Biome is clean on the changed files.Contributors
Screenshots/Videos