Canvas

icon picker
Import Canvas App

Last edited 31 days ago by MyCondy
light

Recommendation

HTML viewer
If your YAML file contains htmlViewer object, do not forget put ";" at the end of your HtmlText property, like this:
CORRECT - <div style='margin:0px;width:300px;height:728px;border-radius:10px;'></div>
WRONG - <div style='margin:0px;width:300px;height:728px;border-radius:10px'></div>

In DesignKit 2.5 plugin you can import YAML files of a Canvas application. The plugin supports both layouts - Mobile and Tablet.

How to get MSAPP file

Go to your Power Apps environment and click on Import app.
Screenshot 2024-10-27 at 8.26.36.png
After clicking, the MSAPP file will be exported to your local storage. Only what you need is to import MSAPP file from your local storage to Figma via DesignKit 2.5 plugin.

YAML Import

The first step of how to get MSAPP file is the same as it is described in the previous chapter. The difference is that you need to use Microsoft CLI library in VS Code. It means that you need to have installed Visual Studio Code with Power Platform Tools extension.
1_eYN84WJBOPti9s6mG-Bekg.png
Here is the link , where you can find all info.
If you have installed the extension, you need to put this command:
pac canvas unpack --sources <path/folder_name> --msapp <path/app_name.msapp>
Something like this:
pac canvas unpack --sources /Users/lukas/Downloads/ExportApp --msapp /Users/lukas/Downloads/ExportApp.msapp
Nested Containers in YAML
info

This functionality is only available in PRO version

more info about PRO version find
If you use nested groupContainer object in your YAML file, the plugin will recognise all nested containers and import them in Figma in correct order.
Screenshot 2024-05-30 at 10.24.18.png
The output will look like this in Figma:
Screenshot 2024-05-30 at 10.26.59.png

Today function in YAML

info

This functionality is only available in PRO version

more info about PRO version find
If your Canvas application uses Today() function in some label field, the plugin will recognise the function and replace it to real date format in Figma.
Here is example in my YAML file where you can see the TEXT value that contains Today function.
custom_title_7 As label:
Align: =Align.Right
Color: =RGBA(51,51,51,1)
Font: =Font.'Lato Light'
FontWeight: =FontWeight.Bold
Height: =37
Size: =21
Text: =Text(Today(),"dd.mm.yyyy","en")
Width: =185
X: =437
Y: =110
ZIndex: =21
This is the output after importing of a YAML file:
1_gn-O61XnwpiBcz-SgTWSCw.png

Import from GIT

info

This functionality is only available in PRO version

more info about PRO version find
If you want to use this feature, you have to add Personal Access Token in your GitHub account under Developer Settings.
1_OGbxDnQ4MwEUCl7ci_Tmsw.png
When your token is created, you could use your project with Power Apps JSON or YAML screens, like this:
1_jcY6IWqB4TYHS1b-_Kgdew.png
DesignKit 2.5 requests 2 fields — token and URL link. Token is clear. Let me clarify what a url link consists of.
https://api.github.com/repos/<workspace>/<repository>/contents
Let me show it on example. You have a workspace called "Company123" with "powerapps" workspace. Your files are under "screens" folder. The link will look like this:
https://api.github.com/repos/company123/powerapps/contents/screens
This is the output of this feature:
Screenshot 2024-07-13 at 8.32.56.png

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.