Site query params to configure designer host container #8850
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.
Description
This PR allows to apply different configurations to the designer at the site. These are the query params:
hostApp
: Use a number to stablish the host app in the designer. Ex: https://adaptivecards.io/designer?hostApp=1 would set the host app toOutlook Actionable Message
.theme
: By using a string with the name of the theme (case sensitive) you can set the theme of the host container. The possible values depends on the available options for the host app. Ex: https://adaptivecards.io/designer?hostApp=2&theme=Dark would set the theme toDark
on the Microsoft Teams host app.size
: By using a string with the name of the size (case sensitive) you can set the size of the host container. The possible values depends on the available options for the host app. Ex: https://adaptivecards.io/designer?hostApp=8&size=Medium would set the size of the Widget host app toMedium
.deviceEmulation
: By using a number, the device emulation can be set. Ex: Ex: https://adaptivecards.io/designer?hostApp=1&deviceEmulation=2 would set the emulation device toLarge mobile (414px)
at the Outlook Actionable Message host app.I also added a query param that allows to activate the preview mode on the designer by adding
preview=1
to the url.How Verified
I tested it by running a local server