-
Notifications
You must be signed in to change notification settings - Fork 552
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
Added possibility to use encoded JSONs at designer's query params #8533
base: main
Are you sure you want to change the base?
Conversation
This will allow people to easily share its adaptive cards JSONs should be uri encoded
0f27811
to
ac62243
Compare
I was thinking that pr automatically created a test page, but seems like not. There is any other way to test it? I tried to build adaptativecards-site with npm but it was unsuccessful. I've also tried to run |
Hi @Diegorro98, The test site is not built if you create a PR from a forked repo. I can kick off a pipeline for you, but the site will be gone once it runs again (i.e. by another PR or from new changes). The easiest solution would be for you to clone our repository and move your changes there, or to test locally (happy to help with errors you are seeing here). |
@JeanRoca Can you take a look at this from a PM perspective for adding this feature to the designer. Thanks! |
@anna-dingler Thank you for your answer! |
Hey @Diegorro98 thank you for this contribution! I think this will be super helpful to allow users to share their cards and also save their progress in a way to come back to it. Some considerations we should be aware of:
|
@JeanRoca Glad to help! :)
These changes attempt to obtain to parse the encoded JSON from the query params from the query param and copy it right into the editors, and as far as I know, the platform is not specified in the card payload neither in the data payload. I think it would be great to specify the desired platform on a query param. About AC schema version, do you refer to these values that are at the card payload?: {
"type": "AdaptiveCard",
...
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.6"
} If you are speaking about that the answer is that if is at the encoded JSON, it will be at the editor. |
I was able to test it as I could, and I saw that the params are already decoded. |
Hi @Diegorro98. This pull request has had no recent activity for the past 5 days . Please take the necessary actions (review, address feedback or commit if reviewed already) to move this along. |
2 similar comments
Hi @Diegorro98. This pull request has had no recent activity for the past 5 days . Please take the necessary actions (review, address feedback or commit if reviewed already) to move this along. |
Hi @Diegorro98. This pull request has had no recent activity for the past 5 days . Please take the necessary actions (review, address feedback or commit if reviewed already) to move this along. |
Any update on this? |
I was finally able to test this functionality, and it works like a charm! It would be really useful to have this feature!! Also, this feature combined with #8850 makes them pretty awesome!!! |
Description
Added the possibility to set at the designer query params JSON strings encoded so that people can build links to share its Adaptive Cards or maybe restore the work they were working before
I made this by trying to generate an URL object, if an exception is launched it will try to parse a JSON. If that also launches an exception, it will not do anything else.
An example would be: https://adaptivecards.io/designer?card=%7B%0A...%0A%7D&data=%7B%0A...%0A%7D
How Verified
I'm waiting that this PR creates the webpage so that I can test it. Whenever it gets working, the above link should work and should have an example adaptive card.
Microsoft Reviewers: Open in CodeFlow