-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Preview URLs: Client-side previewOption extension kind
#20391
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
Merged
iOvergaard
merged 16 commits into
v17/feature/preview-urls
from
v17/feature/preview-urls-client
Oct 7, 2025
Merged
Preview URLs: Client-side previewOption extension kind
#20391
iOvergaard
merged 16 commits into
v17/feature/preview-urls
from
v17/feature/preview-urls-client
Oct 7, 2025
Conversation
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
from Management API
Fixed TS errors Added temp stub for `getPreviewUrl`
reworked using the "default" `previewOption` kind.
to a more suitable filename. Exported element so can be reused in other packages, e.g. documents, for the new "save and preview" feature.
to work with first action's manifest/API.
Re-engineered to make a "urlProvider" kind for `workspaceActionMenuItem`. This is to simplify the extension point and surrounding logic.
to accept a URL Provider Alias.
to extend `UmbWorkspaceActionElement`. This did mean exposing certain methods/properties to be overridable.
urlProvider extension kindpreviewOption extension kind
This comment was marked as resolved.
This comment was marked as resolved.
iOvergaard
approved these changes
Oct 7, 2025
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.
Note
This pull request has been developed on top of #20021, with a view to merge this into that, to have a PR contain a single unified feature.
Description
Introduces a
previewOptionkind for theworkspaceActionMenuItemextension-type. This will enable a 3rd-party implementation to define a custom preview option for their own target preview environment, (using a server-side registeredIUrlProvider, see #20021 for further details).The default "Save and preview" action has been refactored to make use of the new extension kind.
How to test?
Initially, test that the built-in "Save and preview" action/button still works as expected.
Next, try adding a custom
previewOptionextension kind...Notice that the custom preview option replaces the core "Save and preview" button (moving it an addition workspace-action-menu-item). This is configurable by the weighing, the core option is weighted at
100.If the custom URL provider has not been registered on the server, then pressing the action in the result in an error, (the message is provided by the server).
With a custom
IUrlProviderregistered on the server, the target URL of the preview environment will be returned and a new tab/window will be opened for the user.