Skip to content

Commit 1c33ee9

Browse files
committed
Review
1 parent caabecf commit 1c33ee9

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/dialog-api.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ To show a progress dialog, call the method `studioPro.ui.dialogs.showProgressDia
230230
* `title`The title of the step, which is highlighted when the step runs.
231231
* `description`The description of the step, which shows at the bottom of the dialog next to the progress bar.
232232
* `action`The action the step performs that returns `Promise<true | string>`, where `string` indicates the reason for failure if the step fails, and `true` is returned otherwise.
233-
* `<resolveImmediatelyOnCancel>` - An optional boolean that, if provided, can only be `true`. If the developer needs the state that exists at the exact time of cancellation, then they can pass `true` for this parameter. The default behavior is that the cancelled step will finish, and the whole dialog will return the state that exists when the cancelled step is completed. If the developer needs the state that exists at the exact time of cancellation, then they can pass `true` for this parameter.
233+
* `<resolveImmediatelyOnCancel>` An optional boolean that, if provided, can only be `true`. By default, the canceled step finishes and the dialog returns the state that exists when the step completes. Pass `true` to instead return the state at the exact moment of cancellation.
234234

235235
A checkmark icon appears next to the step title when the step completes successfully. If one of the steps fails, the dialog closes and the remaining steps do not run.
236236

@@ -239,10 +239,10 @@ The `showProgressDialog` method returns a `Promise<ProgressDialogResult>`. `Prog
239239
* `result`A string that is either `Success`, `Failure`, or `UserCancelled`:
240240
* `Success`Returned when all steps return `true`.
241241
* `Failure`Returned when one step fails, causing the dialog to close.
242-
* `UserCancelled`Returned when the user closes the dialog and interrupts the process. The cancelled step still finishes executing, and unless `resolveImmediatelyOnCancel` is `true`, the final state of the result will contain the changes performed by the step.
242+
* `UserCancelled`Returned when the user closes the dialog and interrupts the process. By default, the canceled step finishes and the result reflects the state when it completes; if `resolveImmediatelyOnCancel` is `true`, the result reflects the state at the moment of cancellation.
243243
* `failedStep` (optional) – An object of type `FailedProgressStepResult` that describes the step that failed.
244244

245-
If the last step is cancelled, but it completed successfully, the whole result of the progress dialog will be `Success`.
245+
If the last step is canceled but completes successfully, the overall result is `Success`.
246246

247247
The `FailedProgressStepResult` object contains the following properties:
248248

@@ -316,8 +316,9 @@ export const component: IComponent = {
316316
};
317317
```
318318

319-
To see how `resolveImmediatelyOnCancel` influences the final state of the result, let's use the example above modified to set a value twice for each step into a dictionary called `state`. If `resolveImmediatelyOnCancel` is omitted when calling `showProgressDialog` (which is the default behavior), then the cancelled step will finish executing and the final result will have a value of `2` for the dictionary value set at that step.
320-
If however, the developer needs the cancelled step to not influence the final result, they should pass `true` for `resolveImmediatelyOnCancel`, and once the user cancels the progress dialog, the `state` dictionary will contain a value of `1` instead of `2` for the cancelled step.
319+
To see how `resolveImmediatelyOnCancel` influences the result, consider a modified version of the example above that sets a value twice per step into a dictionary called `state`. By default (when `resolveImmediatelyOnCancel` is omitted), the canceled step finishes executing and the result has a value of `2` for the dictionary entry set at that step.
320+
321+
To capture the state before the canceled step completes, pass `true` for `resolveImmediatelyOnCancel`. The `state` dictionary then contains a value of `1` instead of `2` for the canceled step.
321322

322323
```typescript
323324
const state: { [step: string]: number } = {};

content/en/docs/releasenotes/studio-pro/web-extensibility-api.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ These release notes cover changes to the [Extensibility API for Web Developers](
1111
## Version 11.12.2
1212

1313
* We fixed a bug where the Extensions Overview Page would not open if the user was not signed in.
14-
* We fixed a bug where reloading a Dev extension would cause a crash if tabs previously opened via an extension were not closed before the reload.
15-
* We fixed an issue where the progress dialogs did not behave as the C# counterpart, where cancelling a step still waited for it to finish and return its result. If the user still wants to exit the step and return the result immediately, they can still do so by passing `resolveImmediatelyOnCancel` to the `IDialogApi.showProgressDialog` method.
14+
* We fixed a bug where reloading a Dev extension would cause a crash if extension tabs were still open.
15+
* We fixed an issue where progress dialogs did not behave like their C# counterpart. Canceling a step now waits for it to finish and return its result. To exit the step and return its result immediately on cancel, pass `resolveImmediatelyOnCancel` to `IDialogApi.showProgressDialog`.
16+
1617
## Version 11.12.1
1718

1819
* We removed timeouts for Custom Blob Document consistency checks instead of showing a generic error in the **Errors** pane. We also added analytics to identify extensions that exceed the previous timeout.

0 commit comments

Comments
 (0)