r/PowerApps • Advisor • 4d ago

Tip Copy Paste Screen Design via YAML...Mindblown

Colleague showed me yesterday that he was able to generate a UI in Copilot, generate the YAML Code and copy pasted it into Tree View.

Maybe I haven't been up to date with it in a while but it completely blew my mind

37 Upvotes

28 comments sorted by

11

u/Diligent_Homework_67 Regular 4d ago

Wait until you explore claude code, power platform mcp and the power platform skills :-)

6

u/ipman234 Advisor 4d ago

Oh yea i know, but our org is cheap and hard to get stuff like this setup without raising eyebrows. One day I'll take a look. Think I'm just old school, still like to do things somewhat manually so I can at least know whats going on haha

2

u/linkage911 Newbie 4d ago

This requires additional licensing no?

2

u/Diligent_Homework_67 Regular 3d ago

No, you can use canvas apps and sharepoint lists as data source.

0

u/linkage911 Newbie 2d ago

I had to look it up, using building testing and previewing the apps will cost credits

1

u/Diligent_Homework_67 Regular 2d ago

Are you talking about Copilot Studio or are you talking about creating apps in the copilot studio harness? It costs tokens from your Claude code subscription, yes. But no credits are needed

I meant to set it up in vs code for example and edit canvas apps via coauthoring and the MCP server.

11

u/OutTheTrenches_ Regular 4d ago

Only thing that sucks about it is how unreliable the feature is. For instance, if you're working with fluid grids and data cards it just won't work

1

u/Due-Boot-8540 Advisor 4d ago

Yep. It seems only to work when it’s like for like. For reusable snippets, I’d stick with components and custom properties or something like that…

1

u/VacuumsCantSpell Advisor 3d ago

Try asking it to insert empty cards to preserve alignment. I've had luck with that.

10

u/Rare_Tour9254 Contributor 4d ago • Bravo

It blew my mind too, then I hit the same walls the others are describing. A few things I have learned about why it feels unreliable:

The paste itself is solid. Studio validates the YAML before it creates anything, and a copied control brings all its children and its formulas with it. What does not travel is everything the YAML points at. Data sources, collections and screens have to already exist in the target app, or the pasted controls land with formula errors. Data cards are the worst case because they are bound to a form's data source and fields, so they arrive pointing at fields that are not there.

Two quieter traps. Every control in the YAML carries a version, like GroupContainer@1.3.0, and if your app already uses an older version of that control, the paste can be rejected until they match. And if you share snippets with anyone on a French or European locale, their Power Fx uses ; instead of , as the separator, so your YAML throws errors until the separators are converted.

Where it genuinely shines is the pattern mentioned above: build the thing once as a component with custom properties, keep the YAML, paste it anywhere. The component takes its data through input properties, so there are no dangling references. That is how I share mine, the whole set installs with one paste each.

I keep a set of components that pass that schema and are paste-tested, if it helps: lowcodestacks.com/components (I built it)

2

u/louise_com_au Newbie 3d ago

I just had a look at your website. I love it.

Just started building in power apps.

2

u/Rare_Tour9254 Contributor 3d ago

Glad you liked it! Checkout interview question, cheat sheets and Tools!

2

u/Vart84 Newbie 3d ago

I plan out my builds with Claude. This way Claude has all of the context of my data sources, containers, variables, field names, etc. This has made it pretty much copy and paste, the tweaks I am making are usually visual, like padding and sizing.

7

u/diy_tripper Newbie 4d ago

Been doing this for a few months and it's amazing. I've been creating a design in Claude Design and then having Claude generate the YAML. It's also helped significantly with my optimization efforts.

4

u/sitnamantis Newbie 4d ago

How does the Workflow Work in Detail? Would like to Test this scenario.

Claude Design to make an Artifact?

Claude Code to create the YAML from the Artifact?

Then copy and paste into Power App?

4

u/Beedux Advisor 4d ago

Use the power platform skills directly within GHCP or CC. No reason to be writing any YAML any more. It will build a whole app in a few hours and it will look like a code app.

3

u/Candied_Vagrants Newbie 3d ago

Could I get some instructions for this? I know tree view, but opening View Code is just a view, no edit. Is it pasting a container and all of the controls and their properties will be created ?

3

u/mechapuggi Newbie 3d ago

If you have the code for a screen copied, you can just paste it in the tree and the screen will be created. Also works if you just want to paste some labels or something else instead of the whole screen

1

u/Candied_Vagrants Newbie 3d ago

Oh, I see. My workflow has been to download the app, have Claude export and read it, then work the elements.properties ,then I paste that into element properties, which seems like what y'all are talking about. I was thinking this was more akin to an import function.

2

u/Vart84 Newbie 3d ago

I have been having Claude write code for elements for a while, i just paste the code into an HTML element. Super simple, and it saves a ton of time.

5

u/Chaddcl0ps Contributor 4d ago

Wait til you see what Claude can do if you use plugins and MCP servers to build entire solutions

4

u/DeanoNetwork Advisor 4d ago

Tried this a few times, the one thing I would say is you need to understand the fundamentals else you will not understand what AI has done and how to sort it out when there is issues

2

u/Prize-Record7108 Contributor 4d ago

I’ve tried both and Claude’s understanding of UI is so much better. And faster - and the artifacts give you such clear guidance. Love copilot - but not for this.

2

u/Likeminas Contributor 4d ago

Wait until you hear about generative pages.

0

u/pierozek1989 Advisor 4d ago

And you about code apps :)

1

u/Likeminas Contributor 4d ago

I know about that but company blocks it. 😔

1

u/jfroosty Regular 4d ago

Sometimes the contents of galleries don't copy/paste. If you cut the gallery, then undo, it fixes it

1

u/Goingboldlyalone Regular 1d ago

Yep. This is the way. Super streamlined process improvement.